Files
sdk/model_graph_graph_entity_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 GraphGraphEntityOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphEntityOut{}
// GraphGraphEntityOut struct for GraphGraphEntityOut
type GraphGraphEntityOut struct {
// AsKnown is the knowledge instant this state was resolved at, RFC 3339.
AsKnown *string `json:"as_known,omitempty"`
// AsOf is the valid instant this state was resolved at, RFC 3339.
AsOf *string `json:"as_of,omitempty"`
// Entity is the folded entity key the question named.
Entity *string `json:"entity,omitempty"`
// Expired is every statement about the entity that was known by AsKnown and begun by AsOf but no longer holds at AsOf because its until passed, a retraction ended it, or a later statement superseded it.
Expired []GraphWireFact `json:"expired,omitempty"`
// Incoming is every in-force edge pointing at the entity at the point, ordered by source entity and relation key.
Incoming []GraphWireFact `json:"incoming,omitempty"`
// Known is true when at least one property, outgoing edge, incoming edge or expired statement was found for the entity.
Known *bool `json:"known,omitempty"`
// Outgoing is every in-force edge asserted about the entity at the point, ordered by relation key and then winner order.
Outgoing []GraphWireFact `json:"outgoing,omitempty"`
// Properties is every in-force scalar property of the entity at the point, ordered by relation key.
Properties []GraphGraphEntityProperty `json:"properties,omitempty"`
// Scorecard is the kinship and closeness scores holding on the entity, highest score first.
Scorecard []GraphGraphKinshipScore `json:"scorecard,omitempty"`
// Truncated says the read of outgoing or incoming assertions hit the walk ceiling.
Truncated *bool `json:"truncated,omitempty"`
// Type is the winning `type` of the entity at the point. Absent when no type holds.
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphEntityOut GraphGraphEntityOut
// NewGraphGraphEntityOut instantiates a new GraphGraphEntityOut 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 NewGraphGraphEntityOut() *GraphGraphEntityOut {
this := GraphGraphEntityOut{}
return &this
}
// NewGraphGraphEntityOutWithDefaults instantiates a new GraphGraphEntityOut 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 NewGraphGraphEntityOutWithDefaults() *GraphGraphEntityOut {
this := GraphGraphEntityOut{}
return &this
}
// GetAsKnown returns the AsKnown field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) SetAsKnown(v string) {
o.AsKnown = &v
}
// GetAsOf returns the AsOf field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) SetAsOf(v string) {
o.AsOf = &v
}
// GetEntity returns the Entity field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) SetEntity(v string) {
o.Entity = &v
}
// GetExpired returns the Expired field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetExpired() []GraphWireFact {
if o == nil || IsNil(o.Expired) {
var ret []GraphWireFact
return ret
}
return o.Expired
}
// GetExpiredOk returns a tuple with the Expired field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetExpiredOk() ([]GraphWireFact, bool) {
if o == nil || IsNil(o.Expired) {
return nil, false
}
return o.Expired, true
}
// HasExpired returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasExpired() bool {
if o != nil && !IsNil(o.Expired) {
return true
}
return false
}
// SetExpired gets a reference to the given []GraphWireFact and assigns it to the Expired field.
func (o *GraphGraphEntityOut) SetExpired(v []GraphWireFact) {
o.Expired = v
}
// GetIncoming returns the Incoming field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetIncoming() []GraphWireFact {
if o == nil || IsNil(o.Incoming) {
var ret []GraphWireFact
return ret
}
return o.Incoming
}
// GetIncomingOk returns a tuple with the Incoming field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetIncomingOk() ([]GraphWireFact, bool) {
if o == nil || IsNil(o.Incoming) {
return nil, false
}
return o.Incoming, true
}
// HasIncoming returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasIncoming() bool {
if o != nil && !IsNil(o.Incoming) {
return true
}
return false
}
// SetIncoming gets a reference to the given []GraphWireFact and assigns it to the Incoming field.
func (o *GraphGraphEntityOut) SetIncoming(v []GraphWireFact) {
o.Incoming = v
}
// GetKnown returns the Known field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) SetKnown(v bool) {
o.Known = &v
}
// GetOutgoing returns the Outgoing field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetOutgoing() []GraphWireFact {
if o == nil || IsNil(o.Outgoing) {
var ret []GraphWireFact
return ret
}
return o.Outgoing
}
// GetOutgoingOk returns a tuple with the Outgoing field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetOutgoingOk() ([]GraphWireFact, bool) {
if o == nil || IsNil(o.Outgoing) {
return nil, false
}
return o.Outgoing, true
}
// HasOutgoing returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasOutgoing() bool {
if o != nil && !IsNil(o.Outgoing) {
return true
}
return false
}
// SetOutgoing gets a reference to the given []GraphWireFact and assigns it to the Outgoing field.
func (o *GraphGraphEntityOut) SetOutgoing(v []GraphWireFact) {
o.Outgoing = v
}
// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetProperties() []GraphGraphEntityProperty {
if o == nil || IsNil(o.Properties) {
var ret []GraphGraphEntityProperty
return ret
}
return o.Properties
}
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetPropertiesOk() ([]GraphGraphEntityProperty, bool) {
if o == nil || IsNil(o.Properties) {
return nil, false
}
return o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasProperties() bool {
if o != nil && !IsNil(o.Properties) {
return true
}
return false
}
// SetProperties gets a reference to the given []GraphGraphEntityProperty and assigns it to the Properties field.
func (o *GraphGraphEntityOut) SetProperties(v []GraphGraphEntityProperty) {
o.Properties = v
}
// GetScorecard returns the Scorecard field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetScorecard() []GraphGraphKinshipScore {
if o == nil || IsNil(o.Scorecard) {
var ret []GraphGraphKinshipScore
return ret
}
return o.Scorecard
}
// GetScorecardOk returns a tuple with the Scorecard field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetScorecardOk() ([]GraphGraphKinshipScore, bool) {
if o == nil || IsNil(o.Scorecard) {
return nil, false
}
return o.Scorecard, true
}
// HasScorecard returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasScorecard() bool {
if o != nil && !IsNil(o.Scorecard) {
return true
}
return false
}
// SetScorecard gets a reference to the given []GraphGraphKinshipScore and assigns it to the Scorecard field.
func (o *GraphGraphEntityOut) SetScorecard(v []GraphGraphKinshipScore) {
o.Scorecard = v
}
// GetTruncated returns the Truncated field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) 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 *GraphGraphEntityOut) SetTruncated(v bool) {
o.Truncated = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *GraphGraphEntityOut) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphEntityOut) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *GraphGraphEntityOut) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *GraphGraphEntityOut) SetType(v string) {
o.Type = &v
}
func (o GraphGraphEntityOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphEntityOut) 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.Entity) {
toSerialize["entity"] = o.Entity
}
if !IsNil(o.Expired) {
toSerialize["expired"] = o.Expired
}
if !IsNil(o.Incoming) {
toSerialize["incoming"] = o.Incoming
}
if !IsNil(o.Known) {
toSerialize["known"] = o.Known
}
if !IsNil(o.Outgoing) {
toSerialize["outgoing"] = o.Outgoing
}
if !IsNil(o.Properties) {
toSerialize["properties"] = o.Properties
}
if !IsNil(o.Scorecard) {
toSerialize["scorecard"] = o.Scorecard
}
if !IsNil(o.Truncated) {
toSerialize["truncated"] = o.Truncated
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphEntityOut) UnmarshalJSON(data []byte) (err error) {
varGraphGraphEntityOut := _GraphGraphEntityOut{}
err = json.Unmarshal(data, &varGraphGraphEntityOut)
if err != nil {
return err
}
*o = GraphGraphEntityOut(varGraphGraphEntityOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "as_known")
delete(additionalProperties, "as_of")
delete(additionalProperties, "entity")
delete(additionalProperties, "expired")
delete(additionalProperties, "incoming")
delete(additionalProperties, "known")
delete(additionalProperties, "outgoing")
delete(additionalProperties, "properties")
delete(additionalProperties, "scorecard")
delete(additionalProperties, "truncated")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphEntityOut struct {
value *GraphGraphEntityOut
isSet bool
}
func (v NullableGraphGraphEntityOut) Get() *GraphGraphEntityOut {
return v.value
}
func (v *NullableGraphGraphEntityOut) Set(val *GraphGraphEntityOut) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphEntityOut) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphEntityOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphEntityOut(val *GraphGraphEntityOut) *NullableGraphGraphEntityOut {
return &NullableGraphGraphEntityOut{value: val, isSet: true}
}
func (v NullableGraphGraphEntityOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphEntityOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}