mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.5 KiB
Go
193 lines
5.5 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 GraphGraphReadOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphReadOut{}
|
|
|
|
// GraphGraphReadOut struct for GraphGraphReadOut
|
|
type GraphGraphReadOut struct {
|
|
// Assertions are the matching rows: a read's in the order they were written, oldest first; a search's best match first. Every version is here: this resolves nothing and withholds nothing, so a superseded claim and the one that superseded it both appear.
|
|
Assertions []GraphWireFact `json:"assertions,omitempty"`
|
|
// Truncated says more assertions matched than came back: the limit, or the ceiling, stopped the read. Narrow it, or page by as_known, to see the rest; a search that stopped kept the best matches.
|
|
Truncated *bool `json:"truncated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphReadOut GraphGraphReadOut
|
|
|
|
// NewGraphGraphReadOut instantiates a new GraphGraphReadOut 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 NewGraphGraphReadOut() *GraphGraphReadOut {
|
|
this := GraphGraphReadOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphReadOutWithDefaults instantiates a new GraphGraphReadOut 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 NewGraphGraphReadOutWithDefaults() *GraphGraphReadOut {
|
|
this := GraphGraphReadOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssertions returns the Assertions field value if set, zero value otherwise.
|
|
func (o *GraphGraphReadOut) GetAssertions() []GraphWireFact {
|
|
if o == nil || IsNil(o.Assertions) {
|
|
var ret []GraphWireFact
|
|
return ret
|
|
}
|
|
return o.Assertions
|
|
}
|
|
|
|
// GetAssertionsOk returns a tuple with the Assertions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphReadOut) GetAssertionsOk() ([]GraphWireFact, bool) {
|
|
if o == nil || IsNil(o.Assertions) {
|
|
return nil, false
|
|
}
|
|
return o.Assertions, true
|
|
}
|
|
|
|
// HasAssertions returns a boolean if a field has been set.
|
|
func (o *GraphGraphReadOut) HasAssertions() bool {
|
|
if o != nil && !IsNil(o.Assertions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssertions gets a reference to the given []GraphWireFact and assigns it to the Assertions field.
|
|
func (o *GraphGraphReadOut) SetAssertions(v []GraphWireFact) {
|
|
o.Assertions = v
|
|
}
|
|
|
|
// GetTruncated returns the Truncated field value if set, zero value otherwise.
|
|
func (o *GraphGraphReadOut) 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 *GraphGraphReadOut) 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 *GraphGraphReadOut) 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 *GraphGraphReadOut) SetTruncated(v bool) {
|
|
o.Truncated = &v
|
|
}
|
|
|
|
func (o GraphGraphReadOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphReadOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assertions) {
|
|
toSerialize["assertions"] = o.Assertions
|
|
}
|
|
if !IsNil(o.Truncated) {
|
|
toSerialize["truncated"] = o.Truncated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphReadOut) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphReadOut := _GraphGraphReadOut{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphReadOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphReadOut(varGraphGraphReadOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assertions")
|
|
delete(additionalProperties, "truncated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphReadOut struct {
|
|
value *GraphGraphReadOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphReadOut) Get() *GraphGraphReadOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphReadOut) Set(val *GraphGraphReadOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphReadOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphReadOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphReadOut(val *GraphGraphReadOut) *NullableGraphGraphReadOut {
|
|
return &NullableGraphGraphReadOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphReadOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphReadOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|