Files
sdk/model_deploy_argo_sync_windows_.go

231 lines
6.9 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 DeployArgoSyncWindows type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoSyncWindows{}
// DeployArgoSyncWindows struct for DeployArgoSyncWindows
type DeployArgoSyncWindows struct {
// ActiveWindows are the sync windows in force right now. Always null: this platform declares none, so nothing is ever in force.
ActiveWindows []interface{} `json:"activeWindows,omitempty"`
// AssignedWindows are the windows configured for this application at all, whether or not currently in force. Always null, for the same reason.
AssignedWindows []interface{} `json:"assignedWindows,omitempty"`
// CanSync is whether a sync would be permitted at this moment. Always true — with no windows there is nothing to deny it. A caller must not read this as \"a sync will succeed\"; it only means no window is blocking one.
CanSync *bool `json:"canSync,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoSyncWindows DeployArgoSyncWindows
// NewDeployArgoSyncWindows instantiates a new DeployArgoSyncWindows 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 NewDeployArgoSyncWindows() *DeployArgoSyncWindows {
this := DeployArgoSyncWindows{}
return &this
}
// NewDeployArgoSyncWindowsWithDefaults instantiates a new DeployArgoSyncWindows 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 NewDeployArgoSyncWindowsWithDefaults() *DeployArgoSyncWindows {
this := DeployArgoSyncWindows{}
return &this
}
// GetActiveWindows returns the ActiveWindows field value if set, zero value otherwise.
func (o *DeployArgoSyncWindows) GetActiveWindows() []interface{} {
if o == nil || IsNil(o.ActiveWindows) {
var ret []interface{}
return ret
}
return o.ActiveWindows
}
// GetActiveWindowsOk returns a tuple with the ActiveWindows field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoSyncWindows) GetActiveWindowsOk() ([]interface{}, bool) {
if o == nil || IsNil(o.ActiveWindows) {
return nil, false
}
return o.ActiveWindows, true
}
// HasActiveWindows returns a boolean if a field has been set.
func (o *DeployArgoSyncWindows) HasActiveWindows() bool {
if o != nil && !IsNil(o.ActiveWindows) {
return true
}
return false
}
// SetActiveWindows gets a reference to the given []interface{} and assigns it to the ActiveWindows field.
func (o *DeployArgoSyncWindows) SetActiveWindows(v []interface{}) {
o.ActiveWindows = v
}
// GetAssignedWindows returns the AssignedWindows field value if set, zero value otherwise.
func (o *DeployArgoSyncWindows) GetAssignedWindows() []interface{} {
if o == nil || IsNil(o.AssignedWindows) {
var ret []interface{}
return ret
}
return o.AssignedWindows
}
// GetAssignedWindowsOk returns a tuple with the AssignedWindows field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoSyncWindows) GetAssignedWindowsOk() ([]interface{}, bool) {
if o == nil || IsNil(o.AssignedWindows) {
return nil, false
}
return o.AssignedWindows, true
}
// HasAssignedWindows returns a boolean if a field has been set.
func (o *DeployArgoSyncWindows) HasAssignedWindows() bool {
if o != nil && !IsNil(o.AssignedWindows) {
return true
}
return false
}
// SetAssignedWindows gets a reference to the given []interface{} and assigns it to the AssignedWindows field.
func (o *DeployArgoSyncWindows) SetAssignedWindows(v []interface{}) {
o.AssignedWindows = v
}
// GetCanSync returns the CanSync field value if set, zero value otherwise.
func (o *DeployArgoSyncWindows) GetCanSync() bool {
if o == nil || IsNil(o.CanSync) {
var ret bool
return ret
}
return *o.CanSync
}
// GetCanSyncOk returns a tuple with the CanSync field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoSyncWindows) GetCanSyncOk() (*bool, bool) {
if o == nil || IsNil(o.CanSync) {
return nil, false
}
return o.CanSync, true
}
// HasCanSync returns a boolean if a field has been set.
func (o *DeployArgoSyncWindows) HasCanSync() bool {
if o != nil && !IsNil(o.CanSync) {
return true
}
return false
}
// SetCanSync gets a reference to the given bool and assigns it to the CanSync field.
func (o *DeployArgoSyncWindows) SetCanSync(v bool) {
o.CanSync = &v
}
func (o DeployArgoSyncWindows) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoSyncWindows) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ActiveWindows) {
toSerialize["activeWindows"] = o.ActiveWindows
}
if !IsNil(o.AssignedWindows) {
toSerialize["assignedWindows"] = o.AssignedWindows
}
if !IsNil(o.CanSync) {
toSerialize["canSync"] = o.CanSync
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoSyncWindows) UnmarshalJSON(data []byte) (err error) {
varDeployArgoSyncWindows := _DeployArgoSyncWindows{}
err = json.Unmarshal(data, &varDeployArgoSyncWindows)
if err != nil {
return err
}
*o = DeployArgoSyncWindows(varDeployArgoSyncWindows)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "activeWindows")
delete(additionalProperties, "assignedWindows")
delete(additionalProperties, "canSync")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoSyncWindows struct {
value *DeployArgoSyncWindows
isSet bool
}
func (v NullableDeployArgoSyncWindows) Get() *DeployArgoSyncWindows {
return v.value
}
func (v *NullableDeployArgoSyncWindows) Set(val *DeployArgoSyncWindows) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoSyncWindows) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoSyncWindows) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoSyncWindows(val *DeployArgoSyncWindows) *NullableDeployArgoSyncWindows {
return &NullableDeployArgoSyncWindows{value: val, isSet: true}
}
func (v NullableDeployArgoSyncWindows) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoSyncWindows) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}