mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
672 lines
16 KiB
Go
672 lines
16 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 Asset type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Asset{}
|
|
|
|
// Asset struct for Asset
|
|
type Asset struct {
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
DisplayName *string `json:"displayName,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
Password *string `json:"password,omitempty"`
|
|
Properties *string `json:"properties,omitempty"`
|
|
Provider *string `json:"provider,omitempty"`
|
|
Region *string `json:"region,omitempty"`
|
|
State *string `json:"state,omitempty"`
|
|
Tag *string `json:"tag,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
UpdatedTime *string `json:"updatedTime,omitempty"`
|
|
Username *string `json:"username,omitempty"`
|
|
Zone *string `json:"zone,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Asset Asset
|
|
|
|
// NewAsset instantiates a new Asset 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 NewAsset() *Asset {
|
|
this := Asset{}
|
|
return &this
|
|
}
|
|
|
|
// NewAssetWithDefaults instantiates a new Asset 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 NewAssetWithDefaults() *Asset {
|
|
this := Asset{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *Asset) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *Asset) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *Asset) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *Asset) GetDisplayName() string {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DisplayName
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetDisplayNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.DisplayName, true
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *Asset) HasDisplayName() bool {
|
|
if o != nil && !IsNil(o.DisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *Asset) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *Asset) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *Asset) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *Asset) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *Asset) 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 *Asset) 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 *Asset) 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 *Asset) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *Asset) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *Asset) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *Asset) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPassword returns the Password field value if set, zero value otherwise.
|
|
func (o *Asset) GetPassword() string {
|
|
if o == nil || IsNil(o.Password) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Password
|
|
}
|
|
|
|
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetPasswordOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Password) {
|
|
return nil, false
|
|
}
|
|
return o.Password, true
|
|
}
|
|
|
|
// HasPassword returns a boolean if a field has been set.
|
|
func (o *Asset) HasPassword() bool {
|
|
if o != nil && !IsNil(o.Password) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPassword gets a reference to the given string and assigns it to the Password field.
|
|
func (o *Asset) SetPassword(v string) {
|
|
o.Password = &v
|
|
}
|
|
|
|
// GetProperties returns the Properties field value if set, zero value otherwise.
|
|
func (o *Asset) GetProperties() string {
|
|
if o == nil || IsNil(o.Properties) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Properties
|
|
}
|
|
|
|
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetPropertiesOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Properties) {
|
|
return nil, false
|
|
}
|
|
return o.Properties, true
|
|
}
|
|
|
|
// HasProperties returns a boolean if a field has been set.
|
|
func (o *Asset) HasProperties() bool {
|
|
if o != nil && !IsNil(o.Properties) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProperties gets a reference to the given string and assigns it to the Properties field.
|
|
func (o *Asset) SetProperties(v string) {
|
|
o.Properties = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *Asset) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *Asset) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *Asset) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
|
func (o *Asset) GetRegion() string {
|
|
if o == nil || IsNil(o.Region) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Region
|
|
}
|
|
|
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetRegionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Region) {
|
|
return nil, false
|
|
}
|
|
return o.Region, true
|
|
}
|
|
|
|
// HasRegion returns a boolean if a field has been set.
|
|
func (o *Asset) HasRegion() bool {
|
|
if o != nil && !IsNil(o.Region) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
|
func (o *Asset) SetRegion(v string) {
|
|
o.Region = &v
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *Asset) GetState() string {
|
|
if o == nil || IsNil(o.State) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.State
|
|
}
|
|
|
|
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetStateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.State) {
|
|
return nil, false
|
|
}
|
|
return o.State, true
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *Asset) HasState() bool {
|
|
if o != nil && !IsNil(o.State) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *Asset) SetState(v string) {
|
|
o.State = &v
|
|
}
|
|
|
|
// GetTag returns the Tag field value if set, zero value otherwise.
|
|
func (o *Asset) GetTag() string {
|
|
if o == nil || IsNil(o.Tag) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tag
|
|
}
|
|
|
|
// GetTagOk returns a tuple with the Tag field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetTagOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tag) {
|
|
return nil, false
|
|
}
|
|
return o.Tag, true
|
|
}
|
|
|
|
// HasTag returns a boolean if a field has been set.
|
|
func (o *Asset) HasTag() bool {
|
|
if o != nil && !IsNil(o.Tag) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTag gets a reference to the given string and assigns it to the Tag field.
|
|
func (o *Asset) SetTag(v string) {
|
|
o.Tag = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *Asset) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *Asset) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *Asset) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise.
|
|
func (o *Asset) GetUpdatedTime() string {
|
|
if o == nil || IsNil(o.UpdatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedTime
|
|
}
|
|
|
|
// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetUpdatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedTime, true
|
|
}
|
|
|
|
// HasUpdatedTime returns a boolean if a field has been set.
|
|
func (o *Asset) HasUpdatedTime() bool {
|
|
if o != nil && !IsNil(o.UpdatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedTime gets a reference to the given string and assigns it to the UpdatedTime field.
|
|
func (o *Asset) SetUpdatedTime(v string) {
|
|
o.UpdatedTime = &v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *Asset) GetUsername() string {
|
|
if o == nil || IsNil(o.Username) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Username
|
|
}
|
|
|
|
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Username) {
|
|
return nil, false
|
|
}
|
|
return o.Username, true
|
|
}
|
|
|
|
// HasUsername returns a boolean if a field has been set.
|
|
func (o *Asset) HasUsername() bool {
|
|
if o != nil && !IsNil(o.Username) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
|
func (o *Asset) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
// GetZone returns the Zone field value if set, zero value otherwise.
|
|
func (o *Asset) GetZone() string {
|
|
if o == nil || IsNil(o.Zone) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Zone
|
|
}
|
|
|
|
// GetZoneOk returns a tuple with the Zone field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Asset) GetZoneOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Zone) {
|
|
return nil, false
|
|
}
|
|
return o.Zone, true
|
|
}
|
|
|
|
// HasZone returns a boolean if a field has been set.
|
|
func (o *Asset) HasZone() bool {
|
|
if o != nil && !IsNil(o.Zone) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetZone gets a reference to the given string and assigns it to the Zone field.
|
|
func (o *Asset) SetZone(v string) {
|
|
o.Zone = &v
|
|
}
|
|
|
|
func (o Asset) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Asset) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["displayName"] = o.DisplayName
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Password) {
|
|
toSerialize["password"] = o.Password
|
|
}
|
|
if !IsNil(o.Properties) {
|
|
toSerialize["properties"] = o.Properties
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.Region) {
|
|
toSerialize["region"] = o.Region
|
|
}
|
|
if !IsNil(o.State) {
|
|
toSerialize["state"] = o.State
|
|
}
|
|
if !IsNil(o.Tag) {
|
|
toSerialize["tag"] = o.Tag
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if !IsNil(o.UpdatedTime) {
|
|
toSerialize["updatedTime"] = o.UpdatedTime
|
|
}
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
if !IsNil(o.Zone) {
|
|
toSerialize["zone"] = o.Zone
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Asset) UnmarshalJSON(data []byte) (err error) {
|
|
varAsset := _Asset{}
|
|
|
|
err = json.Unmarshal(data, &varAsset)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Asset(varAsset)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "displayName")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "password")
|
|
delete(additionalProperties, "properties")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "region")
|
|
delete(additionalProperties, "state")
|
|
delete(additionalProperties, "tag")
|
|
delete(additionalProperties, "type")
|
|
delete(additionalProperties, "updatedTime")
|
|
delete(additionalProperties, "username")
|
|
delete(additionalProperties, "zone")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAsset struct {
|
|
value *Asset
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAsset) Get() *Asset {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAsset) Set(val *Asset) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAsset) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAsset) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAsset(val *Asset) *NullableAsset {
|
|
return &NullableAsset{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAsset) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAsset) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|