Files
sdk/model_platform_release_row.go

345 lines
9.2 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 PlatformReleaseRow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformReleaseRow{}
// PlatformReleaseRow struct for PlatformReleaseRow
type PlatformReleaseRow struct {
// Environment is the deploy target the application names.
Environment *string `json:"environment,omitempty"`
// ID is the deployment's id — a release IS a deployment that reached the cluster.
Id *string `json:"id,omitempty"`
// Name is the application the release belongs to.
Name *string `json:"name,omitempty"`
// ReleasedAt is when the deployment last changed, RFC3339 UTC.
ReleasedAt *string `json:"releasedAt,omitempty"`
// Status is deploying or live — the two states that mean released.
Status *string `json:"status,omitempty"`
// Version is the released image tag, or v<n> when the image carries none.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformReleaseRow PlatformReleaseRow
// NewPlatformReleaseRow instantiates a new PlatformReleaseRow 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 NewPlatformReleaseRow() *PlatformReleaseRow {
this := PlatformReleaseRow{}
return &this
}
// NewPlatformReleaseRowWithDefaults instantiates a new PlatformReleaseRow 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 NewPlatformReleaseRowWithDefaults() *PlatformReleaseRow {
this := PlatformReleaseRow{}
return &this
}
// GetEnvironment returns the Environment field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetEnvironment() string {
if o == nil || IsNil(o.Environment) {
var ret string
return ret
}
return *o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetEnvironmentOk() (*string, bool) {
if o == nil || IsNil(o.Environment) {
return nil, false
}
return o.Environment, true
}
// HasEnvironment returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasEnvironment() bool {
if o != nil && !IsNil(o.Environment) {
return true
}
return false
}
// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
func (o *PlatformReleaseRow) SetEnvironment(v string) {
o.Environment = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *PlatformReleaseRow) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *PlatformReleaseRow) SetName(v string) {
o.Name = &v
}
// GetReleasedAt returns the ReleasedAt field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetReleasedAt() string {
if o == nil || IsNil(o.ReleasedAt) {
var ret string
return ret
}
return *o.ReleasedAt
}
// GetReleasedAtOk returns a tuple with the ReleasedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetReleasedAtOk() (*string, bool) {
if o == nil || IsNil(o.ReleasedAt) {
return nil, false
}
return o.ReleasedAt, true
}
// HasReleasedAt returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasReleasedAt() bool {
if o != nil && !IsNil(o.ReleasedAt) {
return true
}
return false
}
// SetReleasedAt gets a reference to the given string and assigns it to the ReleasedAt field.
func (o *PlatformReleaseRow) SetReleasedAt(v string) {
o.ReleasedAt = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *PlatformReleaseRow) SetStatus(v string) {
o.Status = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *PlatformReleaseRow) GetVersion() string {
if o == nil || IsNil(o.Version) {
var ret string
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformReleaseRow) GetVersionOk() (*string, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *PlatformReleaseRow) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *PlatformReleaseRow) SetVersion(v string) {
o.Version = &v
}
func (o PlatformReleaseRow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformReleaseRow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Environment) {
toSerialize["environment"] = o.Environment
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.ReleasedAt) {
toSerialize["releasedAt"] = o.ReleasedAt
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformReleaseRow) UnmarshalJSON(data []byte) (err error) {
varPlatformReleaseRow := _PlatformReleaseRow{}
err = json.Unmarshal(data, &varPlatformReleaseRow)
if err != nil {
return err
}
*o = PlatformReleaseRow(varPlatformReleaseRow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "environment")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "releasedAt")
delete(additionalProperties, "status")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformReleaseRow struct {
value *PlatformReleaseRow
isSet bool
}
func (v NullablePlatformReleaseRow) Get() *PlatformReleaseRow {
return v.value
}
func (v *NullablePlatformReleaseRow) Set(val *PlatformReleaseRow) {
v.value = val
v.isSet = true
}
func (v NullablePlatformReleaseRow) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformReleaseRow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformReleaseRow(val *PlatformReleaseRow) *NullablePlatformReleaseRow {
return &NullablePlatformReleaseRow{value: val, isSet: true}
}
func (v NullablePlatformReleaseRow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformReleaseRow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}