Files
sdk/model_graph_graph_assert_out.go

269 lines
7.7 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 GraphGraphAssertOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphAssertOut{}
// GraphGraphAssertOut struct for GraphGraphAssertOut
type GraphGraphAssertOut struct {
// Duplicate is how many members this plane already held. A redelivery collides on its content address and is counted here, not refused: it is the success a retrying caller depends on.
Duplicate *int64 `json:"duplicate,omitempty"`
// Reasons names why each refused member was refused, in the order sent.
Reasons []string `json:"reasons,omitempty"`
// Recorded is how many members became new rows.
Recorded *int64 `json:"recorded,omitempty"`
// Refused is how many members were turned away — a missing entity, a timestamp that is not RFC 3339, a confidence outside [0,1], a relation whose declared domain or range the entity's type does not meet, or a declaration from a caller who is not an admin of the organization. The rest of the batch was still recorded; a batch refused whole answers 400, or 403 when a member of it was refused for want of authority.
Refused *int64 `json:"refused,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphAssertOut GraphGraphAssertOut
// NewGraphGraphAssertOut instantiates a new GraphGraphAssertOut 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 NewGraphGraphAssertOut() *GraphGraphAssertOut {
this := GraphGraphAssertOut{}
return &this
}
// NewGraphGraphAssertOutWithDefaults instantiates a new GraphGraphAssertOut 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 NewGraphGraphAssertOutWithDefaults() *GraphGraphAssertOut {
this := GraphGraphAssertOut{}
return &this
}
// GetDuplicate returns the Duplicate field value if set, zero value otherwise.
func (o *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) SetDuplicate(v int64) {
o.Duplicate = &v
}
// GetReasons returns the Reasons field value if set, zero value otherwise.
func (o *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) SetReasons(v []string) {
o.Reasons = v
}
// GetRecorded returns the Recorded field value if set, zero value otherwise.
func (o *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) SetRecorded(v int64) {
o.Recorded = &v
}
// GetRefused returns the Refused field value if set, zero value otherwise.
func (o *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) 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 *GraphGraphAssertOut) SetRefused(v int64) {
o.Refused = &v
}
func (o GraphGraphAssertOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphAssertOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
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 *GraphGraphAssertOut) UnmarshalJSON(data []byte) (err error) {
varGraphGraphAssertOut := _GraphGraphAssertOut{}
err = json.Unmarshal(data, &varGraphGraphAssertOut)
if err != nil {
return err
}
*o = GraphGraphAssertOut(varGraphGraphAssertOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "duplicate")
delete(additionalProperties, "reasons")
delete(additionalProperties, "recorded")
delete(additionalProperties, "refused")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphAssertOut struct {
value *GraphGraphAssertOut
isSet bool
}
func (v NullableGraphGraphAssertOut) Get() *GraphGraphAssertOut {
return v.value
}
func (v *NullableGraphGraphAssertOut) Set(val *GraphGraphAssertOut) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphAssertOut) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphAssertOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphAssertOut(val *GraphGraphAssertOut) *NullableGraphGraphAssertOut {
return &NullableGraphGraphAssertOut{value: val, isSet: true}
}
func (v NullableGraphGraphAssertOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphAssertOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}