Files
sdk/model_graph_graph_ontology_predicate.go

383 lines
11 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 GraphGraphOntologyPredicate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphOntologyPredicate{}
// GraphGraphOntologyPredicate struct for GraphGraphOntologyPredicate
type GraphGraphOntologyPredicate struct {
// ID is the raw predicate code stored in graph.db, such as PS1, PS500 or nm_isCurrentUser.
Id *string `json:"id,omitempty"`
// Label is the plain-language reading of what the predicate records.
Label *string `json:"label,omitempty"`
// Mechanism records whether the daemon mechanism is implemented, unverified or unlocated.
Mechanism *string `json:"mechanism,omitempty"`
// Method names how the daemon obtains the value: Copied, Joined, Rule, Apple-shipped, Embedding model, XGBoost, Face clustering or Local LLM.
Method *string `json:"method,omitempty"`
// Names is true when the predicate links its subject to another entity rather than a scalar literal.
Names *bool `json:"names,omitempty"`
// Relation is the canonical snake_case relation key this plane files the predicate under when ingesting an Apple graph.
Relation *string `json:"relation,omitempty"`
// Source names the OS store or subsystem the daemon reads the predicate from.
Source *string `json:"source,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphOntologyPredicate GraphGraphOntologyPredicate
// NewGraphGraphOntologyPredicate instantiates a new GraphGraphOntologyPredicate 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 NewGraphGraphOntologyPredicate() *GraphGraphOntologyPredicate {
this := GraphGraphOntologyPredicate{}
return &this
}
// NewGraphGraphOntologyPredicateWithDefaults instantiates a new GraphGraphOntologyPredicate 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 NewGraphGraphOntologyPredicateWithDefaults() *GraphGraphOntologyPredicate {
this := GraphGraphOntologyPredicate{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) SetId(v string) {
o.Id = &v
}
// GetLabel returns the Label field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) SetLabel(v string) {
o.Label = &v
}
// GetMechanism returns the Mechanism field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) 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 *GraphGraphOntologyPredicate) SetMechanism(v string) {
o.Mechanism = &v
}
// GetMethod returns the Method field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) GetMethod() string {
if o == nil || IsNil(o.Method) {
var ret string
return ret
}
return *o.Method
}
// GetMethodOk returns a tuple with the Method field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyPredicate) GetMethodOk() (*string, bool) {
if o == nil || IsNil(o.Method) {
return nil, false
}
return o.Method, true
}
// HasMethod returns a boolean if a field has been set.
func (o *GraphGraphOntologyPredicate) HasMethod() bool {
if o != nil && !IsNil(o.Method) {
return true
}
return false
}
// SetMethod gets a reference to the given string and assigns it to the Method field.
func (o *GraphGraphOntologyPredicate) SetMethod(v string) {
o.Method = &v
}
// GetNames returns the Names field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) GetNames() bool {
if o == nil || IsNil(o.Names) {
var ret bool
return ret
}
return *o.Names
}
// GetNamesOk returns a tuple with the Names field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyPredicate) GetNamesOk() (*bool, bool) {
if o == nil || IsNil(o.Names) {
return nil, false
}
return o.Names, true
}
// HasNames returns a boolean if a field has been set.
func (o *GraphGraphOntologyPredicate) HasNames() bool {
if o != nil && !IsNil(o.Names) {
return true
}
return false
}
// SetNames gets a reference to the given bool and assigns it to the Names field.
func (o *GraphGraphOntologyPredicate) SetNames(v bool) {
o.Names = &v
}
// GetRelation returns the Relation field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) GetRelation() string {
if o == nil || IsNil(o.Relation) {
var ret string
return ret
}
return *o.Relation
}
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyPredicate) GetRelationOk() (*string, bool) {
if o == nil || IsNil(o.Relation) {
return nil, false
}
return o.Relation, true
}
// HasRelation returns a boolean if a field has been set.
func (o *GraphGraphOntologyPredicate) HasRelation() bool {
if o != nil && !IsNil(o.Relation) {
return true
}
return false
}
// SetRelation gets a reference to the given string and assigns it to the Relation field.
func (o *GraphGraphOntologyPredicate) SetRelation(v string) {
o.Relation = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *GraphGraphOntologyPredicate) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphOntologyPredicate) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *GraphGraphOntologyPredicate) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *GraphGraphOntologyPredicate) SetSource(v string) {
o.Source = &v
}
func (o GraphGraphOntologyPredicate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphOntologyPredicate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Label) {
toSerialize["label"] = o.Label
}
if !IsNil(o.Mechanism) {
toSerialize["mechanism"] = o.Mechanism
}
if !IsNil(o.Method) {
toSerialize["method"] = o.Method
}
if !IsNil(o.Names) {
toSerialize["names"] = o.Names
}
if !IsNil(o.Relation) {
toSerialize["relation"] = o.Relation
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphOntologyPredicate) UnmarshalJSON(data []byte) (err error) {
varGraphGraphOntologyPredicate := _GraphGraphOntologyPredicate{}
err = json.Unmarshal(data, &varGraphGraphOntologyPredicate)
if err != nil {
return err
}
*o = GraphGraphOntologyPredicate(varGraphGraphOntologyPredicate)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "label")
delete(additionalProperties, "mechanism")
delete(additionalProperties, "method")
delete(additionalProperties, "names")
delete(additionalProperties, "relation")
delete(additionalProperties, "source")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphOntologyPredicate struct {
value *GraphGraphOntologyPredicate
isSet bool
}
func (v NullableGraphGraphOntologyPredicate) Get() *GraphGraphOntologyPredicate {
return v.value
}
func (v *NullableGraphGraphOntologyPredicate) Set(val *GraphGraphOntologyPredicate) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphOntologyPredicate) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphOntologyPredicate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphOntologyPredicate(val *GraphGraphOntologyPredicate) *NullableGraphGraphOntologyPredicate {
return &NullableGraphGraphOntologyPredicate{value: val, isSet: true}
}
func (v NullableGraphGraphOntologyPredicate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphOntologyPredicate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}