terraform-provider-stackitp.../pkg/gitbeta/model_runner.go

258 lines
6.7 KiB
Go

/*
STACKIT Git API
STACKIT Git management API.
API version: 1beta.0.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package gitbeta
import (
"encoding/json"
"time"
)
// checks if the Runner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Runner{}
/*
types and functions for created_at
*/
// isDateTime
type RunnerGetCreatedAtAttributeType = *time.Time
type RunnerGetCreatedAtArgType = time.Time
type RunnerGetCreatedAtRetType = time.Time
func getRunnerGetCreatedAtAttributeTypeOk(arg RunnerGetCreatedAtAttributeType) (ret RunnerGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRunnerGetCreatedAtAttributeType(arg *RunnerGetCreatedAtAttributeType, val RunnerGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type RunnerGetIdAttributeType = *string
func getRunnerGetIdAttributeTypeOk(arg RunnerGetIdAttributeType) (ret RunnerGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRunnerGetIdAttributeType(arg *RunnerGetIdAttributeType, val RunnerGetIdRetType) {
*arg = &val
}
type RunnerGetIdArgType = string
type RunnerGetIdRetType = string
/*
types and functions for labels
*/
// isArray
type RunnerGetLabelsAttributeType = *[]string
type RunnerGetLabelsArgType = []string
type RunnerGetLabelsRetType = []string
func getRunnerGetLabelsAttributeTypeOk(arg RunnerGetLabelsAttributeType) (ret RunnerGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRunnerGetLabelsAttributeType(arg *RunnerGetLabelsAttributeType, val RunnerGetLabelsRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type RunnerGetStatusAttributeType = *string
func getRunnerGetStatusAttributeTypeOk(arg RunnerGetStatusAttributeType) (ret RunnerGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRunnerGetStatusAttributeType(arg *RunnerGetStatusAttributeType, val RunnerGetStatusRetType) {
*arg = &val
}
type RunnerGetStatusArgType = string
type RunnerGetStatusRetType = string
// Runner Describes a runner associated to a STACKIT Git instance.
type Runner struct {
// REQUIRED
CreatedAt RunnerGetCreatedAtAttributeType `json:"created_at" required:"true"`
// REQUIRED
Id RunnerGetIdAttributeType `json:"id" required:"true"`
// REQUIRED
Labels RunnerGetLabelsAttributeType `json:"labels" required:"true"`
// The current status of the runner.
// REQUIRED
Status RunnerGetStatusAttributeType `json:"status" required:"true"`
}
type _Runner Runner
// NewRunner instantiates a new Runner 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 NewRunner(createdAt RunnerGetCreatedAtArgType, id RunnerGetIdArgType, labels RunnerGetLabelsArgType, status RunnerGetStatusArgType) *Runner {
this := Runner{}
setRunnerGetCreatedAtAttributeType(&this.CreatedAt, createdAt)
setRunnerGetIdAttributeType(&this.Id, id)
setRunnerGetLabelsAttributeType(&this.Labels, labels)
setRunnerGetStatusAttributeType(&this.Status, status)
return &this
}
// NewRunnerWithDefaults instantiates a new Runner 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 NewRunnerWithDefaults() *Runner {
this := Runner{}
return &this
}
// GetCreatedAt returns the CreatedAt field value
func (o *Runner) GetCreatedAt() (ret RunnerGetCreatedAtRetType) {
ret, _ = o.GetCreatedAtOk()
return ret
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *Runner) GetCreatedAtOk() (ret RunnerGetCreatedAtRetType, ok bool) {
return getRunnerGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// SetCreatedAt sets field value
func (o *Runner) SetCreatedAt(v RunnerGetCreatedAtRetType) {
setRunnerGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value
func (o *Runner) GetId() (ret RunnerGetIdRetType) {
ret, _ = o.GetIdOk()
return ret
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Runner) GetIdOk() (ret RunnerGetIdRetType, ok bool) {
return getRunnerGetIdAttributeTypeOk(o.Id)
}
// SetId sets field value
func (o *Runner) SetId(v RunnerGetIdRetType) {
setRunnerGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value
func (o *Runner) GetLabels() (ret RunnerGetLabelsRetType) {
ret, _ = o.GetLabelsOk()
return ret
}
// GetLabelsOk returns a tuple with the Labels field value
// and a boolean to check if the value has been set.
func (o *Runner) GetLabelsOk() (ret RunnerGetLabelsRetType, ok bool) {
return getRunnerGetLabelsAttributeTypeOk(o.Labels)
}
// SetLabels sets field value
func (o *Runner) SetLabels(v RunnerGetLabelsRetType) {
setRunnerGetLabelsAttributeType(&o.Labels, v)
}
// GetStatus returns the Status field value
func (o *Runner) GetStatus() (ret RunnerGetStatusRetType) {
ret, _ = o.GetStatusOk()
return ret
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *Runner) GetStatusOk() (ret RunnerGetStatusRetType, ok bool) {
return getRunnerGetStatusAttributeTypeOk(o.Status)
}
// SetStatus sets field value
func (o *Runner) SetStatus(v RunnerGetStatusRetType) {
setRunnerGetStatusAttributeType(&o.Status, v)
}
func (o Runner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getRunnerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getRunnerGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getRunnerGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getRunnerGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
return toSerialize, nil
}
type NullableRunner struct {
value *Runner
isSet bool
}
func (v NullableRunner) Get() *Runner {
return v.value
}
func (v *NullableRunner) Set(val *Runner) {
v.value = val
v.isSet = true
}
func (v NullableRunner) IsSet() bool {
return v.isSet
}
func (v *NullableRunner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRunner(val *Runner) *NullableRunner {
return &NullableRunner{value: val, isSet: true}
}
func (v NullableRunner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRunner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}