Files
sdk/model_platform_sync_tally.go

231 lines
6.1 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 PlatformSyncTally type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformSyncTally{}
// PlatformSyncTally struct for PlatformSyncTally
type PlatformSyncTally struct {
// OutOfSync is how many differ from git until someone syncs them.
OutOfSync *int64 `json:"outOfSync,omitempty"`
// Synced is how many run what git declares.
Synced *int64 `json:"synced,omitempty"`
// Unknown is how many CD holds no verdict for, or could not be read.
Unknown *int64 `json:"unknown,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformSyncTally PlatformSyncTally
// NewPlatformSyncTally instantiates a new PlatformSyncTally 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 NewPlatformSyncTally() *PlatformSyncTally {
this := PlatformSyncTally{}
return &this
}
// NewPlatformSyncTallyWithDefaults instantiates a new PlatformSyncTally 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 NewPlatformSyncTallyWithDefaults() *PlatformSyncTally {
this := PlatformSyncTally{}
return &this
}
// GetOutOfSync returns the OutOfSync field value if set, zero value otherwise.
func (o *PlatformSyncTally) GetOutOfSync() int64 {
if o == nil || IsNil(o.OutOfSync) {
var ret int64
return ret
}
return *o.OutOfSync
}
// GetOutOfSyncOk returns a tuple with the OutOfSync field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformSyncTally) GetOutOfSyncOk() (*int64, bool) {
if o == nil || IsNil(o.OutOfSync) {
return nil, false
}
return o.OutOfSync, true
}
// HasOutOfSync returns a boolean if a field has been set.
func (o *PlatformSyncTally) HasOutOfSync() bool {
if o != nil && !IsNil(o.OutOfSync) {
return true
}
return false
}
// SetOutOfSync gets a reference to the given int64 and assigns it to the OutOfSync field.
func (o *PlatformSyncTally) SetOutOfSync(v int64) {
o.OutOfSync = &v
}
// GetSynced returns the Synced field value if set, zero value otherwise.
func (o *PlatformSyncTally) GetSynced() int64 {
if o == nil || IsNil(o.Synced) {
var ret int64
return ret
}
return *o.Synced
}
// GetSyncedOk returns a tuple with the Synced field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformSyncTally) GetSyncedOk() (*int64, bool) {
if o == nil || IsNil(o.Synced) {
return nil, false
}
return o.Synced, true
}
// HasSynced returns a boolean if a field has been set.
func (o *PlatformSyncTally) HasSynced() bool {
if o != nil && !IsNil(o.Synced) {
return true
}
return false
}
// SetSynced gets a reference to the given int64 and assigns it to the Synced field.
func (o *PlatformSyncTally) SetSynced(v int64) {
o.Synced = &v
}
// GetUnknown returns the Unknown field value if set, zero value otherwise.
func (o *PlatformSyncTally) GetUnknown() int64 {
if o == nil || IsNil(o.Unknown) {
var ret int64
return ret
}
return *o.Unknown
}
// GetUnknownOk returns a tuple with the Unknown field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformSyncTally) GetUnknownOk() (*int64, bool) {
if o == nil || IsNil(o.Unknown) {
return nil, false
}
return o.Unknown, true
}
// HasUnknown returns a boolean if a field has been set.
func (o *PlatformSyncTally) HasUnknown() bool {
if o != nil && !IsNil(o.Unknown) {
return true
}
return false
}
// SetUnknown gets a reference to the given int64 and assigns it to the Unknown field.
func (o *PlatformSyncTally) SetUnknown(v int64) {
o.Unknown = &v
}
func (o PlatformSyncTally) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformSyncTally) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.OutOfSync) {
toSerialize["outOfSync"] = o.OutOfSync
}
if !IsNil(o.Synced) {
toSerialize["synced"] = o.Synced
}
if !IsNil(o.Unknown) {
toSerialize["unknown"] = o.Unknown
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformSyncTally) UnmarshalJSON(data []byte) (err error) {
varPlatformSyncTally := _PlatformSyncTally{}
err = json.Unmarshal(data, &varPlatformSyncTally)
if err != nil {
return err
}
*o = PlatformSyncTally(varPlatformSyncTally)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "outOfSync")
delete(additionalProperties, "synced")
delete(additionalProperties, "unknown")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformSyncTally struct {
value *PlatformSyncTally
isSet bool
}
func (v NullablePlatformSyncTally) Get() *PlatformSyncTally {
return v.value
}
func (v *NullablePlatformSyncTally) Set(val *PlatformSyncTally) {
v.value = val
v.isSet = true
}
func (v NullablePlatformSyncTally) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformSyncTally) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformSyncTally(val *PlatformSyncTally) *NullablePlatformSyncTally {
return &NullablePlatformSyncTally{value: val, isSet: true}
}
func (v NullablePlatformSyncTally) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformSyncTally) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}