Files
sdk/model_licensing_release_list.go

155 lines
4.3 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 LicensingReleaseList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LicensingReleaseList{}
// LicensingReleaseList struct for LicensingReleaseList
type LicensingReleaseList struct {
// Releases is the published releases, always an array and never null.
Releases []LicensingRelease `json:"releases,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LicensingReleaseList LicensingReleaseList
// NewLicensingReleaseList instantiates a new LicensingReleaseList 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 NewLicensingReleaseList() *LicensingReleaseList {
this := LicensingReleaseList{}
return &this
}
// NewLicensingReleaseListWithDefaults instantiates a new LicensingReleaseList 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 NewLicensingReleaseListWithDefaults() *LicensingReleaseList {
this := LicensingReleaseList{}
return &this
}
// GetReleases returns the Releases field value if set, zero value otherwise.
func (o *LicensingReleaseList) GetReleases() []LicensingRelease {
if o == nil || IsNil(o.Releases) {
var ret []LicensingRelease
return ret
}
return o.Releases
}
// GetReleasesOk returns a tuple with the Releases field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LicensingReleaseList) GetReleasesOk() ([]LicensingRelease, bool) {
if o == nil || IsNil(o.Releases) {
return nil, false
}
return o.Releases, true
}
// HasReleases returns a boolean if a field has been set.
func (o *LicensingReleaseList) HasReleases() bool {
if o != nil && !IsNil(o.Releases) {
return true
}
return false
}
// SetReleases gets a reference to the given []LicensingRelease and assigns it to the Releases field.
func (o *LicensingReleaseList) SetReleases(v []LicensingRelease) {
o.Releases = v
}
func (o LicensingReleaseList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LicensingReleaseList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Releases) {
toSerialize["releases"] = o.Releases
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LicensingReleaseList) UnmarshalJSON(data []byte) (err error) {
varLicensingReleaseList := _LicensingReleaseList{}
err = json.Unmarshal(data, &varLicensingReleaseList)
if err != nil {
return err
}
*o = LicensingReleaseList(varLicensingReleaseList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "releases")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLicensingReleaseList struct {
value *LicensingReleaseList
isSet bool
}
func (v NullableLicensingReleaseList) Get() *LicensingReleaseList {
return v.value
}
func (v *NullableLicensingReleaseList) Set(val *LicensingReleaseList) {
v.value = val
v.isSet = true
}
func (v NullableLicensingReleaseList) IsSet() bool {
return v.isSet
}
func (v *NullableLicensingReleaseList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLicensingReleaseList(val *LicensingReleaseList) *NullableLicensingReleaseList {
return &NullableLicensingReleaseList{value: val, isSet: true}
}
func (v NullableLicensingReleaseList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLicensingReleaseList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}