mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
266 lines
6.0 KiB
Go
266 lines
6.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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the CiTip type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CiTip{}
|
|
|
|
// CiTip struct for CiTip
|
|
type CiTip struct {
|
|
At *time.Time `json:"at,omitempty"`
|
|
Build *CiCheck `json:"build,omitempty"`
|
|
Sha *string `json:"sha,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CiTip CiTip
|
|
|
|
// NewCiTip instantiates a new CiTip 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 NewCiTip() *CiTip {
|
|
this := CiTip{}
|
|
return &this
|
|
}
|
|
|
|
// NewCiTipWithDefaults instantiates a new CiTip 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 NewCiTipWithDefaults() *CiTip {
|
|
this := CiTip{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *CiTip) GetAt() time.Time {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiTip) GetAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *CiTip) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given time.Time and assigns it to the At field.
|
|
func (o *CiTip) SetAt(v time.Time) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBuild returns the Build field value if set, zero value otherwise.
|
|
func (o *CiTip) GetBuild() CiCheck {
|
|
if o == nil || IsNil(o.Build) {
|
|
var ret CiCheck
|
|
return ret
|
|
}
|
|
return *o.Build
|
|
}
|
|
|
|
// GetBuildOk returns a tuple with the Build field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiTip) GetBuildOk() (*CiCheck, bool) {
|
|
if o == nil || IsNil(o.Build) {
|
|
return nil, false
|
|
}
|
|
return o.Build, true
|
|
}
|
|
|
|
// HasBuild returns a boolean if a field has been set.
|
|
func (o *CiTip) HasBuild() bool {
|
|
if o != nil && !IsNil(o.Build) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBuild gets a reference to the given CiCheck and assigns it to the Build field.
|
|
func (o *CiTip) SetBuild(v CiCheck) {
|
|
o.Build = &v
|
|
}
|
|
|
|
// GetSha returns the Sha field value if set, zero value otherwise.
|
|
func (o *CiTip) GetSha() string {
|
|
if o == nil || IsNil(o.Sha) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sha
|
|
}
|
|
|
|
// GetShaOk returns a tuple with the Sha field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiTip) GetShaOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Sha) {
|
|
return nil, false
|
|
}
|
|
return o.Sha, true
|
|
}
|
|
|
|
// HasSha returns a boolean if a field has been set.
|
|
func (o *CiTip) HasSha() bool {
|
|
if o != nil && !IsNil(o.Sha) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSha gets a reference to the given string and assigns it to the Sha field.
|
|
func (o *CiTip) SetSha(v string) {
|
|
o.Sha = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *CiTip) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CiTip) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *CiTip) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *CiTip) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o CiTip) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CiTip) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Build) {
|
|
toSerialize["build"] = o.Build
|
|
}
|
|
if !IsNil(o.Sha) {
|
|
toSerialize["sha"] = o.Sha
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CiTip) UnmarshalJSON(data []byte) (err error) {
|
|
varCiTip := _CiTip{}
|
|
|
|
err = json.Unmarshal(data, &varCiTip)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CiTip(varCiTip)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "build")
|
|
delete(additionalProperties, "sha")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCiTip struct {
|
|
value *CiTip
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCiTip) Get() *CiTip {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCiTip) Set(val *CiTip) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCiTip) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCiTip) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCiTip(val *CiTip) *NullableCiTip {
|
|
return &NullableCiTip{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCiTip) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCiTip) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|