mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.8 KiB
Go
265 lines
6.8 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 StudioBrandWrite type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioBrandWrite{}
|
|
|
|
// StudioBrandWrite struct for StudioBrandWrite
|
|
type StudioBrandWrite struct {
|
|
Logos []string `json:"logos,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Shared *bool `json:"shared,omitempty"`
|
|
Tokens map[string]interface{} `json:"tokens,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioBrandWrite StudioBrandWrite
|
|
|
|
// NewStudioBrandWrite instantiates a new StudioBrandWrite 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 NewStudioBrandWrite() *StudioBrandWrite {
|
|
this := StudioBrandWrite{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioBrandWriteWithDefaults instantiates a new StudioBrandWrite 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 NewStudioBrandWriteWithDefaults() *StudioBrandWrite {
|
|
this := StudioBrandWrite{}
|
|
return &this
|
|
}
|
|
|
|
// GetLogos returns the Logos field value if set, zero value otherwise.
|
|
func (o *StudioBrandWrite) GetLogos() []string {
|
|
if o == nil || IsNil(o.Logos) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Logos
|
|
}
|
|
|
|
// GetLogosOk returns a tuple with the Logos field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioBrandWrite) GetLogosOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Logos) {
|
|
return nil, false
|
|
}
|
|
return o.Logos, true
|
|
}
|
|
|
|
// HasLogos returns a boolean if a field has been set.
|
|
func (o *StudioBrandWrite) HasLogos() bool {
|
|
if o != nil && !IsNil(o.Logos) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLogos gets a reference to the given []string and assigns it to the Logos field.
|
|
func (o *StudioBrandWrite) SetLogos(v []string) {
|
|
o.Logos = v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *StudioBrandWrite) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioBrandWrite) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *StudioBrandWrite) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *StudioBrandWrite) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetShared returns the Shared field value if set, zero value otherwise.
|
|
func (o *StudioBrandWrite) GetShared() bool {
|
|
if o == nil || IsNil(o.Shared) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Shared
|
|
}
|
|
|
|
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioBrandWrite) GetSharedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Shared) {
|
|
return nil, false
|
|
}
|
|
return o.Shared, true
|
|
}
|
|
|
|
// HasShared returns a boolean if a field has been set.
|
|
func (o *StudioBrandWrite) HasShared() bool {
|
|
if o != nil && !IsNil(o.Shared) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShared gets a reference to the given bool and assigns it to the Shared field.
|
|
func (o *StudioBrandWrite) SetShared(v bool) {
|
|
o.Shared = &v
|
|
}
|
|
|
|
// GetTokens returns the Tokens field value if set, zero value otherwise.
|
|
func (o *StudioBrandWrite) GetTokens() map[string]interface{} {
|
|
if o == nil || IsNil(o.Tokens) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Tokens
|
|
}
|
|
|
|
// GetTokensOk returns a tuple with the Tokens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioBrandWrite) GetTokensOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Tokens) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Tokens, true
|
|
}
|
|
|
|
// HasTokens returns a boolean if a field has been set.
|
|
func (o *StudioBrandWrite) HasTokens() bool {
|
|
if o != nil && !IsNil(o.Tokens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTokens gets a reference to the given map[string]interface{} and assigns it to the Tokens field.
|
|
func (o *StudioBrandWrite) SetTokens(v map[string]interface{}) {
|
|
o.Tokens = v
|
|
}
|
|
|
|
func (o StudioBrandWrite) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioBrandWrite) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Logos) {
|
|
toSerialize["logos"] = o.Logos
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Shared) {
|
|
toSerialize["shared"] = o.Shared
|
|
}
|
|
if !IsNil(o.Tokens) {
|
|
toSerialize["tokens"] = o.Tokens
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioBrandWrite) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioBrandWrite := _StudioBrandWrite{}
|
|
|
|
err = json.Unmarshal(data, &varStudioBrandWrite)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioBrandWrite(varStudioBrandWrite)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "logos")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "shared")
|
|
delete(additionalProperties, "tokens")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioBrandWrite struct {
|
|
value *StudioBrandWrite
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioBrandWrite) Get() *StudioBrandWrite {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioBrandWrite) Set(val *StudioBrandWrite) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioBrandWrite) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioBrandWrite) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioBrandWrite(val *StudioBrandWrite) *NullableStudioBrandWrite {
|
|
return &NullableStudioBrandWrite{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioBrandWrite) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioBrandWrite) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|