mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
524 lines
13 KiB
Go
524 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 File type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &File{}
|
|
|
|
// File struct for File
|
|
type File struct {
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
ErrorText *string `json:"errorText,omitempty"`
|
|
Filename *string `json:"filename,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
Size *int32 `json:"size,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
StorageProvider *string `json:"storageProvider,omitempty"`
|
|
Store *string `json:"store,omitempty"`
|
|
TokenCount *int32 `json:"tokenCount,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _File File
|
|
|
|
// NewFile instantiates a new File 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 NewFile() *File {
|
|
this := File{}
|
|
return &this
|
|
}
|
|
|
|
// NewFileWithDefaults instantiates a new File 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 NewFileWithDefaults() *File {
|
|
this := File{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *File) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *File) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *File) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetErrorText returns the ErrorText field value if set, zero value otherwise.
|
|
func (o *File) GetErrorText() string {
|
|
if o == nil || IsNil(o.ErrorText) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ErrorText
|
|
}
|
|
|
|
// GetErrorTextOk returns a tuple with the ErrorText field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetErrorTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ErrorText) {
|
|
return nil, false
|
|
}
|
|
return o.ErrorText, true
|
|
}
|
|
|
|
// HasErrorText returns a boolean if a field has been set.
|
|
func (o *File) HasErrorText() bool {
|
|
if o != nil && !IsNil(o.ErrorText) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrorText gets a reference to the given string and assigns it to the ErrorText field.
|
|
func (o *File) SetErrorText(v string) {
|
|
o.ErrorText = &v
|
|
}
|
|
|
|
// GetFilename returns the Filename field value if set, zero value otherwise.
|
|
func (o *File) GetFilename() string {
|
|
if o == nil || IsNil(o.Filename) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Filename
|
|
}
|
|
|
|
// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetFilenameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Filename) {
|
|
return nil, false
|
|
}
|
|
return o.Filename, true
|
|
}
|
|
|
|
// HasFilename returns a boolean if a field has been set.
|
|
func (o *File) HasFilename() bool {
|
|
if o != nil && !IsNil(o.Filename) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFilename gets a reference to the given string and assigns it to the Filename field.
|
|
func (o *File) SetFilename(v string) {
|
|
o.Filename = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *File) 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 *File) 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 *File) 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 *File) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *File) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *File) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *File) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *File) GetSize() int32 {
|
|
if o == nil || IsNil(o.Size) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Size
|
|
}
|
|
|
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetSizeOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Size) {
|
|
return nil, false
|
|
}
|
|
return o.Size, true
|
|
}
|
|
|
|
// HasSize returns a boolean if a field has been set.
|
|
func (o *File) HasSize() bool {
|
|
if o != nil && !IsNil(o.Size) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
|
func (o *File) SetSize(v int32) {
|
|
o.Size = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *File) 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 *File) 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 *File) 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 *File) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetStorageProvider returns the StorageProvider field value if set, zero value otherwise.
|
|
func (o *File) GetStorageProvider() string {
|
|
if o == nil || IsNil(o.StorageProvider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.StorageProvider
|
|
}
|
|
|
|
// GetStorageProviderOk returns a tuple with the StorageProvider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetStorageProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.StorageProvider) {
|
|
return nil, false
|
|
}
|
|
return o.StorageProvider, true
|
|
}
|
|
|
|
// HasStorageProvider returns a boolean if a field has been set.
|
|
func (o *File) HasStorageProvider() bool {
|
|
if o != nil && !IsNil(o.StorageProvider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStorageProvider gets a reference to the given string and assigns it to the StorageProvider field.
|
|
func (o *File) SetStorageProvider(v string) {
|
|
o.StorageProvider = &v
|
|
}
|
|
|
|
// GetStore returns the Store field value if set, zero value otherwise.
|
|
func (o *File) 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 *File) 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 *File) 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 *File) SetStore(v string) {
|
|
o.Store = &v
|
|
}
|
|
|
|
// GetTokenCount returns the TokenCount field value if set, zero value otherwise.
|
|
func (o *File) GetTokenCount() int32 {
|
|
if o == nil || IsNil(o.TokenCount) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TokenCount
|
|
}
|
|
|
|
// GetTokenCountOk returns a tuple with the TokenCount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetTokenCountOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TokenCount) {
|
|
return nil, false
|
|
}
|
|
return o.TokenCount, true
|
|
}
|
|
|
|
// HasTokenCount returns a boolean if a field has been set.
|
|
func (o *File) HasTokenCount() bool {
|
|
if o != nil && !IsNil(o.TokenCount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTokenCount gets a reference to the given int32 and assigns it to the TokenCount field.
|
|
func (o *File) SetTokenCount(v int32) {
|
|
o.TokenCount = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *File) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *File) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *File) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *File) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o File) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o File) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.ErrorText) {
|
|
toSerialize["errorText"] = o.ErrorText
|
|
}
|
|
if !IsNil(o.Filename) {
|
|
toSerialize["filename"] = o.Filename
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.StorageProvider) {
|
|
toSerialize["storageProvider"] = o.StorageProvider
|
|
}
|
|
if !IsNil(o.Store) {
|
|
toSerialize["store"] = o.Store
|
|
}
|
|
if !IsNil(o.TokenCount) {
|
|
toSerialize["tokenCount"] = o.TokenCount
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *File) UnmarshalJSON(data []byte) (err error) {
|
|
varFile := _File{}
|
|
|
|
err = json.Unmarshal(data, &varFile)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = File(varFile)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "errorText")
|
|
delete(additionalProperties, "filename")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "size")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "storageProvider")
|
|
delete(additionalProperties, "store")
|
|
delete(additionalProperties, "tokenCount")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFile struct {
|
|
value *File
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFile) Get() *File {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFile) Set(val *File) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFile) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFile) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFile(val *File) *NullableFile {
|
|
return &NullableFile{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFile) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFile) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|