Files
sdk/model_graph_graph_store.go

269 lines
7.1 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 GraphGraphStore type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GraphGraphStore{}
// GraphGraphStore struct for GraphGraphStore
type GraphGraphStore struct {
// Detail says what an unsupported store is missing before an erasure could reach it.
Detail *string `json:"detail,omitempty"`
// Removed is how many of its rows were removed.
Removed *int64 `json:"removed,omitempty"`
// Status is erased (rows naming the entity were removed), absent (it held none) or unsupported (this op cannot reach it, so it may still hold the subject).
Status *string `json:"status,omitempty"`
// Store names it: `graph` is the caller's own (org, project) assertion file, its full-text index included; `knowledge` is the org's wiki pages, memories and sources with their vectors; `ai.memory` is /v1/ai/memory.
Store *string `json:"store,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GraphGraphStore GraphGraphStore
// NewGraphGraphStore instantiates a new GraphGraphStore 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 NewGraphGraphStore() *GraphGraphStore {
this := GraphGraphStore{}
return &this
}
// NewGraphGraphStoreWithDefaults instantiates a new GraphGraphStore 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 NewGraphGraphStoreWithDefaults() *GraphGraphStore {
this := GraphGraphStore{}
return &this
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *GraphGraphStore) GetDetail() string {
if o == nil || IsNil(o.Detail) {
var ret string
return ret
}
return *o.Detail
}
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphStore) GetDetailOk() (*string, bool) {
if o == nil || IsNil(o.Detail) {
return nil, false
}
return o.Detail, true
}
// HasDetail returns a boolean if a field has been set.
func (o *GraphGraphStore) HasDetail() bool {
if o != nil && !IsNil(o.Detail) {
return true
}
return false
}
// SetDetail gets a reference to the given string and assigns it to the Detail field.
func (o *GraphGraphStore) SetDetail(v string) {
o.Detail = &v
}
// GetRemoved returns the Removed field value if set, zero value otherwise.
func (o *GraphGraphStore) GetRemoved() int64 {
if o == nil || IsNil(o.Removed) {
var ret int64
return ret
}
return *o.Removed
}
// GetRemovedOk returns a tuple with the Removed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphStore) GetRemovedOk() (*int64, bool) {
if o == nil || IsNil(o.Removed) {
return nil, false
}
return o.Removed, true
}
// HasRemoved returns a boolean if a field has been set.
func (o *GraphGraphStore) HasRemoved() bool {
if o != nil && !IsNil(o.Removed) {
return true
}
return false
}
// SetRemoved gets a reference to the given int64 and assigns it to the Removed field.
func (o *GraphGraphStore) SetRemoved(v int64) {
o.Removed = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *GraphGraphStore) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphStore) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *GraphGraphStore) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *GraphGraphStore) SetStatus(v string) {
o.Status = &v
}
// GetStore returns the Store field value if set, zero value otherwise.
func (o *GraphGraphStore) GetStore() string {
if o == nil || IsNil(o.Store) {
var ret string
return ret
}
return *o.Store
}
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GraphGraphStore) GetStoreOk() (*string, bool) {
if o == nil || IsNil(o.Store) {
return nil, false
}
return o.Store, true
}
// HasStore returns a boolean if a field has been set.
func (o *GraphGraphStore) HasStore() bool {
if o != nil && !IsNil(o.Store) {
return true
}
return false
}
// SetStore gets a reference to the given string and assigns it to the Store field.
func (o *GraphGraphStore) SetStore(v string) {
o.Store = &v
}
func (o GraphGraphStore) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GraphGraphStore) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Detail) {
toSerialize["detail"] = o.Detail
}
if !IsNil(o.Removed) {
toSerialize["removed"] = o.Removed
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Store) {
toSerialize["store"] = o.Store
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GraphGraphStore) UnmarshalJSON(data []byte) (err error) {
varGraphGraphStore := _GraphGraphStore{}
err = json.Unmarshal(data, &varGraphGraphStore)
if err != nil {
return err
}
*o = GraphGraphStore(varGraphGraphStore)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "detail")
delete(additionalProperties, "removed")
delete(additionalProperties, "status")
delete(additionalProperties, "store")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGraphGraphStore struct {
value *GraphGraphStore
isSet bool
}
func (v NullableGraphGraphStore) Get() *GraphGraphStore {
return v.value
}
func (v *NullableGraphGraphStore) Set(val *GraphGraphStore) {
v.value = val
v.isSet = true
}
func (v NullableGraphGraphStore) IsSet() bool {
return v.isSet
}
func (v *NullableGraphGraphStore) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGraphGraphStore(val *GraphGraphStore) *NullableGraphGraphStore {
return &NullableGraphGraphStore{value: val, isSet: true}
}
func (v NullableGraphGraphStore) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGraphGraphStore) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}