mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.8 KiB
Go
307 lines
7.8 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 SpaceFileList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SpaceFileList{}
|
|
|
|
// SpaceFileList struct for SpaceFileList
|
|
type SpaceFileList struct {
|
|
// Drive is the drive that was listed.
|
|
Drive *string `json:"drive,omitempty"`
|
|
// Files are the entries at this level, names RELATIVE to Folder.
|
|
Files []SpaceFileItem `json:"files,omitempty"`
|
|
// Folder is the sub-folder the listing was scoped to, cleaned. Empty for the drive's own root.
|
|
Folder *string `json:"folder,omitempty"`
|
|
// Space is the space that was listed.
|
|
Space *string `json:"space,omitempty"`
|
|
// Total is how many entries came back. The listing is BOUNDED, so a drive with more files than the cap answers the cap and this says so — it is not a count of what the drive holds.
|
|
Total *int64 `json:"total,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SpaceFileList SpaceFileList
|
|
|
|
// NewSpaceFileList instantiates a new SpaceFileList 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 NewSpaceFileList() *SpaceFileList {
|
|
this := SpaceFileList{}
|
|
return &this
|
|
}
|
|
|
|
// NewSpaceFileListWithDefaults instantiates a new SpaceFileList 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 NewSpaceFileListWithDefaults() *SpaceFileList {
|
|
this := SpaceFileList{}
|
|
return &this
|
|
}
|
|
|
|
// GetDrive returns the Drive field value if set, zero value otherwise.
|
|
func (o *SpaceFileList) GetDrive() string {
|
|
if o == nil || IsNil(o.Drive) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Drive
|
|
}
|
|
|
|
// GetDriveOk returns a tuple with the Drive field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SpaceFileList) GetDriveOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Drive) {
|
|
return nil, false
|
|
}
|
|
return o.Drive, true
|
|
}
|
|
|
|
// HasDrive returns a boolean if a field has been set.
|
|
func (o *SpaceFileList) HasDrive() bool {
|
|
if o != nil && !IsNil(o.Drive) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDrive gets a reference to the given string and assigns it to the Drive field.
|
|
func (o *SpaceFileList) SetDrive(v string) {
|
|
o.Drive = &v
|
|
}
|
|
|
|
// GetFiles returns the Files field value if set, zero value otherwise.
|
|
func (o *SpaceFileList) GetFiles() []SpaceFileItem {
|
|
if o == nil || IsNil(o.Files) {
|
|
var ret []SpaceFileItem
|
|
return ret
|
|
}
|
|
return o.Files
|
|
}
|
|
|
|
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SpaceFileList) GetFilesOk() ([]SpaceFileItem, bool) {
|
|
if o == nil || IsNil(o.Files) {
|
|
return nil, false
|
|
}
|
|
return o.Files, true
|
|
}
|
|
|
|
// HasFiles returns a boolean if a field has been set.
|
|
func (o *SpaceFileList) HasFiles() bool {
|
|
if o != nil && !IsNil(o.Files) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFiles gets a reference to the given []SpaceFileItem and assigns it to the Files field.
|
|
func (o *SpaceFileList) SetFiles(v []SpaceFileItem) {
|
|
o.Files = v
|
|
}
|
|
|
|
// GetFolder returns the Folder field value if set, zero value otherwise.
|
|
func (o *SpaceFileList) GetFolder() string {
|
|
if o == nil || IsNil(o.Folder) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Folder
|
|
}
|
|
|
|
// GetFolderOk returns a tuple with the Folder field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SpaceFileList) GetFolderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Folder) {
|
|
return nil, false
|
|
}
|
|
return o.Folder, true
|
|
}
|
|
|
|
// HasFolder returns a boolean if a field has been set.
|
|
func (o *SpaceFileList) HasFolder() bool {
|
|
if o != nil && !IsNil(o.Folder) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFolder gets a reference to the given string and assigns it to the Folder field.
|
|
func (o *SpaceFileList) SetFolder(v string) {
|
|
o.Folder = &v
|
|
}
|
|
|
|
// GetSpace returns the Space field value if set, zero value otherwise.
|
|
func (o *SpaceFileList) GetSpace() string {
|
|
if o == nil || IsNil(o.Space) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Space
|
|
}
|
|
|
|
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SpaceFileList) GetSpaceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Space) {
|
|
return nil, false
|
|
}
|
|
return o.Space, true
|
|
}
|
|
|
|
// HasSpace returns a boolean if a field has been set.
|
|
func (o *SpaceFileList) HasSpace() bool {
|
|
if o != nil && !IsNil(o.Space) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSpace gets a reference to the given string and assigns it to the Space field.
|
|
func (o *SpaceFileList) SetSpace(v string) {
|
|
o.Space = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *SpaceFileList) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SpaceFileList) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *SpaceFileList) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *SpaceFileList) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
func (o SpaceFileList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SpaceFileList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Drive) {
|
|
toSerialize["drive"] = o.Drive
|
|
}
|
|
if !IsNil(o.Files) {
|
|
toSerialize["files"] = o.Files
|
|
}
|
|
if !IsNil(o.Folder) {
|
|
toSerialize["folder"] = o.Folder
|
|
}
|
|
if !IsNil(o.Space) {
|
|
toSerialize["space"] = o.Space
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SpaceFileList) UnmarshalJSON(data []byte) (err error) {
|
|
varSpaceFileList := _SpaceFileList{}
|
|
|
|
err = json.Unmarshal(data, &varSpaceFileList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SpaceFileList(varSpaceFileList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "drive")
|
|
delete(additionalProperties, "files")
|
|
delete(additionalProperties, "folder")
|
|
delete(additionalProperties, "space")
|
|
delete(additionalProperties, "total")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSpaceFileList struct {
|
|
value *SpaceFileList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSpaceFileList) Get() *SpaceFileList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSpaceFileList) Set(val *SpaceFileList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSpaceFileList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSpaceFileList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSpaceFileList(val *SpaceFileList) *NullableSpaceFileList {
|
|
return &NullableSpaceFileList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSpaceFileList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSpaceFileList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|