Files
sdk/model_project_projects_object.go

231 lines
6.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 ProjectProjectsObject type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsObject{}
// ProjectProjectsObject struct for ProjectProjectsObject
type ProjectProjectsObject struct {
// ETag is the store's content identity with its quotes removed. For an object written in one part it is the lowercase hex MD5 of the bytes, so a publisher compares it with its own file's digest; a multipart upload's ends in `-<parts>` and equals no single MD5, so it reads as different.
Etag *string `json:"etag,omitempty"`
// Key is the object's path RELATIVE to the deployment prefix — the form an upload names it by and a completion's `keys` lists it in.
Key *string `json:"key,omitempty"`
// Size is the object's length in bytes.
Size *int64 `json:"size,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsObject ProjectProjectsObject
// NewProjectProjectsObject instantiates a new ProjectProjectsObject 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 NewProjectProjectsObject() *ProjectProjectsObject {
this := ProjectProjectsObject{}
return &this
}
// NewProjectProjectsObjectWithDefaults instantiates a new ProjectProjectsObject 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 NewProjectProjectsObjectWithDefaults() *ProjectProjectsObject {
this := ProjectProjectsObject{}
return &this
}
// GetEtag returns the Etag field value if set, zero value otherwise.
func (o *ProjectProjectsObject) GetEtag() string {
if o == nil || IsNil(o.Etag) {
var ret string
return ret
}
return *o.Etag
}
// GetEtagOk returns a tuple with the Etag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsObject) GetEtagOk() (*string, bool) {
if o == nil || IsNil(o.Etag) {
return nil, false
}
return o.Etag, true
}
// HasEtag returns a boolean if a field has been set.
func (o *ProjectProjectsObject) HasEtag() bool {
if o != nil && !IsNil(o.Etag) {
return true
}
return false
}
// SetEtag gets a reference to the given string and assigns it to the Etag field.
func (o *ProjectProjectsObject) SetEtag(v string) {
o.Etag = &v
}
// GetKey returns the Key field value if set, zero value otherwise.
func (o *ProjectProjectsObject) GetKey() string {
if o == nil || IsNil(o.Key) {
var ret string
return ret
}
return *o.Key
}
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsObject) GetKeyOk() (*string, bool) {
if o == nil || IsNil(o.Key) {
return nil, false
}
return o.Key, true
}
// HasKey returns a boolean if a field has been set.
func (o *ProjectProjectsObject) HasKey() bool {
if o != nil && !IsNil(o.Key) {
return true
}
return false
}
// SetKey gets a reference to the given string and assigns it to the Key field.
func (o *ProjectProjectsObject) SetKey(v string) {
o.Key = &v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *ProjectProjectsObject) GetSize() int64 {
if o == nil || IsNil(o.Size) {
var ret int64
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 *ProjectProjectsObject) GetSizeOk() (*int64, 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 *ProjectProjectsObject) HasSize() bool {
if o != nil && !IsNil(o.Size) {
return true
}
return false
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *ProjectProjectsObject) SetSize(v int64) {
o.Size = &v
}
func (o ProjectProjectsObject) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsObject) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Etag) {
toSerialize["etag"] = o.Etag
}
if !IsNil(o.Key) {
toSerialize["key"] = o.Key
}
if !IsNil(o.Size) {
toSerialize["size"] = o.Size
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsObject) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsObject := _ProjectProjectsObject{}
err = json.Unmarshal(data, &varProjectProjectsObject)
if err != nil {
return err
}
*o = ProjectProjectsObject(varProjectProjectsObject)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "etag")
delete(additionalProperties, "key")
delete(additionalProperties, "size")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsObject struct {
value *ProjectProjectsObject
isSet bool
}
func (v NullableProjectProjectsObject) Get() *ProjectProjectsObject {
return v.value
}
func (v *NullableProjectProjectsObject) Set(val *ProjectProjectsObject) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsObject) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsObject) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsObject(val *ProjectProjectsObject) *NullableProjectProjectsObject {
return &NullableProjectProjectsObject{value: val, isSet: true}
}
func (v NullableProjectProjectsObject) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsObject) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}