Files
sdk/model_team_cookie_ack.go

155 lines
3.8 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 TeamCookieAck type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamCookieAck{}
// TeamCookieAck struct for TeamCookieAck
type TeamCookieAck struct {
// Result is true when the cookie was written or cleared.
Result *bool `json:"result,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamCookieAck TeamCookieAck
// NewTeamCookieAck instantiates a new TeamCookieAck 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 NewTeamCookieAck() *TeamCookieAck {
this := TeamCookieAck{}
return &this
}
// NewTeamCookieAckWithDefaults instantiates a new TeamCookieAck 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 NewTeamCookieAckWithDefaults() *TeamCookieAck {
this := TeamCookieAck{}
return &this
}
// GetResult returns the Result field value if set, zero value otherwise.
func (o *TeamCookieAck) GetResult() bool {
if o == nil || IsNil(o.Result) {
var ret bool
return ret
}
return *o.Result
}
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamCookieAck) GetResultOk() (*bool, bool) {
if o == nil || IsNil(o.Result) {
return nil, false
}
return o.Result, true
}
// HasResult returns a boolean if a field has been set.
func (o *TeamCookieAck) HasResult() bool {
if o != nil && !IsNil(o.Result) {
return true
}
return false
}
// SetResult gets a reference to the given bool and assigns it to the Result field.
func (o *TeamCookieAck) SetResult(v bool) {
o.Result = &v
}
func (o TeamCookieAck) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamCookieAck) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Result) {
toSerialize["result"] = o.Result
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamCookieAck) UnmarshalJSON(data []byte) (err error) {
varTeamCookieAck := _TeamCookieAck{}
err = json.Unmarshal(data, &varTeamCookieAck)
if err != nil {
return err
}
*o = TeamCookieAck(varTeamCookieAck)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "result")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamCookieAck struct {
value *TeamCookieAck
isSet bool
}
func (v NullableTeamCookieAck) Get() *TeamCookieAck {
return v.value
}
func (v *NullableTeamCookieAck) Set(val *TeamCookieAck) {
v.value = val
v.isSet = true
}
func (v NullableTeamCookieAck) IsSet() bool {
return v.isSet
}
func (v *NullableTeamCookieAck) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamCookieAck(val *TeamCookieAck) *NullableTeamCookieAck {
return &NullableTeamCookieAck{value: val, isSet: true}
}
func (v NullableTeamCookieAck) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamCookieAck) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}