mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
487 lines
13 KiB
Go
487 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 IngestStats type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IngestStats{}
|
|
|
|
// IngestStats struct for IngestStats
|
|
type IngestStats struct {
|
|
Async *bool `json:"async,omitempty"`
|
|
DocumentsIndexed *int32 `json:"documentsIndexed,omitempty"`
|
|
Errors []string `json:"errors,omitempty"`
|
|
FilesIngested *int32 `json:"filesIngested,omitempty"`
|
|
FilesSkipped *int32 `json:"filesSkipped,omitempty"`
|
|
IndexName *string `json:"indexName,omitempty"`
|
|
Skipped []string `json:"skipped,omitempty"`
|
|
Source *string `json:"source,omitempty"`
|
|
Store *string `json:"store,omitempty"`
|
|
WorkflowId *string `json:"workflowId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IngestStats IngestStats
|
|
|
|
// NewIngestStats instantiates a new IngestStats 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 NewIngestStats() *IngestStats {
|
|
this := IngestStats{}
|
|
return &this
|
|
}
|
|
|
|
// NewIngestStatsWithDefaults instantiates a new IngestStats 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 NewIngestStatsWithDefaults() *IngestStats {
|
|
this := IngestStats{}
|
|
return &this
|
|
}
|
|
|
|
// GetAsync returns the Async field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetAsync() bool {
|
|
if o == nil || IsNil(o.Async) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Async
|
|
}
|
|
|
|
// GetAsyncOk returns a tuple with the Async field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetAsyncOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Async) {
|
|
return nil, false
|
|
}
|
|
return o.Async, true
|
|
}
|
|
|
|
// HasAsync returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasAsync() bool {
|
|
if o != nil && !IsNil(o.Async) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsync gets a reference to the given bool and assigns it to the Async field.
|
|
func (o *IngestStats) SetAsync(v bool) {
|
|
o.Async = &v
|
|
}
|
|
|
|
// GetDocumentsIndexed returns the DocumentsIndexed field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetDocumentsIndexed() int32 {
|
|
if o == nil || IsNil(o.DocumentsIndexed) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.DocumentsIndexed
|
|
}
|
|
|
|
// GetDocumentsIndexedOk returns a tuple with the DocumentsIndexed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetDocumentsIndexedOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.DocumentsIndexed) {
|
|
return nil, false
|
|
}
|
|
return o.DocumentsIndexed, true
|
|
}
|
|
|
|
// HasDocumentsIndexed returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasDocumentsIndexed() bool {
|
|
if o != nil && !IsNil(o.DocumentsIndexed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocumentsIndexed gets a reference to the given int32 and assigns it to the DocumentsIndexed field.
|
|
func (o *IngestStats) SetDocumentsIndexed(v int32) {
|
|
o.DocumentsIndexed = &v
|
|
}
|
|
|
|
// GetErrors returns the Errors field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetErrors() []string {
|
|
if o == nil || IsNil(o.Errors) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Errors
|
|
}
|
|
|
|
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetErrorsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Errors) {
|
|
return nil, false
|
|
}
|
|
return o.Errors, true
|
|
}
|
|
|
|
// HasErrors returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasErrors() bool {
|
|
if o != nil && !IsNil(o.Errors) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrors gets a reference to the given []string and assigns it to the Errors field.
|
|
func (o *IngestStats) SetErrors(v []string) {
|
|
o.Errors = v
|
|
}
|
|
|
|
// GetFilesIngested returns the FilesIngested field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetFilesIngested() int32 {
|
|
if o == nil || IsNil(o.FilesIngested) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.FilesIngested
|
|
}
|
|
|
|
// GetFilesIngestedOk returns a tuple with the FilesIngested field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetFilesIngestedOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.FilesIngested) {
|
|
return nil, false
|
|
}
|
|
return o.FilesIngested, true
|
|
}
|
|
|
|
// HasFilesIngested returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasFilesIngested() bool {
|
|
if o != nil && !IsNil(o.FilesIngested) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFilesIngested gets a reference to the given int32 and assigns it to the FilesIngested field.
|
|
func (o *IngestStats) SetFilesIngested(v int32) {
|
|
o.FilesIngested = &v
|
|
}
|
|
|
|
// GetFilesSkipped returns the FilesSkipped field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetFilesSkipped() int32 {
|
|
if o == nil || IsNil(o.FilesSkipped) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.FilesSkipped
|
|
}
|
|
|
|
// GetFilesSkippedOk returns a tuple with the FilesSkipped field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetFilesSkippedOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.FilesSkipped) {
|
|
return nil, false
|
|
}
|
|
return o.FilesSkipped, true
|
|
}
|
|
|
|
// HasFilesSkipped returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasFilesSkipped() bool {
|
|
if o != nil && !IsNil(o.FilesSkipped) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFilesSkipped gets a reference to the given int32 and assigns it to the FilesSkipped field.
|
|
func (o *IngestStats) SetFilesSkipped(v int32) {
|
|
o.FilesSkipped = &v
|
|
}
|
|
|
|
// GetIndexName returns the IndexName field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetIndexName() string {
|
|
if o == nil || IsNil(o.IndexName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.IndexName
|
|
}
|
|
|
|
// GetIndexNameOk returns a tuple with the IndexName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetIndexNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.IndexName) {
|
|
return nil, false
|
|
}
|
|
return o.IndexName, true
|
|
}
|
|
|
|
// HasIndexName returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasIndexName() bool {
|
|
if o != nil && !IsNil(o.IndexName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIndexName gets a reference to the given string and assigns it to the IndexName field.
|
|
func (o *IngestStats) SetIndexName(v string) {
|
|
o.IndexName = &v
|
|
}
|
|
|
|
// GetSkipped returns the Skipped field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetSkipped() []string {
|
|
if o == nil || IsNil(o.Skipped) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Skipped
|
|
}
|
|
|
|
// GetSkippedOk returns a tuple with the Skipped field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetSkippedOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Skipped) {
|
|
return nil, false
|
|
}
|
|
return o.Skipped, true
|
|
}
|
|
|
|
// HasSkipped returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasSkipped() bool {
|
|
if o != nil && !IsNil(o.Skipped) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSkipped gets a reference to the given []string and assigns it to the Skipped field.
|
|
func (o *IngestStats) SetSkipped(v []string) {
|
|
o.Skipped = v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *IngestStats) 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 *IngestStats) 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 *IngestStats) 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 *IngestStats) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStore returns the Store field value if set, zero value otherwise.
|
|
func (o *IngestStats) 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 *IngestStats) 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 *IngestStats) 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 *IngestStats) SetStore(v string) {
|
|
o.Store = &v
|
|
}
|
|
|
|
// GetWorkflowId returns the WorkflowId field value if set, zero value otherwise.
|
|
func (o *IngestStats) GetWorkflowId() string {
|
|
if o == nil || IsNil(o.WorkflowId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.WorkflowId
|
|
}
|
|
|
|
// GetWorkflowIdOk returns a tuple with the WorkflowId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IngestStats) GetWorkflowIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.WorkflowId) {
|
|
return nil, false
|
|
}
|
|
return o.WorkflowId, true
|
|
}
|
|
|
|
// HasWorkflowId returns a boolean if a field has been set.
|
|
func (o *IngestStats) HasWorkflowId() bool {
|
|
if o != nil && !IsNil(o.WorkflowId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWorkflowId gets a reference to the given string and assigns it to the WorkflowId field.
|
|
func (o *IngestStats) SetWorkflowId(v string) {
|
|
o.WorkflowId = &v
|
|
}
|
|
|
|
func (o IngestStats) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IngestStats) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Async) {
|
|
toSerialize["async"] = o.Async
|
|
}
|
|
if !IsNil(o.DocumentsIndexed) {
|
|
toSerialize["documentsIndexed"] = o.DocumentsIndexed
|
|
}
|
|
if !IsNil(o.Errors) {
|
|
toSerialize["errors"] = o.Errors
|
|
}
|
|
if !IsNil(o.FilesIngested) {
|
|
toSerialize["filesIngested"] = o.FilesIngested
|
|
}
|
|
if !IsNil(o.FilesSkipped) {
|
|
toSerialize["filesSkipped"] = o.FilesSkipped
|
|
}
|
|
if !IsNil(o.IndexName) {
|
|
toSerialize["indexName"] = o.IndexName
|
|
}
|
|
if !IsNil(o.Skipped) {
|
|
toSerialize["skipped"] = o.Skipped
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Store) {
|
|
toSerialize["store"] = o.Store
|
|
}
|
|
if !IsNil(o.WorkflowId) {
|
|
toSerialize["workflowId"] = o.WorkflowId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IngestStats) UnmarshalJSON(data []byte) (err error) {
|
|
varIngestStats := _IngestStats{}
|
|
|
|
err = json.Unmarshal(data, &varIngestStats)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IngestStats(varIngestStats)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "async")
|
|
delete(additionalProperties, "documentsIndexed")
|
|
delete(additionalProperties, "errors")
|
|
delete(additionalProperties, "filesIngested")
|
|
delete(additionalProperties, "filesSkipped")
|
|
delete(additionalProperties, "indexName")
|
|
delete(additionalProperties, "skipped")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "store")
|
|
delete(additionalProperties, "workflowId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIngestStats struct {
|
|
value *IngestStats
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIngestStats) Get() *IngestStats {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIngestStats) Set(val *IngestStats) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIngestStats) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIngestStats) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIngestStats(val *IngestStats) *NullableIngestStats {
|
|
return &NullableIngestStats{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIngestStats) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIngestStats) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|