mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
7.6 KiB
Go
302 lines
7.6 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 IndexEnqueued type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IndexEnqueued{}
|
|
|
|
// IndexEnqueued struct for IndexEnqueued
|
|
type IndexEnqueued struct {
|
|
EnqueuedAt *string `json:"enqueuedAt,omitempty"`
|
|
IndexUid *string `json:"indexUid,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
TaskUid *int32 `json:"taskUid,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IndexEnqueued IndexEnqueued
|
|
|
|
// NewIndexEnqueued instantiates a new IndexEnqueued 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 NewIndexEnqueued() *IndexEnqueued {
|
|
this := IndexEnqueued{}
|
|
return &this
|
|
}
|
|
|
|
// NewIndexEnqueuedWithDefaults instantiates a new IndexEnqueued 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 NewIndexEnqueuedWithDefaults() *IndexEnqueued {
|
|
this := IndexEnqueued{}
|
|
return &this
|
|
}
|
|
|
|
// GetEnqueuedAt returns the EnqueuedAt field value if set, zero value otherwise.
|
|
func (o *IndexEnqueued) GetEnqueuedAt() string {
|
|
if o == nil || IsNil(o.EnqueuedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EnqueuedAt
|
|
}
|
|
|
|
// GetEnqueuedAtOk returns a tuple with the EnqueuedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexEnqueued) GetEnqueuedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.EnqueuedAt) {
|
|
return nil, false
|
|
}
|
|
return o.EnqueuedAt, true
|
|
}
|
|
|
|
// HasEnqueuedAt returns a boolean if a field has been set.
|
|
func (o *IndexEnqueued) HasEnqueuedAt() bool {
|
|
if o != nil && !IsNil(o.EnqueuedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnqueuedAt gets a reference to the given string and assigns it to the EnqueuedAt field.
|
|
func (o *IndexEnqueued) SetEnqueuedAt(v string) {
|
|
o.EnqueuedAt = &v
|
|
}
|
|
|
|
// GetIndexUid returns the IndexUid field value if set, zero value otherwise.
|
|
func (o *IndexEnqueued) GetIndexUid() string {
|
|
if o == nil || IsNil(o.IndexUid) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.IndexUid
|
|
}
|
|
|
|
// GetIndexUidOk returns a tuple with the IndexUid field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexEnqueued) GetIndexUidOk() (*string, bool) {
|
|
if o == nil || IsNil(o.IndexUid) {
|
|
return nil, false
|
|
}
|
|
return o.IndexUid, true
|
|
}
|
|
|
|
// HasIndexUid returns a boolean if a field has been set.
|
|
func (o *IndexEnqueued) HasIndexUid() bool {
|
|
if o != nil && !IsNil(o.IndexUid) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIndexUid gets a reference to the given string and assigns it to the IndexUid field.
|
|
func (o *IndexEnqueued) SetIndexUid(v string) {
|
|
o.IndexUid = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *IndexEnqueued) 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 *IndexEnqueued) 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 *IndexEnqueued) 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 *IndexEnqueued) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTaskUid returns the TaskUid field value if set, zero value otherwise.
|
|
func (o *IndexEnqueued) GetTaskUid() int32 {
|
|
if o == nil || IsNil(o.TaskUid) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TaskUid
|
|
}
|
|
|
|
// GetTaskUidOk returns a tuple with the TaskUid field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexEnqueued) GetTaskUidOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TaskUid) {
|
|
return nil, false
|
|
}
|
|
return o.TaskUid, true
|
|
}
|
|
|
|
// HasTaskUid returns a boolean if a field has been set.
|
|
func (o *IndexEnqueued) HasTaskUid() bool {
|
|
if o != nil && !IsNil(o.TaskUid) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTaskUid gets a reference to the given int32 and assigns it to the TaskUid field.
|
|
func (o *IndexEnqueued) SetTaskUid(v int32) {
|
|
o.TaskUid = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *IndexEnqueued) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexEnqueued) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *IndexEnqueued) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *IndexEnqueued) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o IndexEnqueued) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IndexEnqueued) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.EnqueuedAt) {
|
|
toSerialize["enqueuedAt"] = o.EnqueuedAt
|
|
}
|
|
if !IsNil(o.IndexUid) {
|
|
toSerialize["indexUid"] = o.IndexUid
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.TaskUid) {
|
|
toSerialize["taskUid"] = o.TaskUid
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IndexEnqueued) UnmarshalJSON(data []byte) (err error) {
|
|
varIndexEnqueued := _IndexEnqueued{}
|
|
|
|
err = json.Unmarshal(data, &varIndexEnqueued)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IndexEnqueued(varIndexEnqueued)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "enqueuedAt")
|
|
delete(additionalProperties, "indexUid")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "taskUid")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIndexEnqueued struct {
|
|
value *IndexEnqueued
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIndexEnqueued) Get() *IndexEnqueued {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIndexEnqueued) Set(val *IndexEnqueued) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIndexEnqueued) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIndexEnqueued) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIndexEnqueued(val *IndexEnqueued) *NullableIndexEnqueued {
|
|
return &NullableIndexEnqueued{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIndexEnqueued) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIndexEnqueued) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|