Files
sdk/model_forge_launched.go

265 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 ForgeLaunched type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ForgeLaunched{}
// ForgeLaunched struct for ForgeLaunched
type ForgeLaunched struct {
Job *int32 `json:"job,omitempty"`
Org *string `json:"org,omitempty"`
Repo *string `json:"repo,omitempty"`
Runner *string `json:"runner,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ForgeLaunched ForgeLaunched
// NewForgeLaunched instantiates a new ForgeLaunched 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 NewForgeLaunched() *ForgeLaunched {
this := ForgeLaunched{}
return &this
}
// NewForgeLaunchedWithDefaults instantiates a new ForgeLaunched 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 NewForgeLaunchedWithDefaults() *ForgeLaunched {
this := ForgeLaunched{}
return &this
}
// GetJob returns the Job field value if set, zero value otherwise.
func (o *ForgeLaunched) GetJob() int32 {
if o == nil || IsNil(o.Job) {
var ret int32
return ret
}
return *o.Job
}
// GetJobOk returns a tuple with the Job field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForgeLaunched) GetJobOk() (*int32, bool) {
if o == nil || IsNil(o.Job) {
return nil, false
}
return o.Job, true
}
// HasJob returns a boolean if a field has been set.
func (o *ForgeLaunched) HasJob() bool {
if o != nil && !IsNil(o.Job) {
return true
}
return false
}
// SetJob gets a reference to the given int32 and assigns it to the Job field.
func (o *ForgeLaunched) SetJob(v int32) {
o.Job = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *ForgeLaunched) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForgeLaunched) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *ForgeLaunched) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *ForgeLaunched) SetOrg(v string) {
o.Org = &v
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *ForgeLaunched) 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 *ForgeLaunched) 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 *ForgeLaunched) 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 *ForgeLaunched) SetRepo(v string) {
o.Repo = &v
}
// GetRunner returns the Runner field value if set, zero value otherwise.
func (o *ForgeLaunched) GetRunner() string {
if o == nil || IsNil(o.Runner) {
var ret string
return ret
}
return *o.Runner
}
// GetRunnerOk returns a tuple with the Runner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForgeLaunched) GetRunnerOk() (*string, bool) {
if o == nil || IsNil(o.Runner) {
return nil, false
}
return o.Runner, true
}
// HasRunner returns a boolean if a field has been set.
func (o *ForgeLaunched) HasRunner() bool {
if o != nil && !IsNil(o.Runner) {
return true
}
return false
}
// SetRunner gets a reference to the given string and assigns it to the Runner field.
func (o *ForgeLaunched) SetRunner(v string) {
o.Runner = &v
}
func (o ForgeLaunched) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ForgeLaunched) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Job) {
toSerialize["job"] = o.Job
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
if !IsNil(o.Runner) {
toSerialize["runner"] = o.Runner
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ForgeLaunched) UnmarshalJSON(data []byte) (err error) {
varForgeLaunched := _ForgeLaunched{}
err = json.Unmarshal(data, &varForgeLaunched)
if err != nil {
return err
}
*o = ForgeLaunched(varForgeLaunched)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "job")
delete(additionalProperties, "org")
delete(additionalProperties, "repo")
delete(additionalProperties, "runner")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableForgeLaunched struct {
value *ForgeLaunched
isSet bool
}
func (v NullableForgeLaunched) Get() *ForgeLaunched {
return v.value
}
func (v *NullableForgeLaunched) Set(val *ForgeLaunched) {
v.value = val
v.isSet = true
}
func (v NullableForgeLaunched) IsSet() bool {
return v.isSet
}
func (v *NullableForgeLaunched) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableForgeLaunched(val *ForgeLaunched) *NullableForgeLaunched {
return &NullableForgeLaunched{value: val, isSet: true}
}
func (v NullableForgeLaunched) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableForgeLaunched) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}