/* STACKIT IaaS API This API allows you to create and modify IaaS resources. API version: 2beta1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaasbeta import ( "encoding/json" "time" ) // checks if the Project type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Project{} /* types and functions for areaId */ // isModel type ProjectGetAreaIdAttributeType = *AreaId type ProjectGetAreaIdArgType = AreaId type ProjectGetAreaIdRetType = AreaId func getProjectGetAreaIdAttributeTypeOk(arg ProjectGetAreaIdAttributeType) (ret ProjectGetAreaIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectGetAreaIdAttributeType(arg *ProjectGetAreaIdAttributeType, val ProjectGetAreaIdRetType) { *arg = &val } /* types and functions for createdAt */ // isDateTime type ProjectGetCreatedAtAttributeType = *time.Time type ProjectGetCreatedAtArgType = time.Time type ProjectGetCreatedAtRetType = time.Time func getProjectGetCreatedAtAttributeTypeOk(arg ProjectGetCreatedAtAttributeType) (ret ProjectGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectGetCreatedAtAttributeType(arg *ProjectGetCreatedAtAttributeType, val ProjectGetCreatedAtRetType) { *arg = &val } /* types and functions for id */ // isNotNullableString type ProjectGetIdAttributeType = *string func getProjectGetIdAttributeTypeOk(arg ProjectGetIdAttributeType) (ret ProjectGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectGetIdAttributeType(arg *ProjectGetIdAttributeType, val ProjectGetIdRetType) { *arg = &val } type ProjectGetIdArgType = string type ProjectGetIdRetType = string /* types and functions for internetAccess */ // isBoolean type ProjectgetInternetAccessAttributeType = *bool type ProjectgetInternetAccessArgType = bool type ProjectgetInternetAccessRetType = bool func getProjectgetInternetAccessAttributeTypeOk(arg ProjectgetInternetAccessAttributeType) (ret ProjectgetInternetAccessRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectgetInternetAccessAttributeType(arg *ProjectgetInternetAccessAttributeType, val ProjectgetInternetAccessRetType) { *arg = &val } /* types and functions for status */ // isNotNullableString type ProjectGetStatusAttributeType = *string func getProjectGetStatusAttributeTypeOk(arg ProjectGetStatusAttributeType) (ret ProjectGetStatusRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectGetStatusAttributeType(arg *ProjectGetStatusAttributeType, val ProjectGetStatusRetType) { *arg = &val } type ProjectGetStatusArgType = string type ProjectGetStatusRetType = string /* types and functions for updatedAt */ // isDateTime type ProjectGetUpdatedAtAttributeType = *time.Time type ProjectGetUpdatedAtArgType = time.Time type ProjectGetUpdatedAtRetType = time.Time func getProjectGetUpdatedAtAttributeTypeOk(arg ProjectGetUpdatedAtAttributeType) (ret ProjectGetUpdatedAtRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setProjectGetUpdatedAtAttributeType(arg *ProjectGetUpdatedAtAttributeType, val ProjectGetUpdatedAtRetType) { *arg = &val } // Project Object that represents a STACKIT project. type Project struct { // REQUIRED AreaId ProjectGetAreaIdAttributeType `json:"areaId" required:"true"` // Date-time when resource was created. CreatedAt ProjectGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). // REQUIRED Id ProjectGetIdAttributeType `json:"id" required:"true"` InternetAccess ProjectgetInternetAccessAttributeType `json:"internetAccess,omitempty"` // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED Status ProjectGetStatusAttributeType `json:"status" required:"true"` // Date-time when resource was last updated. UpdatedAt ProjectGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` } type _Project Project // NewProject instantiates a new Project 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 NewProject(areaId ProjectGetAreaIdArgType, id ProjectGetIdArgType, status ProjectGetStatusArgType) *Project { this := Project{} setProjectGetAreaIdAttributeType(&this.AreaId, areaId) setProjectGetIdAttributeType(&this.Id, id) setProjectGetStatusAttributeType(&this.Status, status) return &this } // NewProjectWithDefaults instantiates a new Project 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 NewProjectWithDefaults() *Project { this := Project{} return &this } // GetAreaId returns the AreaId field value func (o *Project) GetAreaId() (ret ProjectGetAreaIdRetType) { ret, _ = o.GetAreaIdOk() return ret } // GetAreaIdOk returns a tuple with the AreaId field value // and a boolean to check if the value has been set. func (o *Project) GetAreaIdOk() (ret ProjectGetAreaIdRetType, ok bool) { return getProjectGetAreaIdAttributeTypeOk(o.AreaId) } // SetAreaId sets field value func (o *Project) SetAreaId(v ProjectGetAreaIdRetType) { setProjectGetAreaIdAttributeType(&o.AreaId, v) } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Project) GetCreatedAt() (res ProjectGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return } // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Project) GetCreatedAtOk() (ret ProjectGetCreatedAtRetType, ok bool) { return getProjectGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. func (o *Project) HasCreatedAt() bool { _, ok := o.GetCreatedAtOk() return ok } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. func (o *Project) SetCreatedAt(v ProjectGetCreatedAtRetType) { setProjectGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value func (o *Project) GetId() (ret ProjectGetIdRetType) { ret, _ = o.GetIdOk() return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. func (o *Project) GetIdOk() (ret ProjectGetIdRetType, ok bool) { return getProjectGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *Project) SetId(v ProjectGetIdRetType) { setProjectGetIdAttributeType(&o.Id, v) } // GetInternetAccess returns the InternetAccess field value if set, zero value otherwise. func (o *Project) GetInternetAccess() (res ProjectgetInternetAccessRetType) { res, _ = o.GetInternetAccessOk() return } // GetInternetAccessOk returns a tuple with the InternetAccess field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Project) GetInternetAccessOk() (ret ProjectgetInternetAccessRetType, ok bool) { return getProjectgetInternetAccessAttributeTypeOk(o.InternetAccess) } // HasInternetAccess returns a boolean if a field has been set. func (o *Project) HasInternetAccess() bool { _, ok := o.GetInternetAccessOk() return ok } // SetInternetAccess gets a reference to the given bool and assigns it to the InternetAccess field. func (o *Project) SetInternetAccess(v ProjectgetInternetAccessRetType) { setProjectgetInternetAccessAttributeType(&o.InternetAccess, v) } // GetStatus returns the Status field value func (o *Project) GetStatus() (ret ProjectGetStatusRetType) { ret, _ = o.GetStatusOk() return ret } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. func (o *Project) GetStatusOk() (ret ProjectGetStatusRetType, ok bool) { return getProjectGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value func (o *Project) SetStatus(v ProjectGetStatusRetType) { setProjectGetStatusAttributeType(&o.Status, v) } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Project) GetUpdatedAt() (res ProjectGetUpdatedAtRetType) { res, _ = o.GetUpdatedAtOk() return } // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Project) GetUpdatedAtOk() (ret ProjectGetUpdatedAtRetType, ok bool) { return getProjectGetUpdatedAtAttributeTypeOk(o.UpdatedAt) } // HasUpdatedAt returns a boolean if a field has been set. func (o *Project) HasUpdatedAt() bool { _, ok := o.GetUpdatedAtOk() return ok } // SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. func (o *Project) SetUpdatedAt(v ProjectGetUpdatedAtRetType) { setProjectGetUpdatedAtAttributeType(&o.UpdatedAt, v) } func (o Project) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getProjectGetAreaIdAttributeTypeOk(o.AreaId); ok { toSerialize["AreaId"] = val } if val, ok := getProjectGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } if val, ok := getProjectGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getProjectgetInternetAccessAttributeTypeOk(o.InternetAccess); ok { toSerialize["InternetAccess"] = val } if val, ok := getProjectGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } if val, ok := getProjectGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { toSerialize["UpdatedAt"] = val } return toSerialize, nil } type NullableProject struct { value *Project isSet bool } func (v NullableProject) Get() *Project { return v.value } func (v *NullableProject) Set(val *Project) { v.value = val v.isSet = true } func (v NullableProject) IsSet() bool { return v.isSet } func (v *NullableProject) Unset() { v.value = nil v.isSet = false } func NewNullableProject(val *Project) *NullableProject { return &NullableProject{value: val, isSet: true} } func (v NullableProject) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableProject) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }