mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.3 KiB
Go
269 lines
7.3 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 GraphGraphSupport type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphSupport{}
|
|
|
|
// GraphGraphSupport struct for GraphGraphSupport
|
|
type GraphGraphSupport struct {
|
|
// Assertion is the ID of the statement in force the atom rests on. Absent when the atom is itself derived: it is then an entry of Derived or Lemmas, with a proof of its own.
|
|
Assertion *string `json:"assertion,omitempty"`
|
|
// 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 supporting atom is of.
|
|
Predicate *string `json:"predicate,omitempty"`
|
|
// Subject is its first argument.
|
|
Subject *string `json:"subject,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphSupport GraphGraphSupport
|
|
|
|
// NewGraphGraphSupport instantiates a new GraphGraphSupport 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 NewGraphGraphSupport() *GraphGraphSupport {
|
|
this := GraphGraphSupport{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphSupportWithDefaults instantiates a new GraphGraphSupport 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 NewGraphGraphSupportWithDefaults() *GraphGraphSupport {
|
|
this := GraphGraphSupport{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssertion returns the Assertion field value if set, zero value otherwise.
|
|
func (o *GraphGraphSupport) GetAssertion() string {
|
|
if o == nil || IsNil(o.Assertion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Assertion
|
|
}
|
|
|
|
// GetAssertionOk returns a tuple with the Assertion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphSupport) GetAssertionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Assertion) {
|
|
return nil, false
|
|
}
|
|
return o.Assertion, true
|
|
}
|
|
|
|
// HasAssertion returns a boolean if a field has been set.
|
|
func (o *GraphGraphSupport) HasAssertion() bool {
|
|
if o != nil && !IsNil(o.Assertion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssertion gets a reference to the given string and assigns it to the Assertion field.
|
|
func (o *GraphGraphSupport) SetAssertion(v string) {
|
|
o.Assertion = &v
|
|
}
|
|
|
|
// GetObject returns the Object field value if set, zero value otherwise.
|
|
func (o *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) SetObject(v string) {
|
|
o.Object = &v
|
|
}
|
|
|
|
// GetPredicate returns the Predicate field value if set, zero value otherwise.
|
|
func (o *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) SetPredicate(v string) {
|
|
o.Predicate = &v
|
|
}
|
|
|
|
// GetSubject returns the Subject field value if set, zero value otherwise.
|
|
func (o *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) 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 *GraphGraphSupport) SetSubject(v string) {
|
|
o.Subject = &v
|
|
}
|
|
|
|
func (o GraphGraphSupport) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphSupport) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assertion) {
|
|
toSerialize["assertion"] = o.Assertion
|
|
}
|
|
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 *GraphGraphSupport) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphSupport := _GraphGraphSupport{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphSupport)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphSupport(varGraphGraphSupport)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assertion")
|
|
delete(additionalProperties, "object")
|
|
delete(additionalProperties, "predicate")
|
|
delete(additionalProperties, "subject")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphSupport struct {
|
|
value *GraphGraphSupport
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphSupport) Get() *GraphGraphSupport {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphSupport) Set(val *GraphGraphSupport) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphSupport) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphSupport) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphSupport(val *GraphGraphSupport) *NullableGraphGraphSupport {
|
|
return &NullableGraphGraphSupport{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphSupport) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphSupport) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|