mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.0 KiB
Go
345 lines
9.0 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 PlatformPipelineRow type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformPipelineRow{}
|
|
|
|
// PlatformPipelineRow struct for PlatformPipelineRow
|
|
type PlatformPipelineRow struct {
|
|
// Duration is how long that run took; empty while it is still queued or building.
|
|
Duration *string `json:"duration,omitempty"`
|
|
// ID is the application id — one pipeline is one application.
|
|
Id *string `json:"id,omitempty"`
|
|
// LastRun is when the most recent deployment started, RFC3339 UTC.
|
|
LastRun *string `json:"lastRun,omitempty"`
|
|
// Name is the application's name.
|
|
Name *string `json:"name,omitempty"`
|
|
// Repo is the git repo or image the pipeline builds from.
|
|
Repo *string `json:"repo,omitempty"`
|
|
// Status is the latest deployment's status, or the app's when it has none.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformPipelineRow PlatformPipelineRow
|
|
|
|
// NewPlatformPipelineRow instantiates a new PlatformPipelineRow 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 NewPlatformPipelineRow() *PlatformPipelineRow {
|
|
this := PlatformPipelineRow{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformPipelineRowWithDefaults instantiates a new PlatformPipelineRow 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 NewPlatformPipelineRowWithDefaults() *PlatformPipelineRow {
|
|
this := PlatformPipelineRow{}
|
|
return &this
|
|
}
|
|
|
|
// GetDuration returns the Duration field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) GetDuration() string {
|
|
if o == nil || IsNil(o.Duration) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Duration
|
|
}
|
|
|
|
// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformPipelineRow) GetDurationOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Duration) {
|
|
return nil, false
|
|
}
|
|
return o.Duration, true
|
|
}
|
|
|
|
// HasDuration returns a boolean if a field has been set.
|
|
func (o *PlatformPipelineRow) HasDuration() bool {
|
|
if o != nil && !IsNil(o.Duration) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDuration gets a reference to the given string and assigns it to the Duration field.
|
|
func (o *PlatformPipelineRow) SetDuration(v string) {
|
|
o.Duration = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLastRun returns the LastRun field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) GetLastRun() string {
|
|
if o == nil || IsNil(o.LastRun) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LastRun
|
|
}
|
|
|
|
// GetLastRunOk returns a tuple with the LastRun field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformPipelineRow) GetLastRunOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LastRun) {
|
|
return nil, false
|
|
}
|
|
return o.LastRun, true
|
|
}
|
|
|
|
// HasLastRun returns a boolean if a field has been set.
|
|
func (o *PlatformPipelineRow) HasLastRun() bool {
|
|
if o != nil && !IsNil(o.LastRun) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastRun gets a reference to the given string and assigns it to the LastRun field.
|
|
func (o *PlatformPipelineRow) SetLastRun(v string) {
|
|
o.LastRun = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) GetRepo() string {
|
|
if o == nil || IsNil(o.Repo) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Repo
|
|
}
|
|
|
|
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformPipelineRow) GetRepoOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Repo) {
|
|
return nil, false
|
|
}
|
|
return o.Repo, true
|
|
}
|
|
|
|
// HasRepo returns a boolean if a field has been set.
|
|
func (o *PlatformPipelineRow) HasRepo() bool {
|
|
if o != nil && !IsNil(o.Repo) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepo gets a reference to the given string and assigns it to the Repo field.
|
|
func (o *PlatformPipelineRow) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) 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 *PlatformPipelineRow) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o PlatformPipelineRow) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformPipelineRow) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Duration) {
|
|
toSerialize["duration"] = o.Duration
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.LastRun) {
|
|
toSerialize["lastRun"] = o.LastRun
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformPipelineRow) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformPipelineRow := _PlatformPipelineRow{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformPipelineRow)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformPipelineRow(varPlatformPipelineRow)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "duration")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "lastRun")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformPipelineRow struct {
|
|
value *PlatformPipelineRow
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformPipelineRow) Get() *PlatformPipelineRow {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformPipelineRow) Set(val *PlatformPipelineRow) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformPipelineRow) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformPipelineRow) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformPipelineRow(val *PlatformPipelineRow) *NullablePlatformPipelineRow {
|
|
return &NullablePlatformPipelineRow{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformPipelineRow) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformPipelineRow) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|