Files
sdk/model_platform_release_board.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 PlatformReleaseBoard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformReleaseBoard{}
// PlatformReleaseBoard struct for PlatformReleaseBoard
type PlatformReleaseBoard struct {
// Releases are the deployments that genuinely reached the cluster.
Releases []PlatformReleaseRow `json:"releases,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformReleaseBoard PlatformReleaseBoard
// NewPlatformReleaseBoard instantiates a new PlatformReleaseBoard 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 NewPlatformReleaseBoard() *PlatformReleaseBoard {
this := PlatformReleaseBoard{}
return &this
}
// NewPlatformReleaseBoardWithDefaults instantiates a new PlatformReleaseBoard 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 NewPlatformReleaseBoardWithDefaults() *PlatformReleaseBoard {
this := PlatformReleaseBoard{}
return &this
}
// GetReleases returns the Releases field value if set, zero value otherwise.
func (o *PlatformReleaseBoard) GetReleases() []PlatformReleaseRow {
if o == nil || IsNil(o.Releases) {
var ret []PlatformReleaseRow
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 *PlatformReleaseBoard) GetReleasesOk() ([]PlatformReleaseRow, 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 *PlatformReleaseBoard) HasReleases() bool {
if o != nil && !IsNil(o.Releases) {
return true
}
return false
}
// SetReleases gets a reference to the given []PlatformReleaseRow and assigns it to the Releases field.
func (o *PlatformReleaseBoard) SetReleases(v []PlatformReleaseRow) {
o.Releases = v
}
func (o PlatformReleaseBoard) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformReleaseBoard) 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 *PlatformReleaseBoard) UnmarshalJSON(data []byte) (err error) {
varPlatformReleaseBoard := _PlatformReleaseBoard{}
err = json.Unmarshal(data, &varPlatformReleaseBoard)
if err != nil {
return err
}
*o = PlatformReleaseBoard(varPlatformReleaseBoard)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "releases")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformReleaseBoard struct {
value *PlatformReleaseBoard
isSet bool
}
func (v NullablePlatformReleaseBoard) Get() *PlatformReleaseBoard {
return v.value
}
func (v *NullablePlatformReleaseBoard) Set(val *PlatformReleaseBoard) {
v.value = val
v.isSet = true
}
func (v NullablePlatformReleaseBoard) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformReleaseBoard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformReleaseBoard(val *PlatformReleaseBoard) *NullablePlatformReleaseBoard {
return &NullablePlatformReleaseBoard{value: val, isSet: true}
}
func (v NullablePlatformReleaseBoard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformReleaseBoard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}