forked from muxinc/mux-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_input_settings_overlay_settings.go
338 lines (286 loc) · 11.4 KB
/
model_input_settings_overlay_settings.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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
/*
* Mux API
*
* Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
*
* API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package muxgo
import (
"encoding/json"
)
// InputSettingsOverlaySettings An object that describes how the image file referenced in url should be placed over the video (i.e. watermarking).
type InputSettingsOverlaySettings struct {
// Where the vertical positioning of the overlay/watermark should begin from. Defaults to `\"top\"`
VerticalAlign *string `json:"vertical_align,omitempty"`
// The distance from the vertical_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'middle', a positive value will shift the overlay towards the bottom and and a negative value will shift it towards the top.
VerticalMargin *string `json:"vertical_margin,omitempty"`
// Where the horizontal positioning of the overlay/watermark should begin from.
HorizontalAlign *string `json:"horizontal_align,omitempty"`
// The distance from the horizontal_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'center', a positive value will shift the image towards the right and and a negative value will shift it towards the left.
HorizontalMargin *string `json:"horizontal_margin,omitempty"`
// How wide the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the width will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If height is supplied with no width, the width will scale proportionally to the height.
Width *string `json:"width,omitempty"`
// How tall the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the height will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If width is supplied with no height, the height will scale proportionally to the width.
Height *string `json:"height,omitempty"`
// How opaque the overlay should appear, expressed as a percent. (Default 100%)
Opacity *string `json:"opacity,omitempty"`
}
// NewInputSettingsOverlaySettings instantiates a new InputSettingsOverlaySettings 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 NewInputSettingsOverlaySettings() *InputSettingsOverlaySettings {
this := InputSettingsOverlaySettings{}
return &this
}
// NewInputSettingsOverlaySettingsWithDefaults instantiates a new InputSettingsOverlaySettings 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 NewInputSettingsOverlaySettingsWithDefaults() *InputSettingsOverlaySettings {
this := InputSettingsOverlaySettings{}
return &this
}
// GetVerticalAlign returns the VerticalAlign field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetVerticalAlign() string {
if o == nil || o.VerticalAlign == nil {
var ret string
return ret
}
return *o.VerticalAlign
}
// GetVerticalAlignOk returns a tuple with the VerticalAlign field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetVerticalAlignOk() (*string, bool) {
if o == nil || o.VerticalAlign == nil {
return nil, false
}
return o.VerticalAlign, true
}
// HasVerticalAlign returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasVerticalAlign() bool {
if o != nil && o.VerticalAlign != nil {
return true
}
return false
}
// SetVerticalAlign gets a reference to the given string and assigns it to the VerticalAlign field.
func (o *InputSettingsOverlaySettings) SetVerticalAlign(v string) {
o.VerticalAlign = &v
}
// GetVerticalMargin returns the VerticalMargin field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetVerticalMargin() string {
if o == nil || o.VerticalMargin == nil {
var ret string
return ret
}
return *o.VerticalMargin
}
// GetVerticalMarginOk returns a tuple with the VerticalMargin field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetVerticalMarginOk() (*string, bool) {
if o == nil || o.VerticalMargin == nil {
return nil, false
}
return o.VerticalMargin, true
}
// HasVerticalMargin returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasVerticalMargin() bool {
if o != nil && o.VerticalMargin != nil {
return true
}
return false
}
// SetVerticalMargin gets a reference to the given string and assigns it to the VerticalMargin field.
func (o *InputSettingsOverlaySettings) SetVerticalMargin(v string) {
o.VerticalMargin = &v
}
// GetHorizontalAlign returns the HorizontalAlign field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetHorizontalAlign() string {
if o == nil || o.HorizontalAlign == nil {
var ret string
return ret
}
return *o.HorizontalAlign
}
// GetHorizontalAlignOk returns a tuple with the HorizontalAlign field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetHorizontalAlignOk() (*string, bool) {
if o == nil || o.HorizontalAlign == nil {
return nil, false
}
return o.HorizontalAlign, true
}
// HasHorizontalAlign returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasHorizontalAlign() bool {
if o != nil && o.HorizontalAlign != nil {
return true
}
return false
}
// SetHorizontalAlign gets a reference to the given string and assigns it to the HorizontalAlign field.
func (o *InputSettingsOverlaySettings) SetHorizontalAlign(v string) {
o.HorizontalAlign = &v
}
// GetHorizontalMargin returns the HorizontalMargin field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetHorizontalMargin() string {
if o == nil || o.HorizontalMargin == nil {
var ret string
return ret
}
return *o.HorizontalMargin
}
// GetHorizontalMarginOk returns a tuple with the HorizontalMargin field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetHorizontalMarginOk() (*string, bool) {
if o == nil || o.HorizontalMargin == nil {
return nil, false
}
return o.HorizontalMargin, true
}
// HasHorizontalMargin returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasHorizontalMargin() bool {
if o != nil && o.HorizontalMargin != nil {
return true
}
return false
}
// SetHorizontalMargin gets a reference to the given string and assigns it to the HorizontalMargin field.
func (o *InputSettingsOverlaySettings) SetHorizontalMargin(v string) {
o.HorizontalMargin = &v
}
// GetWidth returns the Width field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetWidth() string {
if o == nil || o.Width == nil {
var ret string
return ret
}
return *o.Width
}
// GetWidthOk returns a tuple with the Width field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetWidthOk() (*string, bool) {
if o == nil || o.Width == nil {
return nil, false
}
return o.Width, true
}
// HasWidth returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasWidth() bool {
if o != nil && o.Width != nil {
return true
}
return false
}
// SetWidth gets a reference to the given string and assigns it to the Width field.
func (o *InputSettingsOverlaySettings) SetWidth(v string) {
o.Width = &v
}
// GetHeight returns the Height field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetHeight() string {
if o == nil || o.Height == nil {
var ret string
return ret
}
return *o.Height
}
// GetHeightOk returns a tuple with the Height field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetHeightOk() (*string, bool) {
if o == nil || o.Height == nil {
return nil, false
}
return o.Height, true
}
// HasHeight returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasHeight() bool {
if o != nil && o.Height != nil {
return true
}
return false
}
// SetHeight gets a reference to the given string and assigns it to the Height field.
func (o *InputSettingsOverlaySettings) SetHeight(v string) {
o.Height = &v
}
// GetOpacity returns the Opacity field value if set, zero value otherwise.
func (o *InputSettingsOverlaySettings) GetOpacity() string {
if o == nil || o.Opacity == nil {
var ret string
return ret
}
return *o.Opacity
}
// GetOpacityOk returns a tuple with the Opacity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InputSettingsOverlaySettings) GetOpacityOk() (*string, bool) {
if o == nil || o.Opacity == nil {
return nil, false
}
return o.Opacity, true
}
// HasOpacity returns a boolean if a field has been set.
func (o *InputSettingsOverlaySettings) HasOpacity() bool {
if o != nil && o.Opacity != nil {
return true
}
return false
}
// SetOpacity gets a reference to the given string and assigns it to the Opacity field.
func (o *InputSettingsOverlaySettings) SetOpacity(v string) {
o.Opacity = &v
}
func (o InputSettingsOverlaySettings) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.VerticalAlign != nil {
toSerialize["vertical_align"] = o.VerticalAlign
}
if o.VerticalMargin != nil {
toSerialize["vertical_margin"] = o.VerticalMargin
}
if o.HorizontalAlign != nil {
toSerialize["horizontal_align"] = o.HorizontalAlign
}
if o.HorizontalMargin != nil {
toSerialize["horizontal_margin"] = o.HorizontalMargin
}
if o.Width != nil {
toSerialize["width"] = o.Width
}
if o.Height != nil {
toSerialize["height"] = o.Height
}
if o.Opacity != nil {
toSerialize["opacity"] = o.Opacity
}
return json.Marshal(toSerialize)
}
type NullableInputSettingsOverlaySettings struct {
value *InputSettingsOverlaySettings
isSet bool
}
func (v NullableInputSettingsOverlaySettings) Get() *InputSettingsOverlaySettings {
return v.value
}
func (v *NullableInputSettingsOverlaySettings) Set(val *InputSettingsOverlaySettings) {
v.value = val
v.isSet = true
}
func (v NullableInputSettingsOverlaySettings) IsSet() bool {
return v.isSet
}
func (v *NullableInputSettingsOverlaySettings) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInputSettingsOverlaySettings(val *InputSettingsOverlaySettings) *NullableInputSettingsOverlaySettings {
return &NullableInputSettingsOverlaySettings{value: val, isSet: true}
}
func (v NullableInputSettingsOverlaySettings) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInputSettingsOverlaySettings) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}