Files
sdk/model_s3_upload_gone.go

155 lines
3.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 S3UploadGone type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &S3UploadGone{}
// S3UploadGone struct for S3UploadGone
type S3UploadGone struct {
// Upload is the id of the upload abandoned; its stored parts are deleted.
Upload *string `json:"upload,omitempty"`
AdditionalProperties map[string]interface{}
}
type _S3UploadGone S3UploadGone
// NewS3UploadGone instantiates a new S3UploadGone 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 NewS3UploadGone() *S3UploadGone {
this := S3UploadGone{}
return &this
}
// NewS3UploadGoneWithDefaults instantiates a new S3UploadGone 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 NewS3UploadGoneWithDefaults() *S3UploadGone {
this := S3UploadGone{}
return &this
}
// GetUpload returns the Upload field value if set, zero value otherwise.
func (o *S3UploadGone) GetUpload() string {
if o == nil || IsNil(o.Upload) {
var ret string
return ret
}
return *o.Upload
}
// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *S3UploadGone) GetUploadOk() (*string, bool) {
if o == nil || IsNil(o.Upload) {
return nil, false
}
return o.Upload, true
}
// HasUpload returns a boolean if a field has been set.
func (o *S3UploadGone) HasUpload() bool {
if o != nil && !IsNil(o.Upload) {
return true
}
return false
}
// SetUpload gets a reference to the given string and assigns it to the Upload field.
func (o *S3UploadGone) SetUpload(v string) {
o.Upload = &v
}
func (o S3UploadGone) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o S3UploadGone) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Upload) {
toSerialize["upload"] = o.Upload
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *S3UploadGone) UnmarshalJSON(data []byte) (err error) {
varS3UploadGone := _S3UploadGone{}
err = json.Unmarshal(data, &varS3UploadGone)
if err != nil {
return err
}
*o = S3UploadGone(varS3UploadGone)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "upload")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableS3UploadGone struct {
value *S3UploadGone
isSet bool
}
func (v NullableS3UploadGone) Get() *S3UploadGone {
return v.value
}
func (v *NullableS3UploadGone) Set(val *S3UploadGone) {
v.value = val
v.isSet = true
}
func (v NullableS3UploadGone) IsSet() bool {
return v.isSet
}
func (v *NullableS3UploadGone) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableS3UploadGone(val *S3UploadGone) *NullableS3UploadGone {
return &NullableS3UploadGone{value: val, isSet: true}
}
func (v NullableS3UploadGone) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableS3UploadGone) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}