mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
339 lines
8.7 KiB
Go
339 lines
8.7 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the AiVideoSpec type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiVideoSpec{}
|
|
|
|
// AiVideoSpec struct for AiVideoSpec
|
|
type AiVideoSpec struct {
|
|
AspectRatios []string `json:"aspect_ratios,omitempty"`
|
|
Audio *bool `json:"audio,omitempty"`
|
|
Durations []int32 `json:"durations,omitempty"`
|
|
FrameImages []string `json:"frame_images,omitempty"`
|
|
Resolutions []string `json:"resolutions,omitempty"`
|
|
Sizes []string `json:"sizes,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiVideoSpec AiVideoSpec
|
|
|
|
// NewAiVideoSpec instantiates a new AiVideoSpec 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 NewAiVideoSpec() *AiVideoSpec {
|
|
this := AiVideoSpec{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiVideoSpecWithDefaults instantiates a new AiVideoSpec 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 NewAiVideoSpecWithDefaults() *AiVideoSpec {
|
|
this := AiVideoSpec{}
|
|
return &this
|
|
}
|
|
|
|
// GetAspectRatios returns the AspectRatios field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetAspectRatios() []string {
|
|
if o == nil || IsNil(o.AspectRatios) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.AspectRatios
|
|
}
|
|
|
|
// GetAspectRatiosOk returns a tuple with the AspectRatios field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetAspectRatiosOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.AspectRatios) {
|
|
return nil, false
|
|
}
|
|
return o.AspectRatios, true
|
|
}
|
|
|
|
// HasAspectRatios returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasAspectRatios() bool {
|
|
if o != nil && !IsNil(o.AspectRatios) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAspectRatios gets a reference to the given []string and assigns it to the AspectRatios field.
|
|
func (o *AiVideoSpec) SetAspectRatios(v []string) {
|
|
o.AspectRatios = v
|
|
}
|
|
|
|
// GetAudio returns the Audio field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetAudio() bool {
|
|
if o == nil || IsNil(o.Audio) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Audio
|
|
}
|
|
|
|
// GetAudioOk returns a tuple with the Audio field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetAudioOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Audio) {
|
|
return nil, false
|
|
}
|
|
return o.Audio, true
|
|
}
|
|
|
|
// HasAudio returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasAudio() bool {
|
|
if o != nil && !IsNil(o.Audio) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAudio gets a reference to the given bool and assigns it to the Audio field.
|
|
func (o *AiVideoSpec) SetAudio(v bool) {
|
|
o.Audio = &v
|
|
}
|
|
|
|
// GetDurations returns the Durations field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetDurations() []int32 {
|
|
if o == nil || IsNil(o.Durations) {
|
|
var ret []int32
|
|
return ret
|
|
}
|
|
return o.Durations
|
|
}
|
|
|
|
// GetDurationsOk returns a tuple with the Durations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetDurationsOk() ([]int32, bool) {
|
|
if o == nil || IsNil(o.Durations) {
|
|
return nil, false
|
|
}
|
|
return o.Durations, true
|
|
}
|
|
|
|
// HasDurations returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasDurations() bool {
|
|
if o != nil && !IsNil(o.Durations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDurations gets a reference to the given []int32 and assigns it to the Durations field.
|
|
func (o *AiVideoSpec) SetDurations(v []int32) {
|
|
o.Durations = v
|
|
}
|
|
|
|
// GetFrameImages returns the FrameImages field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetFrameImages() []string {
|
|
if o == nil || IsNil(o.FrameImages) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.FrameImages
|
|
}
|
|
|
|
// GetFrameImagesOk returns a tuple with the FrameImages field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetFrameImagesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.FrameImages) {
|
|
return nil, false
|
|
}
|
|
return o.FrameImages, true
|
|
}
|
|
|
|
// HasFrameImages returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasFrameImages() bool {
|
|
if o != nil && !IsNil(o.FrameImages) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFrameImages gets a reference to the given []string and assigns it to the FrameImages field.
|
|
func (o *AiVideoSpec) SetFrameImages(v []string) {
|
|
o.FrameImages = v
|
|
}
|
|
|
|
// GetResolutions returns the Resolutions field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetResolutions() []string {
|
|
if o == nil || IsNil(o.Resolutions) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Resolutions
|
|
}
|
|
|
|
// GetResolutionsOk returns a tuple with the Resolutions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetResolutionsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Resolutions) {
|
|
return nil, false
|
|
}
|
|
return o.Resolutions, true
|
|
}
|
|
|
|
// HasResolutions returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasResolutions() bool {
|
|
if o != nil && !IsNil(o.Resolutions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResolutions gets a reference to the given []string and assigns it to the Resolutions field.
|
|
func (o *AiVideoSpec) SetResolutions(v []string) {
|
|
o.Resolutions = v
|
|
}
|
|
|
|
// GetSizes returns the Sizes field value if set, zero value otherwise.
|
|
func (o *AiVideoSpec) GetSizes() []string {
|
|
if o == nil || IsNil(o.Sizes) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Sizes
|
|
}
|
|
|
|
// GetSizesOk returns a tuple with the Sizes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiVideoSpec) GetSizesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Sizes) {
|
|
return nil, false
|
|
}
|
|
return o.Sizes, true
|
|
}
|
|
|
|
// HasSizes returns a boolean if a field has been set.
|
|
func (o *AiVideoSpec) HasSizes() bool {
|
|
if o != nil && !IsNil(o.Sizes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSizes gets a reference to the given []string and assigns it to the Sizes field.
|
|
func (o *AiVideoSpec) SetSizes(v []string) {
|
|
o.Sizes = v
|
|
}
|
|
|
|
func (o AiVideoSpec) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiVideoSpec) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AspectRatios) {
|
|
toSerialize["aspect_ratios"] = o.AspectRatios
|
|
}
|
|
if !IsNil(o.Audio) {
|
|
toSerialize["audio"] = o.Audio
|
|
}
|
|
if !IsNil(o.Durations) {
|
|
toSerialize["durations"] = o.Durations
|
|
}
|
|
if !IsNil(o.FrameImages) {
|
|
toSerialize["frame_images"] = o.FrameImages
|
|
}
|
|
if !IsNil(o.Resolutions) {
|
|
toSerialize["resolutions"] = o.Resolutions
|
|
}
|
|
if !IsNil(o.Sizes) {
|
|
toSerialize["sizes"] = o.Sizes
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiVideoSpec) UnmarshalJSON(data []byte) (err error) {
|
|
varAiVideoSpec := _AiVideoSpec{}
|
|
|
|
err = json.Unmarshal(data, &varAiVideoSpec)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiVideoSpec(varAiVideoSpec)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "aspect_ratios")
|
|
delete(additionalProperties, "audio")
|
|
delete(additionalProperties, "durations")
|
|
delete(additionalProperties, "frame_images")
|
|
delete(additionalProperties, "resolutions")
|
|
delete(additionalProperties, "sizes")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiVideoSpec struct {
|
|
value *AiVideoSpec
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiVideoSpec) Get() *AiVideoSpec {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiVideoSpec) Set(val *AiVideoSpec) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiVideoSpec) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiVideoSpec) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiVideoSpec(val *AiVideoSpec) *NullableAiVideoSpec {
|
|
return &NullableAiVideoSpec{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiVideoSpec) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiVideoSpec) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|