Files
sdk/model_graph_graph_conclusion.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 GraphGraphConclusion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphConclusion{}
// GraphGraphConclusion struct for GraphGraphConclusion
type GraphGraphConclusion struct {
// Decay is the product of the confidences of the distinct statements the proof rests on: how much certainty survives the derivation. Absent unless every one states a confidence above zero and the proof has at most 1024 atoms.
Decay *float64 `json:"decay,omitempty"`
// From is the latest start among the statements the proof rests on, RFC 3339. What a rule negates has no statement to date it, so a conclusion drawn through a negation may not have held from then.
From *string `json:"from,omitempty"`
// Object is its second argument. Absent for a predicate the rules use with one argument.
Object *string `json:"object,omitempty"`
// Predicate is the relation concluded.
Predicate *string `json:"predicate,omitempty"`
// Rule is the rule that concluded it, `rule:<name>`.
Rule *string `json:"rule,omitempty"`
// RuleID is the ID of the assertion stating that rule's text as it was in force.
RuleId *string `json:"rule_id,omitempty"`
// Subject is the tuple's first argument.
Subject *string `json:"subject,omitempty"`
// Supports are the rule's positive atoms as they matched, in the order the rule writes them. What the rule negates is absent at the point and has no support to cite.
Supports []GraphGraphSupport `json:"supports,omitempty"`
// Until is the earliest until any of those statements states, RFC 3339. Absent is open. A statement a later assertion ends is a later question, asked at a later as_of.
Until *string `json:"until,omitempty"`
// Weakest is the ID of the statement with the lowest confidence among them, the first on a tie: the link the conclusion is only as strong as. Absent exactly when Decay is.
Weakest *string `json:"weakest,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphConclusion GraphGraphConclusion
// NewGraphGraphConclusion instantiates a new GraphGraphConclusion 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 NewGraphGraphConclusion() *GraphGraphConclusion {
this := GraphGraphConclusion{}
return &this
}
// NewGraphGraphConclusionWithDefaults instantiates a new GraphGraphConclusion 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 NewGraphGraphConclusionWithDefaults() *GraphGraphConclusion {
this := GraphGraphConclusion{}
return &this
}
// GetDecay returns the Decay field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetDecay() float64 {
if o == nil || IsNil(o.Decay) {
var ret float64
return ret
}
return *o.Decay
}
// GetDecayOk returns a tuple with the Decay field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetDecayOk() (*float64, bool) {
if o == nil || IsNil(o.Decay) {
return nil, false
}
return o.Decay, true
}
// HasDecay returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasDecay() bool {
if o != nil && !IsNil(o.Decay) {
return true
}
return false
}
// SetDecay gets a reference to the given float64 and assigns it to the Decay field.
func (o *GraphGraphConclusion) SetDecay(v float64) {
o.Decay = &v
}
// GetFrom returns the From field value if set, zero value otherwise.
func (o *GraphGraphConclusion) 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 *GraphGraphConclusion) 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 *GraphGraphConclusion) 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 *GraphGraphConclusion) SetFrom(v string) {
o.From = &v
}
// GetObject returns the Object field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetObject() string {
if o == nil || IsNil(o.Object) {
var ret string
return ret
}
return *o.Object
}
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetObjectOk() (*string, bool) {
if o == nil || IsNil(o.Object) {
return nil, false
}
return o.Object, true
}
// HasObject returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasObject() bool {
if o != nil && !IsNil(o.Object) {
return true
}
return false
}
// SetObject gets a reference to the given string and assigns it to the Object field.
func (o *GraphGraphConclusion) SetObject(v string) {
o.Object = &v
}
// GetPredicate returns the Predicate field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetPredicate() string {
if o == nil || IsNil(o.Predicate) {
var ret string
return ret
}
return *o.Predicate
}
// GetPredicateOk returns a tuple with the Predicate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetPredicateOk() (*string, bool) {
if o == nil || IsNil(o.Predicate) {
return nil, false
}
return o.Predicate, true
}
// HasPredicate returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasPredicate() bool {
if o != nil && !IsNil(o.Predicate) {
return true
}
return false
}
// SetPredicate gets a reference to the given string and assigns it to the Predicate field.
func (o *GraphGraphConclusion) SetPredicate(v string) {
o.Predicate = &v
}
// GetRule returns the Rule field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetRule() string {
if o == nil || IsNil(o.Rule) {
var ret string
return ret
}
return *o.Rule
}
// GetRuleOk returns a tuple with the Rule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetRuleOk() (*string, bool) {
if o == nil || IsNil(o.Rule) {
return nil, false
}
return o.Rule, true
}
// HasRule returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasRule() bool {
if o != nil && !IsNil(o.Rule) {
return true
}
return false
}
// SetRule gets a reference to the given string and assigns it to the Rule field.
func (o *GraphGraphConclusion) SetRule(v string) {
o.Rule = &v
}
// GetRuleId returns the RuleId field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetRuleId() string {
if o == nil || IsNil(o.RuleId) {
var ret string
return ret
}
return *o.RuleId
}
// GetRuleIdOk returns a tuple with the RuleId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetRuleIdOk() (*string, bool) {
if o == nil || IsNil(o.RuleId) {
return nil, false
}
return o.RuleId, true
}
// HasRuleId returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasRuleId() bool {
if o != nil && !IsNil(o.RuleId) {
return true
}
return false
}
// SetRuleId gets a reference to the given string and assigns it to the RuleId field.
func (o *GraphGraphConclusion) SetRuleId(v string) {
o.RuleId = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *GraphGraphConclusion) SetSubject(v string) {
o.Subject = &v
}
// GetSupports returns the Supports field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetSupports() []GraphGraphSupport {
if o == nil || IsNil(o.Supports) {
var ret []GraphGraphSupport
return ret
}
return o.Supports
}
// GetSupportsOk returns a tuple with the Supports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetSupportsOk() ([]GraphGraphSupport, bool) {
if o == nil || IsNil(o.Supports) {
return nil, false
}
return o.Supports, true
}
// HasSupports returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasSupports() bool {
if o != nil && !IsNil(o.Supports) {
return true
}
return false
}
// SetSupports gets a reference to the given []GraphGraphSupport and assigns it to the Supports field.
func (o *GraphGraphConclusion) SetSupports(v []GraphGraphSupport) {
o.Supports = v
}
// GetUntil returns the Until field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetUntil() string {
if o == nil || IsNil(o.Until) {
var ret string
return ret
}
return *o.Until
}
// GetUntilOk returns a tuple with the Until field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetUntilOk() (*string, bool) {
if o == nil || IsNil(o.Until) {
return nil, false
}
return o.Until, true
}
// HasUntil returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasUntil() bool {
if o != nil && !IsNil(o.Until) {
return true
}
return false
}
// SetUntil gets a reference to the given string and assigns it to the Until field.
func (o *GraphGraphConclusion) SetUntil(v string) {
o.Until = &v
}
// GetWeakest returns the Weakest field value if set, zero value otherwise.
func (o *GraphGraphConclusion) GetWeakest() string {
if o == nil || IsNil(o.Weakest) {
var ret string
return ret
}
return *o.Weakest
}
// GetWeakestOk returns a tuple with the Weakest field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphConclusion) GetWeakestOk() (*string, bool) {
if o == nil || IsNil(o.Weakest) {
return nil, false
}
return o.Weakest, true
}
// HasWeakest returns a boolean if a field has been set.
func (o *GraphGraphConclusion) HasWeakest() bool {
if o != nil && !IsNil(o.Weakest) {
return true
}
return false
}
// SetWeakest gets a reference to the given string and assigns it to the Weakest field.
func (o *GraphGraphConclusion) SetWeakest(v string) {
o.Weakest = &v
}
func (o GraphGraphConclusion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphConclusion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Decay) {
toSerialize["decay"] = o.Decay
}
if !IsNil(o.From) {
toSerialize["from"] = o.From
}
if !IsNil(o.Object) {
toSerialize["object"] = o.Object
}
if !IsNil(o.Predicate) {
toSerialize["predicate"] = o.Predicate
}
if !IsNil(o.Rule) {
toSerialize["rule"] = o.Rule
}
if !IsNil(o.RuleId) {
toSerialize["rule_id"] = o.RuleId
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
if !IsNil(o.Supports) {
toSerialize["supports"] = o.Supports
}
if !IsNil(o.Until) {
toSerialize["until"] = o.Until
}
if !IsNil(o.Weakest) {
toSerialize["weakest"] = o.Weakest
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphConclusion) UnmarshalJSON(data []byte) (err error) {
varGraphGraphConclusion := _GraphGraphConclusion{}
err = json.Unmarshal(data, &varGraphGraphConclusion)
if err != nil {
return err
}
*o = GraphGraphConclusion(varGraphGraphConclusion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "decay")
delete(additionalProperties, "from")
delete(additionalProperties, "object")
delete(additionalProperties, "predicate")
delete(additionalProperties, "rule")
delete(additionalProperties, "rule_id")
delete(additionalProperties, "subject")
delete(additionalProperties, "supports")
delete(additionalProperties, "until")
delete(additionalProperties, "weakest")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphConclusion struct {
value *GraphGraphConclusion
isSet bool
}
func (v NullableGraphGraphConclusion) Get() *GraphGraphConclusion {
return v.value
}
func (v *NullableGraphGraphConclusion) Set(val *GraphGraphConclusion) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphConclusion) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphConclusion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphConclusion(val *GraphGraphConclusion) *NullableGraphGraphConclusion {
return &NullableGraphGraphConclusion{value: val, isSet: true}
}
func (v NullableGraphGraphConclusion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphConclusion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}