-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_upload_to_storage_request_content.go
255 lines (211 loc) · 7.38 KB
/
model_upload_to_storage_request_content.go
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
/*
Proxmox
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 2023-01-01
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package proxmox
import (
"encoding/json"
)
// checks if the UploadToStorageRequestContent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UploadToStorageRequestContent{}
// UploadToStorageRequestContent struct for UploadToStorageRequestContent
type UploadToStorageRequestContent struct {
Content UploadContentType `json:"content"`
// The name of the file to create.
Filename string `json:"filename"`
// The expceted checksum of the file.
Checksum *string `json:"checksum,omitempty"`
ChecksumAlgorithm *ChecksumAlgorithm `json:"checksum-algorithm,omitempty"`
// The source filename.
Tmpfilename *string `json:"tmpfilename,omitempty"`
}
// NewUploadToStorageRequestContent instantiates a new UploadToStorageRequestContent 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 NewUploadToStorageRequestContent(content UploadContentType, filename string) *UploadToStorageRequestContent {
this := UploadToStorageRequestContent{}
this.Content = content
this.Filename = filename
return &this
}
// NewUploadToStorageRequestContentWithDefaults instantiates a new UploadToStorageRequestContent 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 NewUploadToStorageRequestContentWithDefaults() *UploadToStorageRequestContent {
this := UploadToStorageRequestContent{}
return &this
}
// GetContent returns the Content field value
func (o *UploadToStorageRequestContent) GetContent() UploadContentType {
if o == nil {
var ret UploadContentType
return ret
}
return o.Content
}
// GetContentOk returns a tuple with the Content field value
// and a boolean to check if the value has been set.
func (o *UploadToStorageRequestContent) GetContentOk() (*UploadContentType, bool) {
if o == nil {
return nil, false
}
return &o.Content, true
}
// SetContent sets field value
func (o *UploadToStorageRequestContent) SetContent(v UploadContentType) {
o.Content = v
}
// GetFilename returns the Filename field value
func (o *UploadToStorageRequestContent) GetFilename() string {
if o == nil {
var ret string
return ret
}
return o.Filename
}
// GetFilenameOk returns a tuple with the Filename field value
// and a boolean to check if the value has been set.
func (o *UploadToStorageRequestContent) GetFilenameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Filename, true
}
// SetFilename sets field value
func (o *UploadToStorageRequestContent) SetFilename(v string) {
o.Filename = v
}
// GetChecksum returns the Checksum field value if set, zero value otherwise.
func (o *UploadToStorageRequestContent) GetChecksum() string {
if o == nil || isNil(o.Checksum) {
var ret string
return ret
}
return *o.Checksum
}
// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UploadToStorageRequestContent) GetChecksumOk() (*string, bool) {
if o == nil || isNil(o.Checksum) {
return nil, false
}
return o.Checksum, true
}
// HasChecksum returns a boolean if a field has been set.
func (o *UploadToStorageRequestContent) HasChecksum() bool {
if o != nil && !isNil(o.Checksum) {
return true
}
return false
}
// SetChecksum gets a reference to the given string and assigns it to the Checksum field.
func (o *UploadToStorageRequestContent) SetChecksum(v string) {
o.Checksum = &v
}
// GetChecksumAlgorithm returns the ChecksumAlgorithm field value if set, zero value otherwise.
func (o *UploadToStorageRequestContent) GetChecksumAlgorithm() ChecksumAlgorithm {
if o == nil || isNil(o.ChecksumAlgorithm) {
var ret ChecksumAlgorithm
return ret
}
return *o.ChecksumAlgorithm
}
// GetChecksumAlgorithmOk returns a tuple with the ChecksumAlgorithm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UploadToStorageRequestContent) GetChecksumAlgorithmOk() (*ChecksumAlgorithm, bool) {
if o == nil || isNil(o.ChecksumAlgorithm) {
return nil, false
}
return o.ChecksumAlgorithm, true
}
// HasChecksumAlgorithm returns a boolean if a field has been set.
func (o *UploadToStorageRequestContent) HasChecksumAlgorithm() bool {
if o != nil && !isNil(o.ChecksumAlgorithm) {
return true
}
return false
}
// SetChecksumAlgorithm gets a reference to the given ChecksumAlgorithm and assigns it to the ChecksumAlgorithm field.
func (o *UploadToStorageRequestContent) SetChecksumAlgorithm(v ChecksumAlgorithm) {
o.ChecksumAlgorithm = &v
}
// GetTmpfilename returns the Tmpfilename field value if set, zero value otherwise.
func (o *UploadToStorageRequestContent) GetTmpfilename() string {
if o == nil || isNil(o.Tmpfilename) {
var ret string
return ret
}
return *o.Tmpfilename
}
// GetTmpfilenameOk returns a tuple with the Tmpfilename field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UploadToStorageRequestContent) GetTmpfilenameOk() (*string, bool) {
if o == nil || isNil(o.Tmpfilename) {
return nil, false
}
return o.Tmpfilename, true
}
// HasTmpfilename returns a boolean if a field has been set.
func (o *UploadToStorageRequestContent) HasTmpfilename() bool {
if o != nil && !isNil(o.Tmpfilename) {
return true
}
return false
}
// SetTmpfilename gets a reference to the given string and assigns it to the Tmpfilename field.
func (o *UploadToStorageRequestContent) SetTmpfilename(v string) {
o.Tmpfilename = &v
}
func (o UploadToStorageRequestContent) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UploadToStorageRequestContent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["content"] = o.Content
toSerialize["filename"] = o.Filename
if !isNil(o.Checksum) {
toSerialize["checksum"] = o.Checksum
}
if !isNil(o.ChecksumAlgorithm) {
toSerialize["checksum-algorithm"] = o.ChecksumAlgorithm
}
if !isNil(o.Tmpfilename) {
toSerialize["tmpfilename"] = o.Tmpfilename
}
return toSerialize, nil
}
type NullableUploadToStorageRequestContent struct {
value *UploadToStorageRequestContent
isSet bool
}
func (v NullableUploadToStorageRequestContent) Get() *UploadToStorageRequestContent {
return v.value
}
func (v *NullableUploadToStorageRequestContent) Set(val *UploadToStorageRequestContent) {
v.value = val
v.isSet = true
}
func (v NullableUploadToStorageRequestContent) IsSet() bool {
return v.isSet
}
func (v *NullableUploadToStorageRequestContent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUploadToStorageRequestContent(val *UploadToStorageRequestContent) *NullableUploadToStorageRequestContent {
return &NullableUploadToStorageRequestContent{value: val, isSet: true}
}
func (v NullableUploadToStorageRequestContent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUploadToStorageRequestContent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}