mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.0 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 GraphGraphChange type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphChange{}
|
|
|
|
// GraphGraphChange struct for GraphGraphChange
|
|
type GraphGraphChange struct {
|
|
// Now is the assertion in force at To: the claim that replaced Was, or, for a retraction, the retraction itself — which is who withdrew it and on what evidence.
|
|
Now *GraphWireFact `json:"now,omitempty"`
|
|
// Was is the assertion in force at From.
|
|
Was *GraphWireFact `json:"was,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphChange GraphGraphChange
|
|
|
|
// NewGraphGraphChange instantiates a new GraphGraphChange 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 NewGraphGraphChange() *GraphGraphChange {
|
|
this := GraphGraphChange{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphChangeWithDefaults instantiates a new GraphGraphChange 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 NewGraphGraphChangeWithDefaults() *GraphGraphChange {
|
|
this := GraphGraphChange{}
|
|
return &this
|
|
}
|
|
|
|
// GetNow returns the Now field value if set, zero value otherwise.
|
|
func (o *GraphGraphChange) GetNow() GraphWireFact {
|
|
if o == nil || IsNil(o.Now) {
|
|
var ret GraphWireFact
|
|
return ret
|
|
}
|
|
return *o.Now
|
|
}
|
|
|
|
// GetNowOk returns a tuple with the Now field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphChange) GetNowOk() (*GraphWireFact, bool) {
|
|
if o == nil || IsNil(o.Now) {
|
|
return nil, false
|
|
}
|
|
return o.Now, true
|
|
}
|
|
|
|
// HasNow returns a boolean if a field has been set.
|
|
func (o *GraphGraphChange) HasNow() bool {
|
|
if o != nil && !IsNil(o.Now) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNow gets a reference to the given GraphWireFact and assigns it to the Now field.
|
|
func (o *GraphGraphChange) SetNow(v GraphWireFact) {
|
|
o.Now = &v
|
|
}
|
|
|
|
// GetWas returns the Was field value if set, zero value otherwise.
|
|
func (o *GraphGraphChange) GetWas() GraphWireFact {
|
|
if o == nil || IsNil(o.Was) {
|
|
var ret GraphWireFact
|
|
return ret
|
|
}
|
|
return *o.Was
|
|
}
|
|
|
|
// GetWasOk returns a tuple with the Was field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphChange) GetWasOk() (*GraphWireFact, bool) {
|
|
if o == nil || IsNil(o.Was) {
|
|
return nil, false
|
|
}
|
|
return o.Was, true
|
|
}
|
|
|
|
// HasWas returns a boolean if a field has been set.
|
|
func (o *GraphGraphChange) HasWas() bool {
|
|
if o != nil && !IsNil(o.Was) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWas gets a reference to the given GraphWireFact and assigns it to the Was field.
|
|
func (o *GraphGraphChange) SetWas(v GraphWireFact) {
|
|
o.Was = &v
|
|
}
|
|
|
|
func (o GraphGraphChange) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphChange) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Now) {
|
|
toSerialize["now"] = o.Now
|
|
}
|
|
if !IsNil(o.Was) {
|
|
toSerialize["was"] = o.Was
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphChange) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphChange := _GraphGraphChange{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphChange)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphChange(varGraphGraphChange)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "now")
|
|
delete(additionalProperties, "was")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphChange struct {
|
|
value *GraphGraphChange
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphChange) Get() *GraphGraphChange {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphChange) Set(val *GraphGraphChange) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphChange) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphChange) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphChange(val *GraphGraphChange) *NullableGraphGraphChange {
|
|
return &NullableGraphGraphChange{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphChange) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphChange) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|