mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.4 KiB
Go
345 lines
9.4 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 GraphGraphDiffIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphDiffIn{}
|
|
|
|
// GraphGraphDiffIn struct for GraphGraphDiffIn
|
|
type GraphGraphDiffIn struct {
|
|
// Entity narrows the diff to what was asserted about one entity. Absent diffs the whole graph, bounded by Limit.
|
|
Entity *string `json:"entity,omitempty"`
|
|
// From is the earlier instant of the world, RFC 3339. What held here is the baseline, so a statement beginning exactly at From is part of it and not a change. Absent is To: the diff is then of what was heard, not of what happened.
|
|
From *string `json:"from,omitempty"`
|
|
// FromKnown is how much this plane had heard at the baseline, RFC 3339. Absent is ToKnown: the diff is then of the world, as known once.
|
|
FromKnown *string `json:"from_known,omitempty"`
|
|
// Limit caps how many (entity, relation) pairs are examined, in key order. Absent, zero, or anything above the walk ceiling is the ceiling.
|
|
Limit *int64 `json:"limit,omitempty"`
|
|
// To is the later instant of the world, RFC 3339, and may not precede From. A statement beginning or ending exactly at To is in the diff. Absent is now.
|
|
To *string `json:"to,omitempty"`
|
|
// ToKnown is how much it had heard at the later point, RFC 3339, and may not precede FromKnown. Absent is now.
|
|
ToKnown *string `json:"to_known,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphDiffIn GraphGraphDiffIn
|
|
|
|
// NewGraphGraphDiffIn instantiates a new GraphGraphDiffIn 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 NewGraphGraphDiffIn() *GraphGraphDiffIn {
|
|
this := GraphGraphDiffIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphDiffInWithDefaults instantiates a new GraphGraphDiffIn 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 NewGraphGraphDiffInWithDefaults() *GraphGraphDiffIn {
|
|
this := GraphGraphDiffIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetEntity returns the Entity field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) GetEntity() string {
|
|
if o == nil || IsNil(o.Entity) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Entity
|
|
}
|
|
|
|
// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffIn) GetEntityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Entity) {
|
|
return nil, false
|
|
}
|
|
return o.Entity, true
|
|
}
|
|
|
|
// HasEntity returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffIn) HasEntity() bool {
|
|
if o != nil && !IsNil(o.Entity) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntity gets a reference to the given string and assigns it to the Entity field.
|
|
func (o *GraphGraphDiffIn) SetEntity(v string) {
|
|
o.Entity = &v
|
|
}
|
|
|
|
// GetFrom returns the From field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) SetFrom(v string) {
|
|
o.From = &v
|
|
}
|
|
|
|
// GetFromKnown returns the FromKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) SetFromKnown(v string) {
|
|
o.FromKnown = &v
|
|
}
|
|
|
|
// GetLimit returns the Limit field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) GetLimit() int64 {
|
|
if o == nil || IsNil(o.Limit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Limit
|
|
}
|
|
|
|
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphDiffIn) GetLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Limit) {
|
|
return nil, false
|
|
}
|
|
return o.Limit, true
|
|
}
|
|
|
|
// HasLimit returns a boolean if a field has been set.
|
|
func (o *GraphGraphDiffIn) HasLimit() bool {
|
|
if o != nil && !IsNil(o.Limit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
|
|
func (o *GraphGraphDiffIn) SetLimit(v int64) {
|
|
o.Limit = &v
|
|
}
|
|
|
|
// GetTo returns the To field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) SetTo(v string) {
|
|
o.To = &v
|
|
}
|
|
|
|
// GetToKnown returns the ToKnown field value if set, zero value otherwise.
|
|
func (o *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) 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 *GraphGraphDiffIn) SetToKnown(v string) {
|
|
o.ToKnown = &v
|
|
}
|
|
|
|
func (o GraphGraphDiffIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphDiffIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Entity) {
|
|
toSerialize["entity"] = o.Entity
|
|
}
|
|
if !IsNil(o.From) {
|
|
toSerialize["from"] = o.From
|
|
}
|
|
if !IsNil(o.FromKnown) {
|
|
toSerialize["from_known"] = o.FromKnown
|
|
}
|
|
if !IsNil(o.Limit) {
|
|
toSerialize["limit"] = o.Limit
|
|
}
|
|
if !IsNil(o.To) {
|
|
toSerialize["to"] = o.To
|
|
}
|
|
if !IsNil(o.ToKnown) {
|
|
toSerialize["to_known"] = o.ToKnown
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphDiffIn) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphDiffIn := _GraphGraphDiffIn{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphDiffIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphDiffIn(varGraphGraphDiffIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "entity")
|
|
delete(additionalProperties, "from")
|
|
delete(additionalProperties, "from_known")
|
|
delete(additionalProperties, "limit")
|
|
delete(additionalProperties, "to")
|
|
delete(additionalProperties, "to_known")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphDiffIn struct {
|
|
value *GraphGraphDiffIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffIn) Get() *GraphGraphDiffIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffIn) Set(val *GraphGraphDiffIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphDiffIn(val *GraphGraphDiffIn) *NullableGraphGraphDiffIn {
|
|
return &NullableGraphGraphDiffIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphDiffIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphDiffIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|