mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
382 lines
9.3 KiB
Go
382 lines
9.3 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 FormExport type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormExport{}
|
|
|
|
// FormExport struct for FormExport
|
|
type FormExport struct {
|
|
// CSV is the responses as CSV, for csv: one row each, one column per field, then the hidden values, the respondent and the times.
|
|
Csv *string `json:"csv,omitempty"`
|
|
// Filename is what to save it as.
|
|
Filename *string `json:"filename,omitempty"`
|
|
// Format is json or csv.
|
|
Format *string `json:"format,omitempty"`
|
|
// Items are the responses, for json.
|
|
Items []FormResponse `json:"items,omitempty"`
|
|
Next *int64 `json:"next,omitempty"`
|
|
// Page is this page; Next the page after it, 0 when this is the last.
|
|
Page *int64 `json:"page,omitempty"`
|
|
// Total is how many responses answer the filter.
|
|
Total *int64 `json:"total,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormExport FormExport
|
|
|
|
// NewFormExport instantiates a new FormExport 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 NewFormExport() *FormExport {
|
|
this := FormExport{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormExportWithDefaults instantiates a new FormExport 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 NewFormExportWithDefaults() *FormExport {
|
|
this := FormExport{}
|
|
return &this
|
|
}
|
|
|
|
// GetCsv returns the Csv field value if set, zero value otherwise.
|
|
func (o *FormExport) GetCsv() string {
|
|
if o == nil || IsNil(o.Csv) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Csv
|
|
}
|
|
|
|
// GetCsvOk returns a tuple with the Csv field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormExport) GetCsvOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Csv) {
|
|
return nil, false
|
|
}
|
|
return o.Csv, true
|
|
}
|
|
|
|
// HasCsv returns a boolean if a field has been set.
|
|
func (o *FormExport) HasCsv() bool {
|
|
if o != nil && !IsNil(o.Csv) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCsv gets a reference to the given string and assigns it to the Csv field.
|
|
func (o *FormExport) SetCsv(v string) {
|
|
o.Csv = &v
|
|
}
|
|
|
|
// GetFilename returns the Filename field value if set, zero value otherwise.
|
|
func (o *FormExport) 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 *FormExport) 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 *FormExport) 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 *FormExport) SetFilename(v string) {
|
|
o.Filename = &v
|
|
}
|
|
|
|
// GetFormat returns the Format field value if set, zero value otherwise.
|
|
func (o *FormExport) GetFormat() string {
|
|
if o == nil || IsNil(o.Format) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Format
|
|
}
|
|
|
|
// GetFormatOk returns a tuple with the Format field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormExport) GetFormatOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Format) {
|
|
return nil, false
|
|
}
|
|
return o.Format, true
|
|
}
|
|
|
|
// HasFormat returns a boolean if a field has been set.
|
|
func (o *FormExport) HasFormat() bool {
|
|
if o != nil && !IsNil(o.Format) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFormat gets a reference to the given string and assigns it to the Format field.
|
|
func (o *FormExport) SetFormat(v string) {
|
|
o.Format = &v
|
|
}
|
|
|
|
// GetItems returns the Items field value if set, zero value otherwise.
|
|
func (o *FormExport) GetItems() []FormResponse {
|
|
if o == nil || IsNil(o.Items) {
|
|
var ret []FormResponse
|
|
return ret
|
|
}
|
|
return o.Items
|
|
}
|
|
|
|
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormExport) GetItemsOk() ([]FormResponse, bool) {
|
|
if o == nil || IsNil(o.Items) {
|
|
return nil, false
|
|
}
|
|
return o.Items, true
|
|
}
|
|
|
|
// HasItems returns a boolean if a field has been set.
|
|
func (o *FormExport) HasItems() bool {
|
|
if o != nil && !IsNil(o.Items) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetItems gets a reference to the given []FormResponse and assigns it to the Items field.
|
|
func (o *FormExport) SetItems(v []FormResponse) {
|
|
o.Items = v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *FormExport) GetNext() int64 {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormExport) GetNextOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *FormExport) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given int64 and assigns it to the Next field.
|
|
func (o *FormExport) SetNext(v int64) {
|
|
o.Next = &v
|
|
}
|
|
|
|
// GetPage returns the Page field value if set, zero value otherwise.
|
|
func (o *FormExport) GetPage() int64 {
|
|
if o == nil || IsNil(o.Page) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Page
|
|
}
|
|
|
|
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormExport) GetPageOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Page) {
|
|
return nil, false
|
|
}
|
|
return o.Page, true
|
|
}
|
|
|
|
// HasPage returns a boolean if a field has been set.
|
|
func (o *FormExport) HasPage() bool {
|
|
if o != nil && !IsNil(o.Page) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPage gets a reference to the given int64 and assigns it to the Page field.
|
|
func (o *FormExport) SetPage(v int64) {
|
|
o.Page = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *FormExport) 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 *FormExport) 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 *FormExport) 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 *FormExport) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
func (o FormExport) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormExport) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Csv) {
|
|
toSerialize["csv"] = o.Csv
|
|
}
|
|
if !IsNil(o.Filename) {
|
|
toSerialize["filename"] = o.Filename
|
|
}
|
|
if !IsNil(o.Format) {
|
|
toSerialize["format"] = o.Format
|
|
}
|
|
if !IsNil(o.Items) {
|
|
toSerialize["items"] = o.Items
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
if !IsNil(o.Page) {
|
|
toSerialize["page"] = o.Page
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormExport) UnmarshalJSON(data []byte) (err error) {
|
|
varFormExport := _FormExport{}
|
|
|
|
err = json.Unmarshal(data, &varFormExport)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormExport(varFormExport)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "csv")
|
|
delete(additionalProperties, "filename")
|
|
delete(additionalProperties, "format")
|
|
delete(additionalProperties, "items")
|
|
delete(additionalProperties, "next")
|
|
delete(additionalProperties, "page")
|
|
delete(additionalProperties, "total")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormExport struct {
|
|
value *FormExport
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormExport) Get() *FormExport {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormExport) Set(val *FormExport) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormExport) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormExport) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormExport(val *FormExport) *NullableFormExport {
|
|
return &NullableFormExport{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormExport) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormExport) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|