mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.9 KiB
Go
231 lines
5.9 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 GraphGraphAtom type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphAtom{}
|
|
|
|
// GraphGraphAtom struct for GraphGraphAtom
|
|
type GraphGraphAtom struct {
|
|
// Object is its second argument. Absent for a predicate the rules use with one argument.
|
|
Object *string `json:"object,omitempty"`
|
|
// Predicate is the relation the tuple is of.
|
|
Predicate *string `json:"predicate,omitempty"`
|
|
// Subject is its first argument.
|
|
Subject *string `json:"subject,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphAtom GraphGraphAtom
|
|
|
|
// NewGraphGraphAtom instantiates a new GraphGraphAtom 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 NewGraphGraphAtom() *GraphGraphAtom {
|
|
this := GraphGraphAtom{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphAtomWithDefaults instantiates a new GraphGraphAtom 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 NewGraphGraphAtomWithDefaults() *GraphGraphAtom {
|
|
this := GraphGraphAtom{}
|
|
return &this
|
|
}
|
|
|
|
// GetObject returns the Object field value if set, zero value otherwise.
|
|
func (o *GraphGraphAtom) GetObject() string {
|
|
if o == nil || IsNil(o.Object) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Object
|
|
}
|
|
|
|
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphAtom) GetObjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Object) {
|
|
return nil, false
|
|
}
|
|
return o.Object, true
|
|
}
|
|
|
|
// HasObject returns a boolean if a field has been set.
|
|
func (o *GraphGraphAtom) HasObject() bool {
|
|
if o != nil && !IsNil(o.Object) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetObject gets a reference to the given string and assigns it to the Object field.
|
|
func (o *GraphGraphAtom) SetObject(v string) {
|
|
o.Object = &v
|
|
}
|
|
|
|
// GetPredicate returns the Predicate field value if set, zero value otherwise.
|
|
func (o *GraphGraphAtom) GetPredicate() string {
|
|
if o == nil || IsNil(o.Predicate) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Predicate
|
|
}
|
|
|
|
// GetPredicateOk returns a tuple with the Predicate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphAtom) GetPredicateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Predicate) {
|
|
return nil, false
|
|
}
|
|
return o.Predicate, true
|
|
}
|
|
|
|
// HasPredicate returns a boolean if a field has been set.
|
|
func (o *GraphGraphAtom) HasPredicate() bool {
|
|
if o != nil && !IsNil(o.Predicate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPredicate gets a reference to the given string and assigns it to the Predicate field.
|
|
func (o *GraphGraphAtom) SetPredicate(v string) {
|
|
o.Predicate = &v
|
|
}
|
|
|
|
// GetSubject returns the Subject field value if set, zero value otherwise.
|
|
func (o *GraphGraphAtom) GetSubject() string {
|
|
if o == nil || IsNil(o.Subject) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Subject
|
|
}
|
|
|
|
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphAtom) GetSubjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Subject) {
|
|
return nil, false
|
|
}
|
|
return o.Subject, true
|
|
}
|
|
|
|
// HasSubject returns a boolean if a field has been set.
|
|
func (o *GraphGraphAtom) HasSubject() bool {
|
|
if o != nil && !IsNil(o.Subject) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubject gets a reference to the given string and assigns it to the Subject field.
|
|
func (o *GraphGraphAtom) SetSubject(v string) {
|
|
o.Subject = &v
|
|
}
|
|
|
|
func (o GraphGraphAtom) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphAtom) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Object) {
|
|
toSerialize["object"] = o.Object
|
|
}
|
|
if !IsNil(o.Predicate) {
|
|
toSerialize["predicate"] = o.Predicate
|
|
}
|
|
if !IsNil(o.Subject) {
|
|
toSerialize["subject"] = o.Subject
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphAtom) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphAtom := _GraphGraphAtom{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphAtom)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphAtom(varGraphGraphAtom)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "object")
|
|
delete(additionalProperties, "predicate")
|
|
delete(additionalProperties, "subject")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphAtom struct {
|
|
value *GraphGraphAtom
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphAtom) Get() *GraphGraphAtom {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphAtom) Set(val *GraphGraphAtom) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphAtom) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphAtom) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphAtom(val *GraphGraphAtom) *NullableGraphGraphAtom {
|
|
return &NullableGraphGraphAtom{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphAtom) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphAtom) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|