Files
sdk/model_graph_graph_ontology_class.go

307 lines
8.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 GraphGraphOntologyClass type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphOntologyClass{}
// GraphGraphOntologyClass struct for GraphGraphOntologyClass
type GraphGraphOntologyClass struct {
// Edge is true for the relationship-type classes (CS* and nm_*RelationshipType) that reify a two-row edge sharing a relationshipId in stable_graph.
Edge *bool `json:"edge,omitempty"`
// Group is the class family: core, person, attribute, place, event, activity, activity type, transport, media, animal, commerce or edge.
Group *string `json:"group,omitempty"`
// ID is the raw code stored in graph.db, such as SB104, CS165 or nm_walletOrder.
Id *string `json:"id,omitempty"`
// Label is the human-readable class name, such as person or employment relationship type.
Label *string `json:"label,omitempty"`
// Mechanism records whether the daemon mechanism populating the class is implemented, unverified or unlocated.
Mechanism *string `json:"mechanism,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphOntologyClass GraphGraphOntologyClass
// NewGraphGraphOntologyClass instantiates a new GraphGraphOntologyClass 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 NewGraphGraphOntologyClass() *GraphGraphOntologyClass {
this := GraphGraphOntologyClass{}
return &this
}
// NewGraphGraphOntologyClassWithDefaults instantiates a new GraphGraphOntologyClass 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 NewGraphGraphOntologyClassWithDefaults() *GraphGraphOntologyClass {
this := GraphGraphOntologyClass{}
return &this
}
// GetEdge returns the Edge field value if set, zero value otherwise.
func (o *GraphGraphOntologyClass) GetEdge() bool {
if o == nil || IsNil(o.Edge) {
var ret bool
return ret
}
return *o.Edge
}
// GetEdgeOk returns a tuple with the Edge field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyClass) GetEdgeOk() (*bool, bool) {
if o == nil || IsNil(o.Edge) {
return nil, false
}
return o.Edge, true
}
// HasEdge returns a boolean if a field has been set.
func (o *GraphGraphOntologyClass) HasEdge() bool {
if o != nil && !IsNil(o.Edge) {
return true
}
return false
}
// SetEdge gets a reference to the given bool and assigns it to the Edge field.
func (o *GraphGraphOntologyClass) SetEdge(v bool) {
o.Edge = &v
}
// GetGroup returns the Group field value if set, zero value otherwise.
func (o *GraphGraphOntologyClass) GetGroup() string {
if o == nil || IsNil(o.Group) {
var ret string
return ret
}
return *o.Group
}
// GetGroupOk returns a tuple with the Group field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyClass) GetGroupOk() (*string, bool) {
if o == nil || IsNil(o.Group) {
return nil, false
}
return o.Group, true
}
// HasGroup returns a boolean if a field has been set.
func (o *GraphGraphOntologyClass) HasGroup() bool {
if o != nil && !IsNil(o.Group) {
return true
}
return false
}
// SetGroup gets a reference to the given string and assigns it to the Group field.
func (o *GraphGraphOntologyClass) SetGroup(v string) {
o.Group = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *GraphGraphOntologyClass) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyClass) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *GraphGraphOntologyClass) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *GraphGraphOntologyClass) SetId(v string) {
o.Id = &v
}
// GetLabel returns the Label field value if set, zero value otherwise.
func (o *GraphGraphOntologyClass) GetLabel() string {
if o == nil || IsNil(o.Label) {
var ret string
return ret
}
return *o.Label
}
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyClass) GetLabelOk() (*string, bool) {
if o == nil || IsNil(o.Label) {
return nil, false
}
return o.Label, true
}
// HasLabel returns a boolean if a field has been set.
func (o *GraphGraphOntologyClass) HasLabel() bool {
if o != nil && !IsNil(o.Label) {
return true
}
return false
}
// SetLabel gets a reference to the given string and assigns it to the Label field.
func (o *GraphGraphOntologyClass) SetLabel(v string) {
o.Label = &v
}
// GetMechanism returns the Mechanism field value if set, zero value otherwise.
func (o *GraphGraphOntologyClass) GetMechanism() string {
if o == nil || IsNil(o.Mechanism) {
var ret string
return ret
}
return *o.Mechanism
}
// GetMechanismOk returns a tuple with the Mechanism field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyClass) GetMechanismOk() (*string, bool) {
if o == nil || IsNil(o.Mechanism) {
return nil, false
}
return o.Mechanism, true
}
// HasMechanism returns a boolean if a field has been set.
func (o *GraphGraphOntologyClass) HasMechanism() bool {
if o != nil && !IsNil(o.Mechanism) {
return true
}
return false
}
// SetMechanism gets a reference to the given string and assigns it to the Mechanism field.
func (o *GraphGraphOntologyClass) SetMechanism(v string) {
o.Mechanism = &v
}
func (o GraphGraphOntologyClass) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphOntologyClass) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Edge) {
toSerialize["edge"] = o.Edge
}
if !IsNil(o.Group) {
toSerialize["group"] = o.Group
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Label) {
toSerialize["label"] = o.Label
}
if !IsNil(o.Mechanism) {
toSerialize["mechanism"] = o.Mechanism
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphOntologyClass) UnmarshalJSON(data []byte) (err error) {
varGraphGraphOntologyClass := _GraphGraphOntologyClass{}
err = json.Unmarshal(data, &varGraphGraphOntologyClass)
if err != nil {
return err
}
*o = GraphGraphOntologyClass(varGraphGraphOntologyClass)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "edge")
delete(additionalProperties, "group")
delete(additionalProperties, "id")
delete(additionalProperties, "label")
delete(additionalProperties, "mechanism")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphOntologyClass struct {
value *GraphGraphOntologyClass
isSet bool
}
func (v NullableGraphGraphOntologyClass) Get() *GraphGraphOntologyClass {
return v.value
}
func (v *NullableGraphGraphOntologyClass) Set(val *GraphGraphOntologyClass) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphOntologyClass) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphOntologyClass) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphOntologyClass(val *GraphGraphOntologyClass) *NullableGraphGraphOntologyClass {
return &NullableGraphGraphOntologyClass{value: val, isSet: true}
}
func (v NullableGraphGraphOntologyClass) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphOntologyClass) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}