Files
sdk/model_platform_drift_board.go

193 lines
5.2 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 PlatformDriftBoard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformDriftBoard{}
// PlatformDriftBoard struct for PlatformDriftBoard
type PlatformDriftBoard struct {
// Apps are the service rows, ordered by org, then app, then env.
Apps []PlatformAppView `json:"apps,omitempty"`
// Summary counts the board by drift severity.
Summary *PlatformFleetSummary `json:"summary,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformDriftBoard PlatformDriftBoard
// NewPlatformDriftBoard instantiates a new PlatformDriftBoard 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 NewPlatformDriftBoard() *PlatformDriftBoard {
this := PlatformDriftBoard{}
return &this
}
// NewPlatformDriftBoardWithDefaults instantiates a new PlatformDriftBoard 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 NewPlatformDriftBoardWithDefaults() *PlatformDriftBoard {
this := PlatformDriftBoard{}
return &this
}
// GetApps returns the Apps field value if set, zero value otherwise.
func (o *PlatformDriftBoard) GetApps() []PlatformAppView {
if o == nil || IsNil(o.Apps) {
var ret []PlatformAppView
return ret
}
return o.Apps
}
// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDriftBoard) GetAppsOk() ([]PlatformAppView, bool) {
if o == nil || IsNil(o.Apps) {
return nil, false
}
return o.Apps, true
}
// HasApps returns a boolean if a field has been set.
func (o *PlatformDriftBoard) HasApps() bool {
if o != nil && !IsNil(o.Apps) {
return true
}
return false
}
// SetApps gets a reference to the given []PlatformAppView and assigns it to the Apps field.
func (o *PlatformDriftBoard) SetApps(v []PlatformAppView) {
o.Apps = v
}
// GetSummary returns the Summary field value if set, zero value otherwise.
func (o *PlatformDriftBoard) GetSummary() PlatformFleetSummary {
if o == nil || IsNil(o.Summary) {
var ret PlatformFleetSummary
return ret
}
return *o.Summary
}
// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDriftBoard) GetSummaryOk() (*PlatformFleetSummary, bool) {
if o == nil || IsNil(o.Summary) {
return nil, false
}
return o.Summary, true
}
// HasSummary returns a boolean if a field has been set.
func (o *PlatformDriftBoard) HasSummary() bool {
if o != nil && !IsNil(o.Summary) {
return true
}
return false
}
// SetSummary gets a reference to the given PlatformFleetSummary and assigns it to the Summary field.
func (o *PlatformDriftBoard) SetSummary(v PlatformFleetSummary) {
o.Summary = &v
}
func (o PlatformDriftBoard) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformDriftBoard) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Apps) {
toSerialize["apps"] = o.Apps
}
if !IsNil(o.Summary) {
toSerialize["summary"] = o.Summary
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformDriftBoard) UnmarshalJSON(data []byte) (err error) {
varPlatformDriftBoard := _PlatformDriftBoard{}
err = json.Unmarshal(data, &varPlatformDriftBoard)
if err != nil {
return err
}
*o = PlatformDriftBoard(varPlatformDriftBoard)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apps")
delete(additionalProperties, "summary")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformDriftBoard struct {
value *PlatformDriftBoard
isSet bool
}
func (v NullablePlatformDriftBoard) Get() *PlatformDriftBoard {
return v.value
}
func (v *NullablePlatformDriftBoard) Set(val *PlatformDriftBoard) {
v.value = val
v.isSet = true
}
func (v NullablePlatformDriftBoard) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformDriftBoard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformDriftBoard(val *PlatformDriftBoard) *NullablePlatformDriftBoard {
return &NullablePlatformDriftBoard{value: val, isSet: true}
}
func (v NullablePlatformDriftBoard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformDriftBoard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}