mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
13 KiB
Go
459 lines
13 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 GraphGraphDiffOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphDiffOut{}
|
|
|
|
// GraphGraphDiffOut struct for GraphGraphDiffOut
|
|
type GraphGraphDiffOut struct {
|
|
// Asserted is each statement holding at To that did not at From.
|
|
Asserted []GraphWireFact `json:"asserted,omitempty"`
|
|
// Bound is how many pairs this diff examined at most.
|
|
Bound *int64 `json:"bound,omitempty"`
|
|
// From is the earlier instant, RFC 3339, echoed.
|
|
From *string `json:"from,omitempty"`
|
|
// FromKnown is the knowledge instant of the baseline, RFC 3339.
|
|
FromKnown *string `json:"from_known,omitempty"`
|
|
// Retracted is each statement that held at From and no longer does at To, with what ended it as Now: the retraction, the later value, or the statement itself when its own until did.
|
|
Retracted []GraphGraphChange `json:"retracted,omitempty"`
|
|
// Superseded is each property whose value at From was replaced by a different one at To, once per pair however many came in between.
|
|
Superseded []GraphGraphChange `json:"superseded,omitempty"`
|
|
// To is the later instant, RFC 3339: the one asked for, or the server's clock when none was.
|
|
To *string `json:"to,omitempty"`
|
|
// ToKnown is the knowledge instant of the later point, RFC 3339.
|
|
ToKnown *string `json:"to_known,omitempty"`
|
|
// Truncated says more pairs gathered assertions in the interval than Bound, or that one pair holds more than a single read returns. Narrow by entity or by a shorter interval to see the rest.
|
|
Truncated *bool `json:"truncated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphDiffOut GraphGraphDiffOut
|
|
|
|
// NewGraphGraphDiffOut instantiates a new GraphGraphDiffOut 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 NewGraphGraphDiffOut() *GraphGraphDiffOut {
|
|
this := GraphGraphDiffOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphDiffOutWithDefaults instantiates a new GraphGraphDiffOut 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 NewGraphGraphDiffOutWithDefaults() *GraphGraphDiffOut {
|
|
this := GraphGraphDiffOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAsserted returns the Asserted field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetAsserted() []GraphWireFact {
|
|
if o == nil || IsNil(o.Asserted) {
|
|
var ret []GraphWireFact
|
|
return ret
|
|
}
|
|
return o.Asserted
|
|
}
|
|
|
|
// GetAssertedOk returns a tuple with the Asserted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetAssertedOk() ([]GraphWireFact, bool) {
|
|
if o == nil || IsNil(o.Asserted) {
|
|
return nil, false
|
|
}
|
|
return o.Asserted, true
|
|
}
|
|
|
|
// HasAsserted returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasAsserted() bool {
|
|
if o != nil && !IsNil(o.Asserted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsserted gets a reference to the given []GraphWireFact and assigns it to the Asserted field.
|
|
func (o *GraphGraphDiffOut) SetAsserted(v []GraphWireFact) {
|
|
o.Asserted = v
|
|
}
|
|
|
|
// GetBound returns the Bound field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetBound() int64 {
|
|
if o == nil || IsNil(o.Bound) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Bound
|
|
}
|
|
|
|
// GetBoundOk returns a tuple with the Bound field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetBoundOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Bound) {
|
|
return nil, false
|
|
}
|
|
return o.Bound, true
|
|
}
|
|
|
|
// HasBound returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasBound() bool {
|
|
if o != nil && !IsNil(o.Bound) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBound gets a reference to the given int64 and assigns it to the Bound field.
|
|
func (o *GraphGraphDiffOut) SetBound(v int64) {
|
|
o.Bound = &v
|
|
}
|
|
|
|
// GetFrom returns the From field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetFrom() string {
|
|
if o == nil || IsNil(o.From) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.From
|
|
}
|
|
|
|
// GetFromOk returns a tuple with the From field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetFromOk() (*string, bool) {
|
|
if o == nil || IsNil(o.From) {
|
|
return nil, false
|
|
}
|
|
return o.From, true
|
|
}
|
|
|
|
// HasFrom returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasFrom() bool {
|
|
if o != nil && !IsNil(o.From) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFrom gets a reference to the given string and assigns it to the From field.
|
|
func (o *GraphGraphDiffOut) SetFrom(v string) {
|
|
o.From = &v
|
|
}
|
|
|
|
// GetFromKnown returns the FromKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetFromKnown() string {
|
|
if o == nil || IsNil(o.FromKnown) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FromKnown
|
|
}
|
|
|
|
// GetFromKnownOk returns a tuple with the FromKnown field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetFromKnownOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FromKnown) {
|
|
return nil, false
|
|
}
|
|
return o.FromKnown, true
|
|
}
|
|
|
|
// HasFromKnown returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasFromKnown() bool {
|
|
if o != nil && !IsNil(o.FromKnown) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFromKnown gets a reference to the given string and assigns it to the FromKnown field.
|
|
func (o *GraphGraphDiffOut) SetFromKnown(v string) {
|
|
o.FromKnown = &v
|
|
}
|
|
|
|
// GetRetracted returns the Retracted field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetRetracted() []GraphGraphChange {
|
|
if o == nil || IsNil(o.Retracted) {
|
|
var ret []GraphGraphChange
|
|
return ret
|
|
}
|
|
return o.Retracted
|
|
}
|
|
|
|
// GetRetractedOk returns a tuple with the Retracted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetRetractedOk() ([]GraphGraphChange, bool) {
|
|
if o == nil || IsNil(o.Retracted) {
|
|
return nil, false
|
|
}
|
|
return o.Retracted, true
|
|
}
|
|
|
|
// HasRetracted returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasRetracted() bool {
|
|
if o != nil && !IsNil(o.Retracted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRetracted gets a reference to the given []GraphGraphChange and assigns it to the Retracted field.
|
|
func (o *GraphGraphDiffOut) SetRetracted(v []GraphGraphChange) {
|
|
o.Retracted = v
|
|
}
|
|
|
|
// GetSuperseded returns the Superseded field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetSuperseded() []GraphGraphChange {
|
|
if o == nil || IsNil(o.Superseded) {
|
|
var ret []GraphGraphChange
|
|
return ret
|
|
}
|
|
return o.Superseded
|
|
}
|
|
|
|
// GetSupersededOk returns a tuple with the Superseded field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetSupersededOk() ([]GraphGraphChange, bool) {
|
|
if o == nil || IsNil(o.Superseded) {
|
|
return nil, false
|
|
}
|
|
return o.Superseded, true
|
|
}
|
|
|
|
// HasSuperseded returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasSuperseded() bool {
|
|
if o != nil && !IsNil(o.Superseded) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSuperseded gets a reference to the given []GraphGraphChange and assigns it to the Superseded field.
|
|
func (o *GraphGraphDiffOut) SetSuperseded(v []GraphGraphChange) {
|
|
o.Superseded = v
|
|
}
|
|
|
|
// GetTo returns the To field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetTo() string {
|
|
if o == nil || IsNil(o.To) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.To
|
|
}
|
|
|
|
// GetToOk returns a tuple with the To field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetToOk() (*string, bool) {
|
|
if o == nil || IsNil(o.To) {
|
|
return nil, false
|
|
}
|
|
return o.To, true
|
|
}
|
|
|
|
// HasTo returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasTo() bool {
|
|
if o != nil && !IsNil(o.To) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTo gets a reference to the given string and assigns it to the To field.
|
|
func (o *GraphGraphDiffOut) SetTo(v string) {
|
|
o.To = &v
|
|
}
|
|
|
|
// GetToKnown returns the ToKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetToKnown() string {
|
|
if o == nil || IsNil(o.ToKnown) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ToKnown
|
|
}
|
|
|
|
// GetToKnownOk returns a tuple with the ToKnown field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetToKnownOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ToKnown) {
|
|
return nil, false
|
|
}
|
|
return o.ToKnown, true
|
|
}
|
|
|
|
// HasToKnown returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasToKnown() bool {
|
|
if o != nil && !IsNil(o.ToKnown) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetToKnown gets a reference to the given string and assigns it to the ToKnown field.
|
|
func (o *GraphGraphDiffOut) SetToKnown(v string) {
|
|
o.ToKnown = &v
|
|
}
|
|
|
|
// GetTruncated returns the Truncated field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffOut) GetTruncated() bool {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Truncated
|
|
}
|
|
|
|
// GetTruncatedOk returns a tuple with the Truncated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffOut) GetTruncatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
return nil, false
|
|
}
|
|
return o.Truncated, true
|
|
}
|
|
|
|
// HasTruncated returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffOut) HasTruncated() bool {
|
|
if o != nil && !IsNil(o.Truncated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTruncated gets a reference to the given bool and assigns it to the Truncated field.
|
|
func (o *GraphGraphDiffOut) SetTruncated(v bool) {
|
|
o.Truncated = &v
|
|
}
|
|
|
|
func (o GraphGraphDiffOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphDiffOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Asserted) {
|
|
toSerialize["asserted"] = o.Asserted
|
|
}
|
|
if !IsNil(o.Bound) {
|
|
toSerialize["bound"] = o.Bound
|
|
}
|
|
if !IsNil(o.From) {
|
|
toSerialize["from"] = o.From
|
|
}
|
|
if !IsNil(o.FromKnown) {
|
|
toSerialize["from_known"] = o.FromKnown
|
|
}
|
|
if !IsNil(o.Retracted) {
|
|
toSerialize["retracted"] = o.Retracted
|
|
}
|
|
if !IsNil(o.Superseded) {
|
|
toSerialize["superseded"] = o.Superseded
|
|
}
|
|
if !IsNil(o.To) {
|
|
toSerialize["to"] = o.To
|
|
}
|
|
if !IsNil(o.ToKnown) {
|
|
toSerialize["to_known"] = o.ToKnown
|
|
}
|
|
if !IsNil(o.Truncated) {
|
|
toSerialize["truncated"] = o.Truncated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphDiffOut) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphDiffOut := _GraphGraphDiffOut{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphDiffOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphDiffOut(varGraphGraphDiffOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "asserted")
|
|
delete(additionalProperties, "bound")
|
|
delete(additionalProperties, "from")
|
|
delete(additionalProperties, "from_known")
|
|
delete(additionalProperties, "retracted")
|
|
delete(additionalProperties, "superseded")
|
|
delete(additionalProperties, "to")
|
|
delete(additionalProperties, "to_known")
|
|
delete(additionalProperties, "truncated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphDiffOut struct {
|
|
value *GraphGraphDiffOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffOut) Get() *GraphGraphDiffOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffOut) Set(val *GraphGraphDiffOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphDiffOut(val *GraphGraphDiffOut) *NullableGraphGraphDiffOut {
|
|
return &NullableGraphGraphDiffOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|