Files
sdk/model_graph_graph_derive_out.go

535 lines
15 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 GraphGraphDeriveOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphDeriveOut{}
// GraphGraphDeriveOut struct for GraphGraphDeriveOut
type GraphGraphDeriveOut struct {
// AsKnown is the knowledge instant it was taken at, RFC 3339, the same way.
AsKnown *string `json:"as_known,omitempty"`
// AsOf is the instant the graph was read at, RFC 3339: the one asked for, or the server's clock when none was.
AsOf *string `json:"as_of,omitempty"`
// Bound is the most tuples one evaluation derives.
Bound *int64 `json:"bound,omitempty"`
// Cut names the bound that stopped it: `tuples`, at Bound tuples derived, or `steps`, at Steps rows examined. Absent exactly when Truncated is false.
Cut *string `json:"cut,omitempty"`
// Derived is every tuple of the predicates asked for that the rules derive, ordered by predicate, subject and object. A tuple an assertion already states is asserted, not derived, and is not here.
Derived []GraphGraphConclusion `json:"derived,omitempty"`
// Filed is what filing Derived did, member by member as an assertion batch reports it. Absent unless file was asked.
Filed *GraphGraphAssertOut `json:"filed,omitempty"`
// Gained is each that holds only without them — a negation those assertions had been refuting. Empty when Without is absent.
Gained []GraphGraphAtom `json:"gained,omitempty"`
// Lemmas is every derived tuple of any other predicate a proof in Derived cites, in the same order, so every support that is not an assertion can be followed to a proof.
Lemmas []GraphGraphConclusion `json:"lemmas,omitempty"`
// Lost is each tuple of the predicates asked for, asserted or derived, that holds with everything and not without the assertions Without names. Empty when Without is absent.
Lost []GraphGraphAtom `json:"lost,omitempty"`
// Steps is the most rows one evaluation's joins examine.
Steps *int64 `json:"steps,omitempty"`
// Truncated says a bound stopped the evaluation before its fixpoint. Every tuple listed still holds; some that hold are missing.
Truncated *bool `json:"truncated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphDeriveOut GraphGraphDeriveOut
// NewGraphGraphDeriveOut instantiates a new GraphGraphDeriveOut 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 NewGraphGraphDeriveOut() *GraphGraphDeriveOut {
this := GraphGraphDeriveOut{}
return &this
}
// NewGraphGraphDeriveOutWithDefaults instantiates a new GraphGraphDeriveOut 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 NewGraphGraphDeriveOutWithDefaults() *GraphGraphDeriveOut {
this := GraphGraphDeriveOut{}
return &this
}
// GetAsKnown returns the AsKnown field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) SetAsKnown(v string) {
o.AsKnown = &v
}
// GetAsOf returns the AsOf field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) SetAsOf(v string) {
o.AsOf = &v
}
// GetBound returns the Bound field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) SetBound(v int64) {
o.Bound = &v
}
// GetCut returns the Cut field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetCut() string {
if o == nil || IsNil(o.Cut) {
var ret string
return ret
}
return *o.Cut
}
// GetCutOk returns a tuple with the Cut field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetCutOk() (*string, bool) {
if o == nil || IsNil(o.Cut) {
return nil, false
}
return o.Cut, true
}
// HasCut returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasCut() bool {
if o != nil && !IsNil(o.Cut) {
return true
}
return false
}
// SetCut gets a reference to the given string and assigns it to the Cut field.
func (o *GraphGraphDeriveOut) SetCut(v string) {
o.Cut = &v
}
// GetDerived returns the Derived field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetDerived() []GraphGraphConclusion {
if o == nil || IsNil(o.Derived) {
var ret []GraphGraphConclusion
return ret
}
return o.Derived
}
// GetDerivedOk returns a tuple with the Derived field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetDerivedOk() ([]GraphGraphConclusion, bool) {
if o == nil || IsNil(o.Derived) {
return nil, false
}
return o.Derived, true
}
// HasDerived returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasDerived() bool {
if o != nil && !IsNil(o.Derived) {
return true
}
return false
}
// SetDerived gets a reference to the given []GraphGraphConclusion and assigns it to the Derived field.
func (o *GraphGraphDeriveOut) SetDerived(v []GraphGraphConclusion) {
o.Derived = v
}
// GetFiled returns the Filed field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetFiled() GraphGraphAssertOut {
if o == nil || IsNil(o.Filed) {
var ret GraphGraphAssertOut
return ret
}
return *o.Filed
}
// GetFiledOk returns a tuple with the Filed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetFiledOk() (*GraphGraphAssertOut, bool) {
if o == nil || IsNil(o.Filed) {
return nil, false
}
return o.Filed, true
}
// HasFiled returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasFiled() bool {
if o != nil && !IsNil(o.Filed) {
return true
}
return false
}
// SetFiled gets a reference to the given GraphGraphAssertOut and assigns it to the Filed field.
func (o *GraphGraphDeriveOut) SetFiled(v GraphGraphAssertOut) {
o.Filed = &v
}
// GetGained returns the Gained field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetGained() []GraphGraphAtom {
if o == nil || IsNil(o.Gained) {
var ret []GraphGraphAtom
return ret
}
return o.Gained
}
// GetGainedOk returns a tuple with the Gained field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetGainedOk() ([]GraphGraphAtom, bool) {
if o == nil || IsNil(o.Gained) {
return nil, false
}
return o.Gained, true
}
// HasGained returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasGained() bool {
if o != nil && !IsNil(o.Gained) {
return true
}
return false
}
// SetGained gets a reference to the given []GraphGraphAtom and assigns it to the Gained field.
func (o *GraphGraphDeriveOut) SetGained(v []GraphGraphAtom) {
o.Gained = v
}
// GetLemmas returns the Lemmas field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetLemmas() []GraphGraphConclusion {
if o == nil || IsNil(o.Lemmas) {
var ret []GraphGraphConclusion
return ret
}
return o.Lemmas
}
// GetLemmasOk returns a tuple with the Lemmas field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetLemmasOk() ([]GraphGraphConclusion, bool) {
if o == nil || IsNil(o.Lemmas) {
return nil, false
}
return o.Lemmas, true
}
// HasLemmas returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasLemmas() bool {
if o != nil && !IsNil(o.Lemmas) {
return true
}
return false
}
// SetLemmas gets a reference to the given []GraphGraphConclusion and assigns it to the Lemmas field.
func (o *GraphGraphDeriveOut) SetLemmas(v []GraphGraphConclusion) {
o.Lemmas = v
}
// GetLost returns the Lost field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetLost() []GraphGraphAtom {
if o == nil || IsNil(o.Lost) {
var ret []GraphGraphAtom
return ret
}
return o.Lost
}
// GetLostOk returns a tuple with the Lost field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetLostOk() ([]GraphGraphAtom, bool) {
if o == nil || IsNil(o.Lost) {
return nil, false
}
return o.Lost, true
}
// HasLost returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasLost() bool {
if o != nil && !IsNil(o.Lost) {
return true
}
return false
}
// SetLost gets a reference to the given []GraphGraphAtom and assigns it to the Lost field.
func (o *GraphGraphDeriveOut) SetLost(v []GraphGraphAtom) {
o.Lost = v
}
// GetSteps returns the Steps field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) GetSteps() int64 {
if o == nil || IsNil(o.Steps) {
var ret int64
return ret
}
return *o.Steps
}
// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphDeriveOut) GetStepsOk() (*int64, bool) {
if o == nil || IsNil(o.Steps) {
return nil, false
}
return o.Steps, true
}
// HasSteps returns a boolean if a field has been set.
func (o *GraphGraphDeriveOut) HasSteps() bool {
if o != nil && !IsNil(o.Steps) {
return true
}
return false
}
// SetSteps gets a reference to the given int64 and assigns it to the Steps field.
func (o *GraphGraphDeriveOut) SetSteps(v int64) {
o.Steps = &v
}
// GetTruncated returns the Truncated field value if set, zero value otherwise.
func (o *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) 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 *GraphGraphDeriveOut) SetTruncated(v bool) {
o.Truncated = &v
}
func (o GraphGraphDeriveOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphDeriveOut) 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.Bound) {
toSerialize["bound"] = o.Bound
}
if !IsNil(o.Cut) {
toSerialize["cut"] = o.Cut
}
if !IsNil(o.Derived) {
toSerialize["derived"] = o.Derived
}
if !IsNil(o.Filed) {
toSerialize["filed"] = o.Filed
}
if !IsNil(o.Gained) {
toSerialize["gained"] = o.Gained
}
if !IsNil(o.Lemmas) {
toSerialize["lemmas"] = o.Lemmas
}
if !IsNil(o.Lost) {
toSerialize["lost"] = o.Lost
}
if !IsNil(o.Steps) {
toSerialize["steps"] = o.Steps
}
if !IsNil(o.Truncated) {
toSerialize["truncated"] = o.Truncated
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphDeriveOut) UnmarshalJSON(data []byte) (err error) {
varGraphGraphDeriveOut := _GraphGraphDeriveOut{}
err = json.Unmarshal(data, &varGraphGraphDeriveOut)
if err != nil {
return err
}
*o = GraphGraphDeriveOut(varGraphGraphDeriveOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "as_known")
delete(additionalProperties, "as_of")
delete(additionalProperties, "bound")
delete(additionalProperties, "cut")
delete(additionalProperties, "derived")
delete(additionalProperties, "filed")
delete(additionalProperties, "gained")
delete(additionalProperties, "lemmas")
delete(additionalProperties, "lost")
delete(additionalProperties, "steps")
delete(additionalProperties, "truncated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphDeriveOut struct {
value *GraphGraphDeriveOut
isSet bool
}
func (v NullableGraphGraphDeriveOut) Get() *GraphGraphDeriveOut {
return v.value
}
func (v *NullableGraphGraphDeriveOut) Set(val *GraphGraphDeriveOut) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphDeriveOut) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphDeriveOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphDeriveOut(val *GraphGraphDeriveOut) *NullableGraphGraphDeriveOut {
return &NullableGraphGraphDeriveOut{value: val, isSet: true}
}
func (v NullableGraphGraphDeriveOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphDeriveOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}