mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
611 lines
16 KiB
Go
611 lines
16 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 GraphWireFact type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphWireFact{}
|
|
|
|
// GraphWireFact struct for GraphWireFact
|
|
type GraphWireFact struct {
|
|
// At is when the thing was so, RFC 3339, as the asserter gave it.
|
|
At *string `json:"at,omitempty"`
|
|
// By is the identity that filed it — `owner` or `owner/user` — stamped from the validated principal at the write, never from the body.
|
|
By *string `json:"by,omitempty"`
|
|
// Confidence in [0,1] as the asserter gave it; absent is 0. It breaks a tie between two assertions equally knowable and decides nothing else.
|
|
Confidence *float64 `json:"confidence,omitempty"`
|
|
// Entity is the thing described, in the organization's own namespace.
|
|
Entity *string `json:"entity,omitempty"`
|
|
// Evidence points at the record the claim came from. Absent when the asserter gave none.
|
|
Evidence *string `json:"evidence,omitempty"`
|
|
// ID is the assertion's content address, minted by the server from what was asserted. Two callers who assert the identical thing land on one ID and one row; changing any asserted field makes a different ID and a second row.
|
|
Id *string `json:"id,omitempty"`
|
|
// Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. Derived and never supplied, which is what stops history filed today from being backdated into a past read.
|
|
Knowable *string `json:"knowable,omitempty"`
|
|
// Names true means the assertion is an edge and Value is an entity. A walk reads only these.
|
|
Names *bool `json:"names,omitempty"`
|
|
// Relation is what was asserted of it.
|
|
Relation *string `json:"relation,omitempty"`
|
|
// Seen is when the asserter says it became knowable, RFC 3339. Provenance only — Knowable is what an as-of read is bounded by.
|
|
Seen *string `json:"seen,omitempty"`
|
|
// Source names who asserted, as the caller gave it. This plane ranks no source above another, so it never outweighs a later Knowable.
|
|
Source *string `json:"source,omitempty"`
|
|
// Until is when the thing stopped being so, RFC 3339, as the asserter gave it. Absent is open.
|
|
Until *string `json:"until,omitempty"`
|
|
// Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
|
|
Value *string `json:"value,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphWireFact GraphWireFact
|
|
|
|
// NewGraphWireFact instantiates a new GraphWireFact 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 NewGraphWireFact() *GraphWireFact {
|
|
this := GraphWireFact{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphWireFactWithDefaults instantiates a new GraphWireFact 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 NewGraphWireFactWithDefaults() *GraphWireFact {
|
|
this := GraphWireFact{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetAt() string {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given string and assigns it to the At field.
|
|
func (o *GraphWireFact) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBy returns the By field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetBy() string {
|
|
if o == nil || IsNil(o.By) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.By
|
|
}
|
|
|
|
// GetByOk returns a tuple with the By field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.By) {
|
|
return nil, false
|
|
}
|
|
return o.By, true
|
|
}
|
|
|
|
// HasBy returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasBy() bool {
|
|
if o != nil && !IsNil(o.By) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBy gets a reference to the given string and assigns it to the By field.
|
|
func (o *GraphWireFact) SetBy(v string) {
|
|
o.By = &v
|
|
}
|
|
|
|
// GetConfidence returns the Confidence field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetConfidence() float64 {
|
|
if o == nil || IsNil(o.Confidence) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Confidence
|
|
}
|
|
|
|
// GetConfidenceOk returns a tuple with the Confidence field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetConfidenceOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Confidence) {
|
|
return nil, false
|
|
}
|
|
return o.Confidence, true
|
|
}
|
|
|
|
// HasConfidence returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasConfidence() bool {
|
|
if o != nil && !IsNil(o.Confidence) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConfidence gets a reference to the given float64 and assigns it to the Confidence field.
|
|
func (o *GraphWireFact) SetConfidence(v float64) {
|
|
o.Confidence = &v
|
|
}
|
|
|
|
// GetEntity returns the Entity field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) SetEntity(v string) {
|
|
o.Entity = &v
|
|
}
|
|
|
|
// GetEvidence returns the Evidence field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetEvidence() string {
|
|
if o == nil || IsNil(o.Evidence) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Evidence
|
|
}
|
|
|
|
// GetEvidenceOk returns a tuple with the Evidence field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetEvidenceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Evidence) {
|
|
return nil, false
|
|
}
|
|
return o.Evidence, true
|
|
}
|
|
|
|
// HasEvidence returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasEvidence() bool {
|
|
if o != nil && !IsNil(o.Evidence) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvidence gets a reference to the given string and assigns it to the Evidence field.
|
|
func (o *GraphWireFact) SetEvidence(v string) {
|
|
o.Evidence = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *GraphWireFact) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKnowable returns the Knowable field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetKnowable() string {
|
|
if o == nil || IsNil(o.Knowable) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Knowable
|
|
}
|
|
|
|
// GetKnowableOk returns a tuple with the Knowable field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetKnowableOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Knowable) {
|
|
return nil, false
|
|
}
|
|
return o.Knowable, true
|
|
}
|
|
|
|
// HasKnowable returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasKnowable() bool {
|
|
if o != nil && !IsNil(o.Knowable) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKnowable gets a reference to the given string and assigns it to the Knowable field.
|
|
func (o *GraphWireFact) SetKnowable(v string) {
|
|
o.Knowable = &v
|
|
}
|
|
|
|
// GetNames returns the Names field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetNames() bool {
|
|
if o == nil || IsNil(o.Names) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Names
|
|
}
|
|
|
|
// GetNamesOk returns a tuple with the Names field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetNamesOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Names) {
|
|
return nil, false
|
|
}
|
|
return o.Names, true
|
|
}
|
|
|
|
// HasNames returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasNames() bool {
|
|
if o != nil && !IsNil(o.Names) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNames gets a reference to the given bool and assigns it to the Names field.
|
|
func (o *GraphWireFact) SetNames(v bool) {
|
|
o.Names = &v
|
|
}
|
|
|
|
// GetRelation returns the Relation field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) SetRelation(v string) {
|
|
o.Relation = &v
|
|
}
|
|
|
|
// GetSeen returns the Seen field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetSeen() string {
|
|
if o == nil || IsNil(o.Seen) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Seen
|
|
}
|
|
|
|
// GetSeenOk returns a tuple with the Seen field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetSeenOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Seen) {
|
|
return nil, false
|
|
}
|
|
return o.Seen, true
|
|
}
|
|
|
|
// HasSeen returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasSeen() bool {
|
|
if o != nil && !IsNil(o.Seen) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSeen gets a reference to the given string and assigns it to the Seen field.
|
|
func (o *GraphWireFact) SetSeen(v string) {
|
|
o.Seen = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *GraphWireFact) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetUntil returns the Until field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) 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 *GraphWireFact) SetUntil(v string) {
|
|
o.Until = &v
|
|
}
|
|
|
|
// GetValue returns the Value field value if set, zero value otherwise.
|
|
func (o *GraphWireFact) GetValue() string {
|
|
if o == nil || IsNil(o.Value) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Value
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphWireFact) GetValueOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Value) {
|
|
return nil, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// HasValue returns a boolean if a field has been set.
|
|
func (o *GraphWireFact) HasValue() bool {
|
|
if o != nil && !IsNil(o.Value) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValue gets a reference to the given string and assigns it to the Value field.
|
|
func (o *GraphWireFact) SetValue(v string) {
|
|
o.Value = &v
|
|
}
|
|
|
|
func (o GraphWireFact) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphWireFact) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.By) {
|
|
toSerialize["by"] = o.By
|
|
}
|
|
if !IsNil(o.Confidence) {
|
|
toSerialize["confidence"] = o.Confidence
|
|
}
|
|
if !IsNil(o.Entity) {
|
|
toSerialize["entity"] = o.Entity
|
|
}
|
|
if !IsNil(o.Evidence) {
|
|
toSerialize["evidence"] = o.Evidence
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Knowable) {
|
|
toSerialize["knowable"] = o.Knowable
|
|
}
|
|
if !IsNil(o.Names) {
|
|
toSerialize["names"] = o.Names
|
|
}
|
|
if !IsNil(o.Relation) {
|
|
toSerialize["relation"] = o.Relation
|
|
}
|
|
if !IsNil(o.Seen) {
|
|
toSerialize["seen"] = o.Seen
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Until) {
|
|
toSerialize["until"] = o.Until
|
|
}
|
|
if !IsNil(o.Value) {
|
|
toSerialize["value"] = o.Value
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphWireFact) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphWireFact := _GraphWireFact{}
|
|
|
|
err = json.Unmarshal(data, &varGraphWireFact)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphWireFact(varGraphWireFact)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "by")
|
|
delete(additionalProperties, "confidence")
|
|
delete(additionalProperties, "entity")
|
|
delete(additionalProperties, "evidence")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "knowable")
|
|
delete(additionalProperties, "names")
|
|
delete(additionalProperties, "relation")
|
|
delete(additionalProperties, "seen")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "until")
|
|
delete(additionalProperties, "value")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphWireFact struct {
|
|
value *GraphWireFact
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphWireFact) Get() *GraphWireFact {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphWireFact) Set(val *GraphWireFact) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphWireFact) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphWireFact) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphWireFact(val *GraphWireFact) *NullableGraphWireFact {
|
|
return &NullableGraphWireFact{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphWireFact) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphWireFact) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|