Files
sdk/model_platform_runner_build_resp.go

459 lines
13 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 PlatformRunnerBuildResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformRunnerBuildResp{}
// PlatformRunnerBuildResp struct for PlatformRunnerBuildResp
type PlatformRunnerBuildResp struct {
// BuildJobID is the queued build's id, and what its progress is read by.
BuildJobId *string `json:"buildJobId,omitempty"`
// Image is the ref the image lane will push.
Image *string `json:"image,omitempty"`
// Index is the binaries.json URL the artifact lane will publish.
Index *string `json:"index,omitempty"`
// Platforms are the architectures the image lane will publish, echoed back.
Platforms []string `json:"platforms,omitempty"`
// Reason is why a failed build failed, as the cluster said it: the solve's error line (`error: failed to solve: ...`), a container waiting on what it cannot have, or the deadline.
Reason *string `json:"reason,omitempty"`
// RunnerPool is the runner class the build was placed on.
RunnerPool *string `json:"runnerPool,omitempty"`
// Status is `queued` until the build finishes, then `succeeded` or `failed`. The POST answers `queued`: a build that is accepted has not finished.
Status *string `json:"status,omitempty"`
// Tags are the extra tags the image lane will write beside Image, onto the same manifest: the request's, deduplicated. This is the promise — a tag absent here will not be written.
Tags []string `json:"tags,omitempty"`
// Target is the multi-stage build target, echoed back.
Target *string `json:"target,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformRunnerBuildResp PlatformRunnerBuildResp
// NewPlatformRunnerBuildResp instantiates a new PlatformRunnerBuildResp 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 NewPlatformRunnerBuildResp() *PlatformRunnerBuildResp {
this := PlatformRunnerBuildResp{}
return &this
}
// NewPlatformRunnerBuildRespWithDefaults instantiates a new PlatformRunnerBuildResp 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 NewPlatformRunnerBuildRespWithDefaults() *PlatformRunnerBuildResp {
this := PlatformRunnerBuildResp{}
return &this
}
// GetBuildJobId returns the BuildJobId field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetBuildJobId() string {
if o == nil || IsNil(o.BuildJobId) {
var ret string
return ret
}
return *o.BuildJobId
}
// GetBuildJobIdOk returns a tuple with the BuildJobId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetBuildJobIdOk() (*string, bool) {
if o == nil || IsNil(o.BuildJobId) {
return nil, false
}
return o.BuildJobId, true
}
// HasBuildJobId returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasBuildJobId() bool {
if o != nil && !IsNil(o.BuildJobId) {
return true
}
return false
}
// SetBuildJobId gets a reference to the given string and assigns it to the BuildJobId field.
func (o *PlatformRunnerBuildResp) SetBuildJobId(v string) {
o.BuildJobId = &v
}
// GetImage returns the Image field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetImage() string {
if o == nil || IsNil(o.Image) {
var ret string
return ret
}
return *o.Image
}
// GetImageOk returns a tuple with the Image field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetImageOk() (*string, bool) {
if o == nil || IsNil(o.Image) {
return nil, false
}
return o.Image, true
}
// HasImage returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasImage() bool {
if o != nil && !IsNil(o.Image) {
return true
}
return false
}
// SetImage gets a reference to the given string and assigns it to the Image field.
func (o *PlatformRunnerBuildResp) SetImage(v string) {
o.Image = &v
}
// GetIndex returns the Index field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetIndex() string {
if o == nil || IsNil(o.Index) {
var ret string
return ret
}
return *o.Index
}
// GetIndexOk returns a tuple with the Index field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetIndexOk() (*string, bool) {
if o == nil || IsNil(o.Index) {
return nil, false
}
return o.Index, true
}
// HasIndex returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasIndex() bool {
if o != nil && !IsNil(o.Index) {
return true
}
return false
}
// SetIndex gets a reference to the given string and assigns it to the Index field.
func (o *PlatformRunnerBuildResp) SetIndex(v string) {
o.Index = &v
}
// GetPlatforms returns the Platforms field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetPlatforms() []string {
if o == nil || IsNil(o.Platforms) {
var ret []string
return ret
}
return o.Platforms
}
// GetPlatformsOk returns a tuple with the Platforms field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetPlatformsOk() ([]string, bool) {
if o == nil || IsNil(o.Platforms) {
return nil, false
}
return o.Platforms, true
}
// HasPlatforms returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasPlatforms() bool {
if o != nil && !IsNil(o.Platforms) {
return true
}
return false
}
// SetPlatforms gets a reference to the given []string and assigns it to the Platforms field.
func (o *PlatformRunnerBuildResp) SetPlatforms(v []string) {
o.Platforms = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *PlatformRunnerBuildResp) SetReason(v string) {
o.Reason = &v
}
// GetRunnerPool returns the RunnerPool field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetRunnerPool() string {
if o == nil || IsNil(o.RunnerPool) {
var ret string
return ret
}
return *o.RunnerPool
}
// GetRunnerPoolOk returns a tuple with the RunnerPool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetRunnerPoolOk() (*string, bool) {
if o == nil || IsNil(o.RunnerPool) {
return nil, false
}
return o.RunnerPool, true
}
// HasRunnerPool returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasRunnerPool() bool {
if o != nil && !IsNil(o.RunnerPool) {
return true
}
return false
}
// SetRunnerPool gets a reference to the given string and assigns it to the RunnerPool field.
func (o *PlatformRunnerBuildResp) SetRunnerPool(v string) {
o.RunnerPool = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) 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 *PlatformRunnerBuildResp) 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 *PlatformRunnerBuildResp) 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 *PlatformRunnerBuildResp) SetStatus(v string) {
o.Status = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetTags() []string {
if o == nil || IsNil(o.Tags) {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetTagsOk() ([]string, bool) {
if o == nil || IsNil(o.Tags) {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasTags() bool {
if o != nil && !IsNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *PlatformRunnerBuildResp) SetTags(v []string) {
o.Tags = v
}
// GetTarget returns the Target field value if set, zero value otherwise.
func (o *PlatformRunnerBuildResp) GetTarget() string {
if o == nil || IsNil(o.Target) {
var ret string
return ret
}
return *o.Target
}
// GetTargetOk returns a tuple with the Target field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformRunnerBuildResp) GetTargetOk() (*string, bool) {
if o == nil || IsNil(o.Target) {
return nil, false
}
return o.Target, true
}
// HasTarget returns a boolean if a field has been set.
func (o *PlatformRunnerBuildResp) HasTarget() bool {
if o != nil && !IsNil(o.Target) {
return true
}
return false
}
// SetTarget gets a reference to the given string and assigns it to the Target field.
func (o *PlatformRunnerBuildResp) SetTarget(v string) {
o.Target = &v
}
func (o PlatformRunnerBuildResp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformRunnerBuildResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.BuildJobId) {
toSerialize["buildJobId"] = o.BuildJobId
}
if !IsNil(o.Image) {
toSerialize["image"] = o.Image
}
if !IsNil(o.Index) {
toSerialize["index"] = o.Index
}
if !IsNil(o.Platforms) {
toSerialize["platforms"] = o.Platforms
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.RunnerPool) {
toSerialize["runnerPool"] = o.RunnerPool
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
if !IsNil(o.Target) {
toSerialize["target"] = o.Target
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformRunnerBuildResp) UnmarshalJSON(data []byte) (err error) {
varPlatformRunnerBuildResp := _PlatformRunnerBuildResp{}
err = json.Unmarshal(data, &varPlatformRunnerBuildResp)
if err != nil {
return err
}
*o = PlatformRunnerBuildResp(varPlatformRunnerBuildResp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "buildJobId")
delete(additionalProperties, "image")
delete(additionalProperties, "index")
delete(additionalProperties, "platforms")
delete(additionalProperties, "reason")
delete(additionalProperties, "runnerPool")
delete(additionalProperties, "status")
delete(additionalProperties, "tags")
delete(additionalProperties, "target")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformRunnerBuildResp struct {
value *PlatformRunnerBuildResp
isSet bool
}
func (v NullablePlatformRunnerBuildResp) Get() *PlatformRunnerBuildResp {
return v.value
}
func (v *NullablePlatformRunnerBuildResp) Set(val *PlatformRunnerBuildResp) {
v.value = val
v.isSet = true
}
func (v NullablePlatformRunnerBuildResp) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformRunnerBuildResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformRunnerBuildResp(val *PlatformRunnerBuildResp) *NullablePlatformRunnerBuildResp {
return &NullablePlatformRunnerBuildResp{value: val, isSet: true}
}
func (v NullablePlatformRunnerBuildResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformRunnerBuildResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}