mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.4 KiB
Go
307 lines
8.4 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 GraphGraphConvoOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphConvoOut{}
|
|
|
|
// GraphGraphConvoOut struct for GraphGraphConvoOut
|
|
type GraphGraphConvoOut struct {
|
|
// Assertions is the assertions extracted from the turns, in turn order.
|
|
Assertions []GraphGraphFact `json:"assertions,omitempty"`
|
|
// Duplicate is how many extracted assertions the store already held.
|
|
Duplicate *int64 `json:"duplicate,omitempty"`
|
|
// Reasons names why each refused assertion was refused, in order.
|
|
Reasons []string `json:"reasons,omitempty"`
|
|
// Recorded is how many extracted assertions became new rows in the store. Zero when DryRun is true.
|
|
Recorded *int64 `json:"recorded,omitempty"`
|
|
// Refused is how many extracted assertions were refused by admission or schema checks.
|
|
Refused *int64 `json:"refused,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphConvoOut GraphGraphConvoOut
|
|
|
|
// NewGraphGraphConvoOut instantiates a new GraphGraphConvoOut 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 NewGraphGraphConvoOut() *GraphGraphConvoOut {
|
|
this := GraphGraphConvoOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphConvoOutWithDefaults instantiates a new GraphGraphConvoOut 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 NewGraphGraphConvoOutWithDefaults() *GraphGraphConvoOut {
|
|
this := GraphGraphConvoOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssertions returns the Assertions field value if set, zero value otherwise.
|
|
func (o *GraphGraphConvoOut) GetAssertions() []GraphGraphFact {
|
|
if o == nil || IsNil(o.Assertions) {
|
|
var ret []GraphGraphFact
|
|
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 *GraphGraphConvoOut) GetAssertionsOk() ([]GraphGraphFact, 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 *GraphGraphConvoOut) HasAssertions() bool {
|
|
if o != nil && !IsNil(o.Assertions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssertions gets a reference to the given []GraphGraphFact and assigns it to the Assertions field.
|
|
func (o *GraphGraphConvoOut) SetAssertions(v []GraphGraphFact) {
|
|
o.Assertions = v
|
|
}
|
|
|
|
// GetDuplicate returns the Duplicate field value if set, zero value otherwise.
|
|
func (o *GraphGraphConvoOut) GetDuplicate() int64 {
|
|
if o == nil || IsNil(o.Duplicate) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Duplicate
|
|
}
|
|
|
|
// GetDuplicateOk returns a tuple with the Duplicate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphConvoOut) GetDuplicateOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Duplicate) {
|
|
return nil, false
|
|
}
|
|
return o.Duplicate, true
|
|
}
|
|
|
|
// HasDuplicate returns a boolean if a field has been set.
|
|
func (o *GraphGraphConvoOut) HasDuplicate() bool {
|
|
if o != nil && !IsNil(o.Duplicate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDuplicate gets a reference to the given int64 and assigns it to the Duplicate field.
|
|
func (o *GraphGraphConvoOut) SetDuplicate(v int64) {
|
|
o.Duplicate = &v
|
|
}
|
|
|
|
// GetReasons returns the Reasons field value if set, zero value otherwise.
|
|
func (o *GraphGraphConvoOut) GetReasons() []string {
|
|
if o == nil || IsNil(o.Reasons) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Reasons
|
|
}
|
|
|
|
// GetReasonsOk returns a tuple with the Reasons field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphConvoOut) GetReasonsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Reasons) {
|
|
return nil, false
|
|
}
|
|
return o.Reasons, true
|
|
}
|
|
|
|
// HasReasons returns a boolean if a field has been set.
|
|
func (o *GraphGraphConvoOut) HasReasons() bool {
|
|
if o != nil && !IsNil(o.Reasons) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReasons gets a reference to the given []string and assigns it to the Reasons field.
|
|
func (o *GraphGraphConvoOut) SetReasons(v []string) {
|
|
o.Reasons = v
|
|
}
|
|
|
|
// GetRecorded returns the Recorded field value if set, zero value otherwise.
|
|
func (o *GraphGraphConvoOut) GetRecorded() int64 {
|
|
if o == nil || IsNil(o.Recorded) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Recorded
|
|
}
|
|
|
|
// GetRecordedOk returns a tuple with the Recorded field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphConvoOut) GetRecordedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Recorded) {
|
|
return nil, false
|
|
}
|
|
return o.Recorded, true
|
|
}
|
|
|
|
// HasRecorded returns a boolean if a field has been set.
|
|
func (o *GraphGraphConvoOut) HasRecorded() bool {
|
|
if o != nil && !IsNil(o.Recorded) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecorded gets a reference to the given int64 and assigns it to the Recorded field.
|
|
func (o *GraphGraphConvoOut) SetRecorded(v int64) {
|
|
o.Recorded = &v
|
|
}
|
|
|
|
// GetRefused returns the Refused field value if set, zero value otherwise.
|
|
func (o *GraphGraphConvoOut) GetRefused() int64 {
|
|
if o == nil || IsNil(o.Refused) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Refused
|
|
}
|
|
|
|
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphConvoOut) GetRefusedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Refused) {
|
|
return nil, false
|
|
}
|
|
return o.Refused, true
|
|
}
|
|
|
|
// HasRefused returns a boolean if a field has been set.
|
|
func (o *GraphGraphConvoOut) HasRefused() bool {
|
|
if o != nil && !IsNil(o.Refused) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefused gets a reference to the given int64 and assigns it to the Refused field.
|
|
func (o *GraphGraphConvoOut) SetRefused(v int64) {
|
|
o.Refused = &v
|
|
}
|
|
|
|
func (o GraphGraphConvoOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphConvoOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assertions) {
|
|
toSerialize["assertions"] = o.Assertions
|
|
}
|
|
if !IsNil(o.Duplicate) {
|
|
toSerialize["duplicate"] = o.Duplicate
|
|
}
|
|
if !IsNil(o.Reasons) {
|
|
toSerialize["reasons"] = o.Reasons
|
|
}
|
|
if !IsNil(o.Recorded) {
|
|
toSerialize["recorded"] = o.Recorded
|
|
}
|
|
if !IsNil(o.Refused) {
|
|
toSerialize["refused"] = o.Refused
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphConvoOut) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphConvoOut := _GraphGraphConvoOut{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphConvoOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphConvoOut(varGraphGraphConvoOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assertions")
|
|
delete(additionalProperties, "duplicate")
|
|
delete(additionalProperties, "reasons")
|
|
delete(additionalProperties, "recorded")
|
|
delete(additionalProperties, "refused")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphConvoOut struct {
|
|
value *GraphGraphConvoOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphConvoOut) Get() *GraphGraphConvoOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphConvoOut) Set(val *GraphGraphConvoOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphConvoOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphConvoOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphConvoOut(val *GraphGraphConvoOut) *NullableGraphGraphConvoOut {
|
|
return &NullableGraphGraphConvoOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphConvoOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphConvoOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|