-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_unprotect_request.go
More file actions
168 lines (138 loc) · 5.01 KB
/
model_unprotect_request.go
File metadata and controls
168 lines (138 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Smallize">
* Copyright (c) 2024 Slidize for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------------------------------------------
*/
package slidizecloud
import (
"encoding/json"
"os"
)
// checks if the UnprotectRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UnprotectRequest{}
// UnprotectRequest struct for UnprotectRequest
type UnprotectRequest struct {
Document **os.File `json:"document,omitempty"`
AdditionalProperties map[string]interface{}
}
type _UnprotectRequest UnprotectRequest
// NewUnprotectRequest instantiates a new UnprotectRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewUnprotectRequest() *UnprotectRequest {
this := UnprotectRequest{}
return &this
}
// NewUnprotectRequestWithDefaults instantiates a new UnprotectRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewUnprotectRequestWithDefaults() *UnprotectRequest {
this := UnprotectRequest{}
return &this
}
// GetDocument returns the Document field value if set, zero value otherwise.
func (o *UnprotectRequest) GetDocument() *os.File {
if o == nil || IsNil(o.Document) {
var ret *os.File
return ret
}
return *o.Document
}
// GetDocumentOk returns a tuple with the Document field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UnprotectRequest) GetDocumentOk() (**os.File, bool) {
if o == nil || IsNil(o.Document) {
return nil, false
}
return o.Document, true
}
// HasDocument returns a boolean if a field has been set.
func (o *UnprotectRequest) HasDocument() bool {
if o != nil && !IsNil(o.Document) {
return true
}
return false
}
// SetDocument gets a reference to the given *os.File and assigns it to the Document field.
func (o *UnprotectRequest) SetDocument(v *os.File) {
o.Document = &v
}
func (o UnprotectRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UnprotectRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Document) {
toSerialize["document"] = o.Document
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *UnprotectRequest) UnmarshalJSON(bytes []byte) (err error) {
varUnprotectRequest := _UnprotectRequest{}
if err = json.Unmarshal(bytes, &varUnprotectRequest); err == nil {
*o = UnprotectRequest(varUnprotectRequest)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "document")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableUnprotectRequest struct {
value *UnprotectRequest
isSet bool
}
func (v NullableUnprotectRequest) Get() *UnprotectRequest {
return v.value
}
func (v *NullableUnprotectRequest) Set(val *UnprotectRequest) {
v.value = val
v.isSet = true
}
func (v NullableUnprotectRequest) IsSet() bool {
return v.isSet
}
func (v *NullableUnprotectRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUnprotectRequest(val *UnprotectRequest) *NullableUnprotectRequest {
return &NullableUnprotectRequest{value: val, isSet: true}
}
func (v NullableUnprotectRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUnprotectRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}