Files
sdk/model_ci_pipelines.go

303 lines
7.6 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"
"time"
)
// checks if the CiPipelines type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CiPipelines{}
// CiPipelines struct for CiPipelines
type CiPipelines struct {
FetchedAt *time.Time `json:"fetchedAt,omitempty"`
Orgs []string `json:"orgs,omitempty"`
Services []CiPipeline `json:"services,omitempty"`
SourceErr *string `json:"sourceErr,omitempty"`
Stale *bool `json:"stale,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CiPipelines CiPipelines
// NewCiPipelines instantiates a new CiPipelines 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 NewCiPipelines() *CiPipelines {
this := CiPipelines{}
return &this
}
// NewCiPipelinesWithDefaults instantiates a new CiPipelines 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 NewCiPipelinesWithDefaults() *CiPipelines {
this := CiPipelines{}
return &this
}
// GetFetchedAt returns the FetchedAt field value if set, zero value otherwise.
func (o *CiPipelines) GetFetchedAt() time.Time {
if o == nil || IsNil(o.FetchedAt) {
var ret time.Time
return ret
}
return *o.FetchedAt
}
// GetFetchedAtOk returns a tuple with the FetchedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CiPipelines) GetFetchedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.FetchedAt) {
return nil, false
}
return o.FetchedAt, true
}
// HasFetchedAt returns a boolean if a field has been set.
func (o *CiPipelines) HasFetchedAt() bool {
if o != nil && !IsNil(o.FetchedAt) {
return true
}
return false
}
// SetFetchedAt gets a reference to the given time.Time and assigns it to the FetchedAt field.
func (o *CiPipelines) SetFetchedAt(v time.Time) {
o.FetchedAt = &v
}
// GetOrgs returns the Orgs field value if set, zero value otherwise.
func (o *CiPipelines) GetOrgs() []string {
if o == nil || IsNil(o.Orgs) {
var ret []string
return ret
}
return o.Orgs
}
// GetOrgsOk returns a tuple with the Orgs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CiPipelines) GetOrgsOk() ([]string, bool) {
if o == nil || IsNil(o.Orgs) {
return nil, false
}
return o.Orgs, true
}
// HasOrgs returns a boolean if a field has been set.
func (o *CiPipelines) HasOrgs() bool {
if o != nil && !IsNil(o.Orgs) {
return true
}
return false
}
// SetOrgs gets a reference to the given []string and assigns it to the Orgs field.
func (o *CiPipelines) SetOrgs(v []string) {
o.Orgs = v
}
// GetServices returns the Services field value if set, zero value otherwise.
func (o *CiPipelines) GetServices() []CiPipeline {
if o == nil || IsNil(o.Services) {
var ret []CiPipeline
return ret
}
return o.Services
}
// GetServicesOk returns a tuple with the Services field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CiPipelines) GetServicesOk() ([]CiPipeline, bool) {
if o == nil || IsNil(o.Services) {
return nil, false
}
return o.Services, true
}
// HasServices returns a boolean if a field has been set.
func (o *CiPipelines) HasServices() bool {
if o != nil && !IsNil(o.Services) {
return true
}
return false
}
// SetServices gets a reference to the given []CiPipeline and assigns it to the Services field.
func (o *CiPipelines) SetServices(v []CiPipeline) {
o.Services = v
}
// GetSourceErr returns the SourceErr field value if set, zero value otherwise.
func (o *CiPipelines) GetSourceErr() string {
if o == nil || IsNil(o.SourceErr) {
var ret string
return ret
}
return *o.SourceErr
}
// GetSourceErrOk returns a tuple with the SourceErr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CiPipelines) GetSourceErrOk() (*string, bool) {
if o == nil || IsNil(o.SourceErr) {
return nil, false
}
return o.SourceErr, true
}
// HasSourceErr returns a boolean if a field has been set.
func (o *CiPipelines) HasSourceErr() bool {
if o != nil && !IsNil(o.SourceErr) {
return true
}
return false
}
// SetSourceErr gets a reference to the given string and assigns it to the SourceErr field.
func (o *CiPipelines) SetSourceErr(v string) {
o.SourceErr = &v
}
// GetStale returns the Stale field value if set, zero value otherwise.
func (o *CiPipelines) GetStale() bool {
if o == nil || IsNil(o.Stale) {
var ret bool
return ret
}
return *o.Stale
}
// GetStaleOk returns a tuple with the Stale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CiPipelines) GetStaleOk() (*bool, bool) {
if o == nil || IsNil(o.Stale) {
return nil, false
}
return o.Stale, true
}
// HasStale returns a boolean if a field has been set.
func (o *CiPipelines) HasStale() bool {
if o != nil && !IsNil(o.Stale) {
return true
}
return false
}
// SetStale gets a reference to the given bool and assigns it to the Stale field.
func (o *CiPipelines) SetStale(v bool) {
o.Stale = &v
}
func (o CiPipelines) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CiPipelines) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.FetchedAt) {
toSerialize["fetchedAt"] = o.FetchedAt
}
if !IsNil(o.Orgs) {
toSerialize["orgs"] = o.Orgs
}
if !IsNil(o.Services) {
toSerialize["services"] = o.Services
}
if !IsNil(o.SourceErr) {
toSerialize["sourceErr"] = o.SourceErr
}
if !IsNil(o.Stale) {
toSerialize["stale"] = o.Stale
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CiPipelines) UnmarshalJSON(data []byte) (err error) {
varCiPipelines := _CiPipelines{}
err = json.Unmarshal(data, &varCiPipelines)
if err != nil {
return err
}
*o = CiPipelines(varCiPipelines)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "fetchedAt")
delete(additionalProperties, "orgs")
delete(additionalProperties, "services")
delete(additionalProperties, "sourceErr")
delete(additionalProperties, "stale")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCiPipelines struct {
value *CiPipelines
isSet bool
}
func (v NullableCiPipelines) Get() *CiPipelines {
return v.value
}
func (v *NullableCiPipelines) Set(val *CiPipelines) {
v.value = val
v.isSet = true
}
func (v NullableCiPipelines) IsSet() bool {
return v.isSet
}
func (v *NullableCiPipelines) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCiPipelines(val *CiPipelines) *NullableCiPipelines {
return &NullableCiPipelines{value: val, isSet: true}
}
func (v NullableCiPipelines) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCiPipelines) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}