mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
13 KiB
Go
459 lines
13 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 GraphGraphEraseOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GraphGraphEraseOut{}
|
|
|
|
// GraphGraphEraseOut struct for GraphGraphEraseOut
|
|
type GraphGraphEraseOut struct {
|
|
// At is the instant of the erasure, RFC 3339, and the time on its audit record.
|
|
At *string `json:"at,omitempty"`
|
|
// By is the identity that erased — `owner` or `owner/user` — from the validated principal.
|
|
By *string `json:"by,omitempty"`
|
|
// Complete is true only when no store may still hold the subject: every store erased or absent and nothing Remaining. While a store is unsupported it is false, and that store is handled out of band before the erasure is done.
|
|
Complete *bool `json:"complete,omitempty"`
|
|
// Digest is SHA-256, hex, over IDs in their ascending order, each written `<length>:<id>` — the same content address an assertion's own ID is. The audit trail records it in place of the ids, so the receipt verifies against the trail and the trail names nothing.
|
|
Digest *string `json:"digest,omitempty"`
|
|
// Entity is the key that was erased, folded as every key here is (NFC, no control characters) and echoed so a stored receipt says what it is for. This plane keeps no copy of it.
|
|
Entity *string `json:"entity,omitempty"`
|
|
// IDs are the content addresses of the assertions removed, ascending.
|
|
Ids []string `json:"ids,omitempty"`
|
|
// Remaining is how many assertions still name the entity because one call removes at most ten thousand. Non-zero means call again; each call is its own receipt.
|
|
Remaining *int64 `json:"remaining,omitempty"`
|
|
// Sources are the documents the removed assertions were filed from. This plane does not own them: ingesting one again files the subject again.
|
|
Sources []string `json:"sources,omitempty"`
|
|
// Stores is every store in this deployment that may hold what the org says about the subject, and what happened in each: this graph first, then the stores this op cannot reach.
|
|
Stores []GraphGraphStore `json:"stores,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GraphGraphEraseOut GraphGraphEraseOut
|
|
|
|
// NewGraphGraphEraseOut instantiates a new GraphGraphEraseOut 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 NewGraphGraphEraseOut() *GraphGraphEraseOut {
|
|
this := GraphGraphEraseOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewGraphGraphEraseOutWithDefaults instantiates a new GraphGraphEraseOut 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 NewGraphGraphEraseOutWithDefaults() *GraphGraphEraseOut {
|
|
this := GraphGraphEraseOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetAt() string {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given string and assigns it to the At field.
|
|
func (o *GraphGraphEraseOut) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBy returns the By field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetBy() string {
|
|
if o == nil || IsNil(o.By) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.By
|
|
}
|
|
|
|
// GetByOk returns a tuple with the By field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.By) {
|
|
return nil, false
|
|
}
|
|
return o.By, true
|
|
}
|
|
|
|
// HasBy returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasBy() bool {
|
|
if o != nil && !IsNil(o.By) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBy gets a reference to the given string and assigns it to the By field.
|
|
func (o *GraphGraphEraseOut) SetBy(v string) {
|
|
o.By = &v
|
|
}
|
|
|
|
// GetComplete returns the Complete field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetComplete() bool {
|
|
if o == nil || IsNil(o.Complete) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Complete
|
|
}
|
|
|
|
// GetCompleteOk returns a tuple with the Complete field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetCompleteOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Complete) {
|
|
return nil, false
|
|
}
|
|
return o.Complete, true
|
|
}
|
|
|
|
// HasComplete returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasComplete() bool {
|
|
if o != nil && !IsNil(o.Complete) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetComplete gets a reference to the given bool and assigns it to the Complete field.
|
|
func (o *GraphGraphEraseOut) SetComplete(v bool) {
|
|
o.Complete = &v
|
|
}
|
|
|
|
// GetDigest returns the Digest field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetDigest() string {
|
|
if o == nil || IsNil(o.Digest) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Digest
|
|
}
|
|
|
|
// GetDigestOk returns a tuple with the Digest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetDigestOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Digest) {
|
|
return nil, false
|
|
}
|
|
return o.Digest, true
|
|
}
|
|
|
|
// HasDigest returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasDigest() bool {
|
|
if o != nil && !IsNil(o.Digest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDigest gets a reference to the given string and assigns it to the Digest field.
|
|
func (o *GraphGraphEraseOut) SetDigest(v string) {
|
|
o.Digest = &v
|
|
}
|
|
|
|
// GetEntity returns the Entity field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetEntity() string {
|
|
if o == nil || IsNil(o.Entity) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Entity
|
|
}
|
|
|
|
// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetEntityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Entity) {
|
|
return nil, false
|
|
}
|
|
return o.Entity, true
|
|
}
|
|
|
|
// HasEntity returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasEntity() bool {
|
|
if o != nil && !IsNil(o.Entity) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntity gets a reference to the given string and assigns it to the Entity field.
|
|
func (o *GraphGraphEraseOut) SetEntity(v string) {
|
|
o.Entity = &v
|
|
}
|
|
|
|
// GetIds returns the Ids field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetIds() []string {
|
|
if o == nil || IsNil(o.Ids) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Ids
|
|
}
|
|
|
|
// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetIdsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Ids) {
|
|
return nil, false
|
|
}
|
|
return o.Ids, true
|
|
}
|
|
|
|
// HasIds returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasIds() bool {
|
|
if o != nil && !IsNil(o.Ids) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIds gets a reference to the given []string and assigns it to the Ids field.
|
|
func (o *GraphGraphEraseOut) SetIds(v []string) {
|
|
o.Ids = v
|
|
}
|
|
|
|
// GetRemaining returns the Remaining field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetRemaining() int64 {
|
|
if o == nil || IsNil(o.Remaining) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Remaining
|
|
}
|
|
|
|
// GetRemainingOk returns a tuple with the Remaining field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetRemainingOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Remaining) {
|
|
return nil, false
|
|
}
|
|
return o.Remaining, true
|
|
}
|
|
|
|
// HasRemaining returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasRemaining() bool {
|
|
if o != nil && !IsNil(o.Remaining) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRemaining gets a reference to the given int64 and assigns it to the Remaining field.
|
|
func (o *GraphGraphEraseOut) SetRemaining(v int64) {
|
|
o.Remaining = &v
|
|
}
|
|
|
|
// GetSources returns the Sources field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetSources() []string {
|
|
if o == nil || IsNil(o.Sources) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Sources
|
|
}
|
|
|
|
// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetSourcesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Sources) {
|
|
return nil, false
|
|
}
|
|
return o.Sources, true
|
|
}
|
|
|
|
// HasSources returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasSources() bool {
|
|
if o != nil && !IsNil(o.Sources) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSources gets a reference to the given []string and assigns it to the Sources field.
|
|
func (o *GraphGraphEraseOut) SetSources(v []string) {
|
|
o.Sources = v
|
|
}
|
|
|
|
// GetStores returns the Stores field value if set, zero value otherwise.
|
|
func (o *GraphGraphEraseOut) GetStores() []GraphGraphStore {
|
|
if o == nil || IsNil(o.Stores) {
|
|
var ret []GraphGraphStore
|
|
return ret
|
|
}
|
|
return o.Stores
|
|
}
|
|
|
|
// GetStoresOk returns a tuple with the Stores field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GraphGraphEraseOut) GetStoresOk() ([]GraphGraphStore, bool) {
|
|
if o == nil || IsNil(o.Stores) {
|
|
return nil, false
|
|
}
|
|
return o.Stores, true
|
|
}
|
|
|
|
// HasStores returns a boolean if a field has been set.
|
|
func (o *GraphGraphEraseOut) HasStores() bool {
|
|
if o != nil && !IsNil(o.Stores) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStores gets a reference to the given []GraphGraphStore and assigns it to the Stores field.
|
|
func (o *GraphGraphEraseOut) SetStores(v []GraphGraphStore) {
|
|
o.Stores = v
|
|
}
|
|
|
|
func (o GraphGraphEraseOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GraphGraphEraseOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.By) {
|
|
toSerialize["by"] = o.By
|
|
}
|
|
if !IsNil(o.Complete) {
|
|
toSerialize["complete"] = o.Complete
|
|
}
|
|
if !IsNil(o.Digest) {
|
|
toSerialize["digest"] = o.Digest
|
|
}
|
|
if !IsNil(o.Entity) {
|
|
toSerialize["entity"] = o.Entity
|
|
}
|
|
if !IsNil(o.Ids) {
|
|
toSerialize["ids"] = o.Ids
|
|
}
|
|
if !IsNil(o.Remaining) {
|
|
toSerialize["remaining"] = o.Remaining
|
|
}
|
|
if !IsNil(o.Sources) {
|
|
toSerialize["sources"] = o.Sources
|
|
}
|
|
if !IsNil(o.Stores) {
|
|
toSerialize["stores"] = o.Stores
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GraphGraphEraseOut) UnmarshalJSON(data []byte) (err error) {
|
|
varGraphGraphEraseOut := _GraphGraphEraseOut{}
|
|
|
|
err = json.Unmarshal(data, &varGraphGraphEraseOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GraphGraphEraseOut(varGraphGraphEraseOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "by")
|
|
delete(additionalProperties, "complete")
|
|
delete(additionalProperties, "digest")
|
|
delete(additionalProperties, "entity")
|
|
delete(additionalProperties, "ids")
|
|
delete(additionalProperties, "remaining")
|
|
delete(additionalProperties, "sources")
|
|
delete(additionalProperties, "stores")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGraphGraphEraseOut struct {
|
|
value *GraphGraphEraseOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGraphGraphEraseOut) Get() *GraphGraphEraseOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGraphGraphEraseOut) Set(val *GraphGraphEraseOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGraphGraphEraseOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGraphGraphEraseOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGraphGraphEraseOut(val *GraphGraphEraseOut) *NullableGraphGraphEraseOut {
|
|
return &NullableGraphGraphEraseOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGraphGraphEraseOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGraphGraphEraseOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|