mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.4 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 GraphGraphOntologyFeature type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphOntologyFeature{}
|
|
|
|
// GraphGraphOntologyFeature struct for GraphGraphOntologyFeature
|
|
type GraphGraphOntologyFeature struct {
|
|
// Group is the feature block: identity (0..19), communication (20..59) or photos (60..143).
|
|
Group *string `json:"group,omitempty"`
|
|
// Index is the feature's 0-based position (0..143) in metadata.json.
|
|
Index *int64 `json:"index,omitempty"`
|
|
// Name is Apple's feature identifier, such as sameLastName or photosPersonPosteriorProbabilityGivenSaturdayNight.
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphOntologyFeature GraphGraphOntologyFeature
|
|
|
|
// NewGraphGraphOntologyFeature instantiates a new GraphGraphOntologyFeature 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 NewGraphGraphOntologyFeature() *GraphGraphOntologyFeature {
|
|
this := GraphGraphOntologyFeature{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphOntologyFeatureWithDefaults instantiates a new GraphGraphOntologyFeature 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 NewGraphGraphOntologyFeatureWithDefaults() *GraphGraphOntologyFeature {
|
|
this := GraphGraphOntologyFeature{}
|
|
return &this
|
|
}
|
|
|
|
// GetGroup returns the Group field value if set, zero value otherwise.
|
|
func (o *GraphGraphOntologyFeature) 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 *GraphGraphOntologyFeature) 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 *GraphGraphOntologyFeature) 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 *GraphGraphOntologyFeature) SetGroup(v string) {
|
|
o.Group = &v
|
|
}
|
|
|
|
// GetIndex returns the Index field value if set, zero value otherwise.
|
|
func (o *GraphGraphOntologyFeature) GetIndex() int64 {
|
|
if o == nil || IsNil(o.Index) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Index
|
|
}
|
|
|
|
// GetIndexOk returns a tuple with the Index field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphOntologyFeature) GetIndexOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Index) {
|
|
return nil, false
|
|
}
|
|
return o.Index, true
|
|
}
|
|
|
|
// HasIndex returns a boolean if a field has been set.
|
|
func (o *GraphGraphOntologyFeature) HasIndex() bool {
|
|
if o != nil && !IsNil(o.Index) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIndex gets a reference to the given int64 and assigns it to the Index field.
|
|
func (o *GraphGraphOntologyFeature) SetIndex(v int64) {
|
|
o.Index = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *GraphGraphOntologyFeature) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphOntologyFeature) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *GraphGraphOntologyFeature) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *GraphGraphOntologyFeature) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o GraphGraphOntologyFeature) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphOntologyFeature) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Group) {
|
|
toSerialize["group"] = o.Group
|
|
}
|
|
if !IsNil(o.Index) {
|
|
toSerialize["index"] = o.Index
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphOntologyFeature) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphOntologyFeature := _GraphGraphOntologyFeature{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphOntologyFeature)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphOntologyFeature(varGraphGraphOntologyFeature)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "group")
|
|
delete(additionalProperties, "index")
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphOntologyFeature struct {
|
|
value *GraphGraphOntologyFeature
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphOntologyFeature) Get() *GraphGraphOntologyFeature {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphOntologyFeature) Set(val *GraphGraphOntologyFeature) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphOntologyFeature) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphOntologyFeature) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphOntologyFeature(val *GraphGraphOntologyFeature) *NullableGraphGraphOntologyFeature {
|
|
return &NullableGraphGraphOntologyFeature{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphOntologyFeature) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphOntologyFeature) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|