-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_replace_text_request.go
More file actions
205 lines (170 loc) · 6.16 KB
/
model_replace_text_request.go
File metadata and controls
205 lines (170 loc) · 6.16 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
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
/*
* --------------------------------------------------------------------------------------------------------------------
* <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 ReplaceTextRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReplaceTextRequest{}
// ReplaceTextRequest struct for ReplaceTextRequest
type ReplaceTextRequest struct {
Documents []*os.File `json:"documents,omitempty"`
Options *ReplaceTextOptions `json:"options,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ReplaceTextRequest ReplaceTextRequest
// NewReplaceTextRequest instantiates a new ReplaceTextRequest 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 NewReplaceTextRequest() *ReplaceTextRequest {
this := ReplaceTextRequest{}
return &this
}
// NewReplaceTextRequestWithDefaults instantiates a new ReplaceTextRequest 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 NewReplaceTextRequestWithDefaults() *ReplaceTextRequest {
this := ReplaceTextRequest{}
return &this
}
// GetDocuments returns the Documents field value if set, zero value otherwise.
func (o *ReplaceTextRequest) GetDocuments() []*os.File {
if o == nil || IsNil(o.Documents) {
var ret []*os.File
return ret
}
return o.Documents
}
// GetDocumentsOk returns a tuple with the Documents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplaceTextRequest) GetDocumentsOk() ([]*os.File, bool) {
if o == nil || IsNil(o.Documents) {
return nil, false
}
return o.Documents, true
}
// HasDocuments returns a boolean if a field has been set.
func (o *ReplaceTextRequest) HasDocuments() bool {
if o != nil && !IsNil(o.Documents) {
return true
}
return false
}
// SetDocuments gets a reference to the given []*os.File and assigns it to the Documents field.
func (o *ReplaceTextRequest) SetDocuments(v []*os.File) {
o.Documents = v
}
// GetOptions returns the Options field value if set, zero value otherwise.
func (o *ReplaceTextRequest) GetOptions() ReplaceTextOptions {
if o == nil || IsNil(o.Options) {
var ret ReplaceTextOptions
return ret
}
return *o.Options
}
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplaceTextRequest) GetOptionsOk() (*ReplaceTextOptions, bool) {
if o == nil || IsNil(o.Options) {
return nil, false
}
return o.Options, true
}
// HasOptions returns a boolean if a field has been set.
func (o *ReplaceTextRequest) HasOptions() bool {
if o != nil && !IsNil(o.Options) {
return true
}
return false
}
// SetOptions gets a reference to the given ReplaceTextOptions and assigns it to the Options field.
func (o *ReplaceTextRequest) SetOptions(v ReplaceTextOptions) {
o.Options = &v
}
func (o ReplaceTextRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ReplaceTextRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Documents) {
toSerialize["documents"] = o.Documents
}
if !IsNil(o.Options) {
toSerialize["options"] = o.Options
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ReplaceTextRequest) UnmarshalJSON(bytes []byte) (err error) {
varReplaceTextRequest := _ReplaceTextRequest{}
if err = json.Unmarshal(bytes, &varReplaceTextRequest); err == nil {
*o = ReplaceTextRequest(varReplaceTextRequest)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "documents")
delete(additionalProperties, "options")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableReplaceTextRequest struct {
value *ReplaceTextRequest
isSet bool
}
func (v NullableReplaceTextRequest) Get() *ReplaceTextRequest {
return v.value
}
func (v *NullableReplaceTextRequest) Set(val *ReplaceTextRequest) {
v.value = val
v.isSet = true
}
func (v NullableReplaceTextRequest) IsSet() bool {
return v.isSet
}
func (v *NullableReplaceTextRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReplaceTextRequest(val *ReplaceTextRequest) *NullableReplaceTextRequest {
return &NullableReplaceTextRequest{value: val, isSet: true}
}
func (v NullableReplaceTextRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReplaceTextRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}