Files
sdk/model_bot_bot_sync.go

193 lines
4.7 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 BotBotSync type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BotBotSync{}
// BotBotSync struct for BotBotSync
type BotBotSync struct {
// Projected is how many roster entries the reconcile touched.
Projected *int64 `json:"projected,omitempty"`
// Synced is true when the reconcile ran.
Synced *bool `json:"synced,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BotBotSync BotBotSync
// NewBotBotSync instantiates a new BotBotSync 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 NewBotBotSync() *BotBotSync {
this := BotBotSync{}
return &this
}
// NewBotBotSyncWithDefaults instantiates a new BotBotSync 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 NewBotBotSyncWithDefaults() *BotBotSync {
this := BotBotSync{}
return &this
}
// GetProjected returns the Projected field value if set, zero value otherwise.
func (o *BotBotSync) GetProjected() int64 {
if o == nil || IsNil(o.Projected) {
var ret int64
return ret
}
return *o.Projected
}
// GetProjectedOk returns a tuple with the Projected field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BotBotSync) GetProjectedOk() (*int64, bool) {
if o == nil || IsNil(o.Projected) {
return nil, false
}
return o.Projected, true
}
// HasProjected returns a boolean if a field has been set.
func (o *BotBotSync) HasProjected() bool {
if o != nil && !IsNil(o.Projected) {
return true
}
return false
}
// SetProjected gets a reference to the given int64 and assigns it to the Projected field.
func (o *BotBotSync) SetProjected(v int64) {
o.Projected = &v
}
// GetSynced returns the Synced field value if set, zero value otherwise.
func (o *BotBotSync) GetSynced() bool {
if o == nil || IsNil(o.Synced) {
var ret bool
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 *BotBotSync) GetSyncedOk() (*bool, 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 *BotBotSync) HasSynced() bool {
if o != nil && !IsNil(o.Synced) {
return true
}
return false
}
// SetSynced gets a reference to the given bool and assigns it to the Synced field.
func (o *BotBotSync) SetSynced(v bool) {
o.Synced = &v
}
func (o BotBotSync) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BotBotSync) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Projected) {
toSerialize["projected"] = o.Projected
}
if !IsNil(o.Synced) {
toSerialize["synced"] = o.Synced
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BotBotSync) UnmarshalJSON(data []byte) (err error) {
varBotBotSync := _BotBotSync{}
err = json.Unmarshal(data, &varBotBotSync)
if err != nil {
return err
}
*o = BotBotSync(varBotBotSync)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "projected")
delete(additionalProperties, "synced")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBotBotSync struct {
value *BotBotSync
isSet bool
}
func (v NullableBotBotSync) Get() *BotBotSync {
return v.value
}
func (v *NullableBotBotSync) Set(val *BotBotSync) {
v.value = val
v.isSet = true
}
func (v NullableBotBotSync) IsSet() bool {
return v.isSet
}
func (v *NullableBotBotSync) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBotBotSync(val *BotBotSync) *NullableBotBotSync {
return &NullableBotBotSync{value: val, isSet: true}
}
func (v NullableBotBotSync) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBotBotSync) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}