Files
sdk/model_graph_graph_resolve_out.go

497 lines
14 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 GraphGraphResolveOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphResolveOut{}
// GraphGraphResolveOut struct for GraphGraphResolveOut
type GraphGraphResolveOut struct {
// AsKnown is the knowledge instant it was taken at, RFC 3339, the same way.
AsKnown *string `json:"as_known,omitempty"`
// AsOf is the valid instant this answer was taken at, RFC 3339: the one asked for, or the server's clock when none was.
AsOf *string `json:"as_of,omitempty"`
// Conflicts is, for a relation holding one value, every weaker account of the winner's moment that names a different value, strongest first. They lost the order and stay visible, so a disagreement is never resolved into silence.
Conflicts []GraphWireFact `json:"conflicts,omitempty"`
// Contested is true exactly when Conflicts is not empty.
Contested *bool `json:"contested,omitempty"`
// Entity is the entity the question named, echoed so a stored answer still says what it is about.
Entity *string `json:"entity,omitempty"`
// Held is every statement holding at the point, Winner first, one per value: one for a relation that holds one value at a time, and every one the pair holds for a relation that holds many — the five holders of a position over five terms are five.
Held []GraphWireFact `json:"held,omitempty"`
// Known is false when nothing held at the point. That is an answer, not an error.
Known *bool `json:"known,omitempty"`
// Relation is the relation the question named, echoed for the same reason.
Relation *string `json:"relation,omitempty"`
// Truncated says this pair holds more statements than one read returns, so the answer was decided from the ceiling-full begun most recently. It is reported because a provenance plane that trims silently is a plane that answers confidently and wrongly; narrow the question with as_of to see what it dropped.
Truncated *bool `json:"truncated,omitempty"`
// Winner is the statement holding at the point that began most recently, then the strongest under the order `rule` names. Absent exactly when Known is false.
Winner *GraphWireFact `json:"winner,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphResolveOut GraphGraphResolveOut
// NewGraphGraphResolveOut instantiates a new GraphGraphResolveOut 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 NewGraphGraphResolveOut() *GraphGraphResolveOut {
this := GraphGraphResolveOut{}
return &this
}
// NewGraphGraphResolveOutWithDefaults instantiates a new GraphGraphResolveOut 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 NewGraphGraphResolveOutWithDefaults() *GraphGraphResolveOut {
this := GraphGraphResolveOut{}
return &this
}
// GetAsKnown returns the AsKnown field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetAsKnown() string {
if o == nil || IsNil(o.AsKnown) {
var ret string
return ret
}
return *o.AsKnown
}
// GetAsKnownOk returns a tuple with the AsKnown field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetAsKnownOk() (*string, bool) {
if o == nil || IsNil(o.AsKnown) {
return nil, false
}
return o.AsKnown, true
}
// HasAsKnown returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasAsKnown() bool {
if o != nil && !IsNil(o.AsKnown) {
return true
}
return false
}
// SetAsKnown gets a reference to the given string and assigns it to the AsKnown field.
func (o *GraphGraphResolveOut) SetAsKnown(v string) {
o.AsKnown = &v
}
// GetAsOf returns the AsOf field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetAsOf() string {
if o == nil || IsNil(o.AsOf) {
var ret string
return ret
}
return *o.AsOf
}
// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetAsOfOk() (*string, bool) {
if o == nil || IsNil(o.AsOf) {
return nil, false
}
return o.AsOf, true
}
// HasAsOf returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasAsOf() bool {
if o != nil && !IsNil(o.AsOf) {
return true
}
return false
}
// SetAsOf gets a reference to the given string and assigns it to the AsOf field.
func (o *GraphGraphResolveOut) SetAsOf(v string) {
o.AsOf = &v
}
// GetConflicts returns the Conflicts field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetConflicts() []GraphWireFact {
if o == nil || IsNil(o.Conflicts) {
var ret []GraphWireFact
return ret
}
return o.Conflicts
}
// GetConflictsOk returns a tuple with the Conflicts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetConflictsOk() ([]GraphWireFact, bool) {
if o == nil || IsNil(o.Conflicts) {
return nil, false
}
return o.Conflicts, true
}
// HasConflicts returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasConflicts() bool {
if o != nil && !IsNil(o.Conflicts) {
return true
}
return false
}
// SetConflicts gets a reference to the given []GraphWireFact and assigns it to the Conflicts field.
func (o *GraphGraphResolveOut) SetConflicts(v []GraphWireFact) {
o.Conflicts = v
}
// GetContested returns the Contested field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetContested() bool {
if o == nil || IsNil(o.Contested) {
var ret bool
return ret
}
return *o.Contested
}
// GetContestedOk returns a tuple with the Contested field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetContestedOk() (*bool, bool) {
if o == nil || IsNil(o.Contested) {
return nil, false
}
return o.Contested, true
}
// HasContested returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasContested() bool {
if o != nil && !IsNil(o.Contested) {
return true
}
return false
}
// SetContested gets a reference to the given bool and assigns it to the Contested field.
func (o *GraphGraphResolveOut) SetContested(v bool) {
o.Contested = &v
}
// GetEntity returns the Entity field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) 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 *GraphGraphResolveOut) 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 *GraphGraphResolveOut) 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 *GraphGraphResolveOut) SetEntity(v string) {
o.Entity = &v
}
// GetHeld returns the Held field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetHeld() []GraphWireFact {
if o == nil || IsNil(o.Held) {
var ret []GraphWireFact
return ret
}
return o.Held
}
// GetHeldOk returns a tuple with the Held field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetHeldOk() ([]GraphWireFact, bool) {
if o == nil || IsNil(o.Held) {
return nil, false
}
return o.Held, true
}
// HasHeld returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasHeld() bool {
if o != nil && !IsNil(o.Held) {
return true
}
return false
}
// SetHeld gets a reference to the given []GraphWireFact and assigns it to the Held field.
func (o *GraphGraphResolveOut) SetHeld(v []GraphWireFact) {
o.Held = v
}
// GetKnown returns the Known field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetKnown() bool {
if o == nil || IsNil(o.Known) {
var ret bool
return ret
}
return *o.Known
}
// GetKnownOk returns a tuple with the Known field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetKnownOk() (*bool, bool) {
if o == nil || IsNil(o.Known) {
return nil, false
}
return o.Known, true
}
// HasKnown returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasKnown() bool {
if o != nil && !IsNil(o.Known) {
return true
}
return false
}
// SetKnown gets a reference to the given bool and assigns it to the Known field.
func (o *GraphGraphResolveOut) SetKnown(v bool) {
o.Known = &v
}
// GetRelation returns the Relation field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetRelation() string {
if o == nil || IsNil(o.Relation) {
var ret string
return ret
}
return *o.Relation
}
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetRelationOk() (*string, bool) {
if o == nil || IsNil(o.Relation) {
return nil, false
}
return o.Relation, true
}
// HasRelation returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasRelation() bool {
if o != nil && !IsNil(o.Relation) {
return true
}
return false
}
// SetRelation gets a reference to the given string and assigns it to the Relation field.
func (o *GraphGraphResolveOut) SetRelation(v string) {
o.Relation = &v
}
// GetTruncated returns the Truncated field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) 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 *GraphGraphResolveOut) 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 *GraphGraphResolveOut) 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 *GraphGraphResolveOut) SetTruncated(v bool) {
o.Truncated = &v
}
// GetWinner returns the Winner field value if set, zero value otherwise.
func (o *GraphGraphResolveOut) GetWinner() GraphWireFact {
if o == nil || IsNil(o.Winner) {
var ret GraphWireFact
return ret
}
return *o.Winner
}
// GetWinnerOk returns a tuple with the Winner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphResolveOut) GetWinnerOk() (*GraphWireFact, bool) {
if o == nil || IsNil(o.Winner) {
return nil, false
}
return o.Winner, true
}
// HasWinner returns a boolean if a field has been set.
func (o *GraphGraphResolveOut) HasWinner() bool {
if o != nil && !IsNil(o.Winner) {
return true
}
return false
}
// SetWinner gets a reference to the given GraphWireFact and assigns it to the Winner field.
func (o *GraphGraphResolveOut) SetWinner(v GraphWireFact) {
o.Winner = &v
}
func (o GraphGraphResolveOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphResolveOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AsKnown) {
toSerialize["as_known"] = o.AsKnown
}
if !IsNil(o.AsOf) {
toSerialize["as_of"] = o.AsOf
}
if !IsNil(o.Conflicts) {
toSerialize["conflicts"] = o.Conflicts
}
if !IsNil(o.Contested) {
toSerialize["contested"] = o.Contested
}
if !IsNil(o.Entity) {
toSerialize["entity"] = o.Entity
}
if !IsNil(o.Held) {
toSerialize["held"] = o.Held
}
if !IsNil(o.Known) {
toSerialize["known"] = o.Known
}
if !IsNil(o.Relation) {
toSerialize["relation"] = o.Relation
}
if !IsNil(o.Truncated) {
toSerialize["truncated"] = o.Truncated
}
if !IsNil(o.Winner) {
toSerialize["winner"] = o.Winner
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphResolveOut) UnmarshalJSON(data []byte) (err error) {
varGraphGraphResolveOut := _GraphGraphResolveOut{}
err = json.Unmarshal(data, &varGraphGraphResolveOut)
if err != nil {
return err
}
*o = GraphGraphResolveOut(varGraphGraphResolveOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "as_known")
delete(additionalProperties, "as_of")
delete(additionalProperties, "conflicts")
delete(additionalProperties, "contested")
delete(additionalProperties, "entity")
delete(additionalProperties, "held")
delete(additionalProperties, "known")
delete(additionalProperties, "relation")
delete(additionalProperties, "truncated")
delete(additionalProperties, "winner")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphResolveOut struct {
value *GraphGraphResolveOut
isSet bool
}
func (v NullableGraphGraphResolveOut) Get() *GraphGraphResolveOut {
return v.value
}
func (v *NullableGraphGraphResolveOut) Set(val *GraphGraphResolveOut) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphResolveOut) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphResolveOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphResolveOut(val *GraphGraphResolveOut) *NullableGraphGraphResolveOut {
return &NullableGraphGraphResolveOut{value: val, isSet: true}
}
func (v NullableGraphGraphResolveOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphResolveOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}