mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.4 KiB
Go
269 lines
6.4 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 CiStep type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CiStep{}
|
|
|
|
// CiStep struct for CiStep
|
|
type CiStep struct {
|
|
// Conclusion is how the step ended; empty until it has.
|
|
Conclusion *string `json:"conclusion,omitempty"`
|
|
// Name is the step's name as the workflow declares it.
|
|
Name *string `json:"name,omitempty"`
|
|
// Number is the step's position in the job, from 1.
|
|
Number *int64 `json:"number,omitempty"`
|
|
// Status is whether the step is over.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CiStep CiStep
|
|
|
|
// NewCiStep instantiates a new CiStep 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 NewCiStep() *CiStep {
|
|
this := CiStep{}
|
|
return &this
|
|
}
|
|
|
|
// NewCiStepWithDefaults instantiates a new CiStep 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 NewCiStepWithDefaults() *CiStep {
|
|
this := CiStep{}
|
|
return &this
|
|
}
|
|
|
|
// GetConclusion returns the Conclusion field value if set, zero value otherwise.
|
|
func (o *CiStep) GetConclusion() string {
|
|
if o == nil || IsNil(o.Conclusion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Conclusion
|
|
}
|
|
|
|
// GetConclusionOk returns a tuple with the Conclusion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiStep) GetConclusionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Conclusion) {
|
|
return nil, false
|
|
}
|
|
return o.Conclusion, true
|
|
}
|
|
|
|
// HasConclusion returns a boolean if a field has been set.
|
|
func (o *CiStep) HasConclusion() bool {
|
|
if o != nil && !IsNil(o.Conclusion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConclusion gets a reference to the given string and assigns it to the Conclusion field.
|
|
func (o *CiStep) SetConclusion(v string) {
|
|
o.Conclusion = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *CiStep) 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 *CiStep) 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 *CiStep) 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 *CiStep) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNumber returns the Number field value if set, zero value otherwise.
|
|
func (o *CiStep) GetNumber() int64 {
|
|
if o == nil || IsNil(o.Number) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Number
|
|
}
|
|
|
|
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiStep) GetNumberOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Number) {
|
|
return nil, false
|
|
}
|
|
return o.Number, true
|
|
}
|
|
|
|
// HasNumber returns a boolean if a field has been set.
|
|
func (o *CiStep) HasNumber() bool {
|
|
if o != nil && !IsNil(o.Number) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNumber gets a reference to the given int64 and assigns it to the Number field.
|
|
func (o *CiStep) SetNumber(v int64) {
|
|
o.Number = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *CiStep) 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 *CiStep) 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 *CiStep) 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 *CiStep) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o CiStep) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CiStep) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Conclusion) {
|
|
toSerialize["conclusion"] = o.Conclusion
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Number) {
|
|
toSerialize["number"] = o.Number
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CiStep) UnmarshalJSON(data []byte) (err error) {
|
|
varCiStep := _CiStep{}
|
|
|
|
err = json.Unmarshal(data, &varCiStep)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CiStep(varCiStep)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "conclusion")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "number")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCiStep struct {
|
|
value *CiStep
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCiStep) Get() *CiStep {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCiStep) Set(val *CiStep) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCiStep) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCiStep) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCiStep(val *CiStep) *NullableCiStep {
|
|
return &NullableCiStep{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCiStep) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCiStep) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|