mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
915 lines
25 KiB
Go
915 lines
25 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 RunnerContext type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RunnerContext{}
|
|
|
|
// RunnerContext struct for RunnerContext
|
|
type RunnerContext struct {
|
|
// ActionsURL is where act fetches an action repository from when a step names one. A runner that receives nothing here composes an unusable URL and every job dies before its first step, so the runner supplies its own fallback rather than trusting this to be set.
|
|
ActionsUrl *string `json:"actions_url,omitempty"`
|
|
// Actor is who caused the run.
|
|
Actor *string `json:"actor,omitempty"`
|
|
// APIURL is where the job reaches the forge's API.
|
|
ApiUrl *string `json:"api_url,omitempty"`
|
|
// BaseRef is the target branch of a pull request, empty otherwise.
|
|
BaseRef *string `json:"base_ref,omitempty"`
|
|
// Event is the webhook payload that triggered the run, as opaque JSON. It stays bytes because its shape belongs to the event and not to us: the runner hands it to act, which evaluates github.event.* against it.
|
|
Event *string `json:"event,omitempty"`
|
|
// EventName is what triggered the run, e.g. \"push\".
|
|
EventName *string `json:"event_name,omitempty"`
|
|
// HeadRef is the source branch of a pull request, empty otherwise.
|
|
HeadRef *string `json:"head_ref,omitempty"`
|
|
// Job is which job of the workflow document this task is.
|
|
Job *string `json:"job,omitempty"`
|
|
// Ref is the full ref the run is for, e.g. \"refs/heads/main\".
|
|
Ref *string `json:"ref,omitempty"`
|
|
// RefName is that ref without its refs/heads/ or refs/tags/ prefix.
|
|
RefName *string `json:"ref_name,omitempty"`
|
|
// RefType is \"branch\" or \"tag\".
|
|
RefType *string `json:"ref_type,omitempty"`
|
|
// Repository is \"<owner>/<name>\".
|
|
Repository *string `json:"repository,omitempty"`
|
|
// RepositoryOwner is the owner half of it.
|
|
RepositoryOwner *string `json:"repository_owner,omitempty"`
|
|
// RetentionDays is how long the run's artifacts are kept, as a number in a string because that is what an expression reads.
|
|
RetentionDays *string `json:"retention_days,omitempty"`
|
|
// RunAttempt is which attempt of that run this is, counting from 1.
|
|
RunAttempt *string `json:"run_attempt,omitempty"`
|
|
// RunID identifies the run this task belongs to.
|
|
RunId *string `json:"run_id,omitempty"`
|
|
// RunNumber is the run's position in its repository, counting from 1.
|
|
RunNumber *string `json:"run_number,omitempty"`
|
|
// RuntimeToken authorizes the job against the actions runtime: artifacts, the cache. The runner passes it as ACTIONS_RUNTIME_TOKEN and masks it out of the log.
|
|
RuntimeToken *string `json:"runtime_token,omitempty"`
|
|
// ServerURL is the forge's own origin, as a link in a log points at it.
|
|
ServerUrl *string `json:"server_url,omitempty"`
|
|
// Sha is the commit being run, in full.
|
|
Sha *string `json:"sha,omitempty"`
|
|
// Token is the job's credential against the forge's own API — github.token in an expression.
|
|
Token *string `json:"token,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RunnerContext RunnerContext
|
|
|
|
// NewRunnerContext instantiates a new RunnerContext 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 NewRunnerContext() *RunnerContext {
|
|
this := RunnerContext{}
|
|
return &this
|
|
}
|
|
|
|
// NewRunnerContextWithDefaults instantiates a new RunnerContext 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 NewRunnerContextWithDefaults() *RunnerContext {
|
|
this := RunnerContext{}
|
|
return &this
|
|
}
|
|
|
|
// GetActionsUrl returns the ActionsUrl field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetActionsUrl() string {
|
|
if o == nil || IsNil(o.ActionsUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ActionsUrl
|
|
}
|
|
|
|
// GetActionsUrlOk returns a tuple with the ActionsUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetActionsUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ActionsUrl) {
|
|
return nil, false
|
|
}
|
|
return o.ActionsUrl, true
|
|
}
|
|
|
|
// HasActionsUrl returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasActionsUrl() bool {
|
|
if o != nil && !IsNil(o.ActionsUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActionsUrl gets a reference to the given string and assigns it to the ActionsUrl field.
|
|
func (o *RunnerContext) SetActionsUrl(v string) {
|
|
o.ActionsUrl = &v
|
|
}
|
|
|
|
// GetActor returns the Actor field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetActor() string {
|
|
if o == nil || IsNil(o.Actor) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Actor
|
|
}
|
|
|
|
// GetActorOk returns a tuple with the Actor field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetActorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Actor) {
|
|
return nil, false
|
|
}
|
|
return o.Actor, true
|
|
}
|
|
|
|
// HasActor returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasActor() bool {
|
|
if o != nil && !IsNil(o.Actor) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActor gets a reference to the given string and assigns it to the Actor field.
|
|
func (o *RunnerContext) SetActor(v string) {
|
|
o.Actor = &v
|
|
}
|
|
|
|
// GetApiUrl returns the ApiUrl field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetApiUrl() string {
|
|
if o == nil || IsNil(o.ApiUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ApiUrl
|
|
}
|
|
|
|
// GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetApiUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ApiUrl) {
|
|
return nil, false
|
|
}
|
|
return o.ApiUrl, true
|
|
}
|
|
|
|
// HasApiUrl returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasApiUrl() bool {
|
|
if o != nil && !IsNil(o.ApiUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field.
|
|
func (o *RunnerContext) SetApiUrl(v string) {
|
|
o.ApiUrl = &v
|
|
}
|
|
|
|
// GetBaseRef returns the BaseRef field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetBaseRef() string {
|
|
if o == nil || IsNil(o.BaseRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.BaseRef
|
|
}
|
|
|
|
// GetBaseRefOk returns a tuple with the BaseRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetBaseRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.BaseRef) {
|
|
return nil, false
|
|
}
|
|
return o.BaseRef, true
|
|
}
|
|
|
|
// HasBaseRef returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasBaseRef() bool {
|
|
if o != nil && !IsNil(o.BaseRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBaseRef gets a reference to the given string and assigns it to the BaseRef field.
|
|
func (o *RunnerContext) SetBaseRef(v string) {
|
|
o.BaseRef = &v
|
|
}
|
|
|
|
// GetEvent returns the Event field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetEvent() string {
|
|
if o == nil || IsNil(o.Event) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Event
|
|
}
|
|
|
|
// GetEventOk returns a tuple with the Event field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetEventOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Event) {
|
|
return nil, false
|
|
}
|
|
return o.Event, true
|
|
}
|
|
|
|
// HasEvent returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasEvent() bool {
|
|
if o != nil && !IsNil(o.Event) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvent gets a reference to the given string and assigns it to the Event field.
|
|
func (o *RunnerContext) SetEvent(v string) {
|
|
o.Event = &v
|
|
}
|
|
|
|
// GetEventName returns the EventName field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetEventName() string {
|
|
if o == nil || IsNil(o.EventName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EventName
|
|
}
|
|
|
|
// GetEventNameOk returns a tuple with the EventName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetEventNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.EventName) {
|
|
return nil, false
|
|
}
|
|
return o.EventName, true
|
|
}
|
|
|
|
// HasEventName returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasEventName() bool {
|
|
if o != nil && !IsNil(o.EventName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEventName gets a reference to the given string and assigns it to the EventName field.
|
|
func (o *RunnerContext) SetEventName(v string) {
|
|
o.EventName = &v
|
|
}
|
|
|
|
// GetHeadRef returns the HeadRef field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetHeadRef() string {
|
|
if o == nil || IsNil(o.HeadRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.HeadRef
|
|
}
|
|
|
|
// GetHeadRefOk returns a tuple with the HeadRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetHeadRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.HeadRef) {
|
|
return nil, false
|
|
}
|
|
return o.HeadRef, true
|
|
}
|
|
|
|
// HasHeadRef returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasHeadRef() bool {
|
|
if o != nil && !IsNil(o.HeadRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHeadRef gets a reference to the given string and assigns it to the HeadRef field.
|
|
func (o *RunnerContext) SetHeadRef(v string) {
|
|
o.HeadRef = &v
|
|
}
|
|
|
|
// GetJob returns the Job field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetJob() string {
|
|
if o == nil || IsNil(o.Job) {
|
|
var ret string
|
|
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 *RunnerContext) GetJobOk() (*string, 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 *RunnerContext) HasJob() bool {
|
|
if o != nil && !IsNil(o.Job) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetJob gets a reference to the given string and assigns it to the Job field.
|
|
func (o *RunnerContext) SetJob(v string) {
|
|
o.Job = &v
|
|
}
|
|
|
|
// GetRef returns the Ref field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRef() string {
|
|
if o == nil || IsNil(o.Ref) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ref
|
|
}
|
|
|
|
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ref) {
|
|
return nil, false
|
|
}
|
|
return o.Ref, true
|
|
}
|
|
|
|
// HasRef returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRef() bool {
|
|
if o != nil && !IsNil(o.Ref) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRef gets a reference to the given string and assigns it to the Ref field.
|
|
func (o *RunnerContext) SetRef(v string) {
|
|
o.Ref = &v
|
|
}
|
|
|
|
// GetRefName returns the RefName field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRefName() string {
|
|
if o == nil || IsNil(o.RefName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RefName
|
|
}
|
|
|
|
// GetRefNameOk returns a tuple with the RefName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRefNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RefName) {
|
|
return nil, false
|
|
}
|
|
return o.RefName, true
|
|
}
|
|
|
|
// HasRefName returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRefName() bool {
|
|
if o != nil && !IsNil(o.RefName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefName gets a reference to the given string and assigns it to the RefName field.
|
|
func (o *RunnerContext) SetRefName(v string) {
|
|
o.RefName = &v
|
|
}
|
|
|
|
// GetRefType returns the RefType field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRefType() string {
|
|
if o == nil || IsNil(o.RefType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RefType
|
|
}
|
|
|
|
// GetRefTypeOk returns a tuple with the RefType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRefTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RefType) {
|
|
return nil, false
|
|
}
|
|
return o.RefType, true
|
|
}
|
|
|
|
// HasRefType returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRefType() bool {
|
|
if o != nil && !IsNil(o.RefType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefType gets a reference to the given string and assigns it to the RefType field.
|
|
func (o *RunnerContext) SetRefType(v string) {
|
|
o.RefType = &v
|
|
}
|
|
|
|
// GetRepository returns the Repository field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRepository() string {
|
|
if o == nil || IsNil(o.Repository) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Repository
|
|
}
|
|
|
|
// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRepositoryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Repository) {
|
|
return nil, false
|
|
}
|
|
return o.Repository, true
|
|
}
|
|
|
|
// HasRepository returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRepository() bool {
|
|
if o != nil && !IsNil(o.Repository) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepository gets a reference to the given string and assigns it to the Repository field.
|
|
func (o *RunnerContext) SetRepository(v string) {
|
|
o.Repository = &v
|
|
}
|
|
|
|
// GetRepositoryOwner returns the RepositoryOwner field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRepositoryOwner() string {
|
|
if o == nil || IsNil(o.RepositoryOwner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RepositoryOwner
|
|
}
|
|
|
|
// GetRepositoryOwnerOk returns a tuple with the RepositoryOwner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRepositoryOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RepositoryOwner) {
|
|
return nil, false
|
|
}
|
|
return o.RepositoryOwner, true
|
|
}
|
|
|
|
// HasRepositoryOwner returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRepositoryOwner() bool {
|
|
if o != nil && !IsNil(o.RepositoryOwner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepositoryOwner gets a reference to the given string and assigns it to the RepositoryOwner field.
|
|
func (o *RunnerContext) SetRepositoryOwner(v string) {
|
|
o.RepositoryOwner = &v
|
|
}
|
|
|
|
// GetRetentionDays returns the RetentionDays field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRetentionDays() string {
|
|
if o == nil || IsNil(o.RetentionDays) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RetentionDays
|
|
}
|
|
|
|
// GetRetentionDaysOk returns a tuple with the RetentionDays field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRetentionDaysOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RetentionDays) {
|
|
return nil, false
|
|
}
|
|
return o.RetentionDays, true
|
|
}
|
|
|
|
// HasRetentionDays returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRetentionDays() bool {
|
|
if o != nil && !IsNil(o.RetentionDays) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRetentionDays gets a reference to the given string and assigns it to the RetentionDays field.
|
|
func (o *RunnerContext) SetRetentionDays(v string) {
|
|
o.RetentionDays = &v
|
|
}
|
|
|
|
// GetRunAttempt returns the RunAttempt field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRunAttempt() string {
|
|
if o == nil || IsNil(o.RunAttempt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RunAttempt
|
|
}
|
|
|
|
// GetRunAttemptOk returns a tuple with the RunAttempt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRunAttemptOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RunAttempt) {
|
|
return nil, false
|
|
}
|
|
return o.RunAttempt, true
|
|
}
|
|
|
|
// HasRunAttempt returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRunAttempt() bool {
|
|
if o != nil && !IsNil(o.RunAttempt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunAttempt gets a reference to the given string and assigns it to the RunAttempt field.
|
|
func (o *RunnerContext) SetRunAttempt(v string) {
|
|
o.RunAttempt = &v
|
|
}
|
|
|
|
// GetRunId returns the RunId field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRunId() string {
|
|
if o == nil || IsNil(o.RunId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RunId
|
|
}
|
|
|
|
// GetRunIdOk returns a tuple with the RunId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRunIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RunId) {
|
|
return nil, false
|
|
}
|
|
return o.RunId, true
|
|
}
|
|
|
|
// HasRunId returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRunId() bool {
|
|
if o != nil && !IsNil(o.RunId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunId gets a reference to the given string and assigns it to the RunId field.
|
|
func (o *RunnerContext) SetRunId(v string) {
|
|
o.RunId = &v
|
|
}
|
|
|
|
// GetRunNumber returns the RunNumber field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRunNumber() string {
|
|
if o == nil || IsNil(o.RunNumber) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RunNumber
|
|
}
|
|
|
|
// GetRunNumberOk returns a tuple with the RunNumber field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRunNumberOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RunNumber) {
|
|
return nil, false
|
|
}
|
|
return o.RunNumber, true
|
|
}
|
|
|
|
// HasRunNumber returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRunNumber() bool {
|
|
if o != nil && !IsNil(o.RunNumber) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunNumber gets a reference to the given string and assigns it to the RunNumber field.
|
|
func (o *RunnerContext) SetRunNumber(v string) {
|
|
o.RunNumber = &v
|
|
}
|
|
|
|
// GetRuntimeToken returns the RuntimeToken field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetRuntimeToken() string {
|
|
if o == nil || IsNil(o.RuntimeToken) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RuntimeToken
|
|
}
|
|
|
|
// GetRuntimeTokenOk returns a tuple with the RuntimeToken field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetRuntimeTokenOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RuntimeToken) {
|
|
return nil, false
|
|
}
|
|
return o.RuntimeToken, true
|
|
}
|
|
|
|
// HasRuntimeToken returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasRuntimeToken() bool {
|
|
if o != nil && !IsNil(o.RuntimeToken) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRuntimeToken gets a reference to the given string and assigns it to the RuntimeToken field.
|
|
func (o *RunnerContext) SetRuntimeToken(v string) {
|
|
o.RuntimeToken = &v
|
|
}
|
|
|
|
// GetServerUrl returns the ServerUrl field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetServerUrl() string {
|
|
if o == nil || IsNil(o.ServerUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ServerUrl
|
|
}
|
|
|
|
// GetServerUrlOk returns a tuple with the ServerUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetServerUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ServerUrl) {
|
|
return nil, false
|
|
}
|
|
return o.ServerUrl, true
|
|
}
|
|
|
|
// HasServerUrl returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasServerUrl() bool {
|
|
if o != nil && !IsNil(o.ServerUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetServerUrl gets a reference to the given string and assigns it to the ServerUrl field.
|
|
func (o *RunnerContext) SetServerUrl(v string) {
|
|
o.ServerUrl = &v
|
|
}
|
|
|
|
// GetSha returns the Sha field value if set, zero value otherwise.
|
|
func (o *RunnerContext) 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 *RunnerContext) 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 *RunnerContext) 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 *RunnerContext) SetSha(v string) {
|
|
o.Sha = &v
|
|
}
|
|
|
|
// GetToken returns the Token field value if set, zero value otherwise.
|
|
func (o *RunnerContext) GetToken() string {
|
|
if o == nil || IsNil(o.Token) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Token
|
|
}
|
|
|
|
// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerContext) GetTokenOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Token) {
|
|
return nil, false
|
|
}
|
|
return o.Token, true
|
|
}
|
|
|
|
// HasToken returns a boolean if a field has been set.
|
|
func (o *RunnerContext) HasToken() bool {
|
|
if o != nil && !IsNil(o.Token) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetToken gets a reference to the given string and assigns it to the Token field.
|
|
func (o *RunnerContext) SetToken(v string) {
|
|
o.Token = &v
|
|
}
|
|
|
|
func (o RunnerContext) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RunnerContext) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ActionsUrl) {
|
|
toSerialize["actions_url"] = o.ActionsUrl
|
|
}
|
|
if !IsNil(o.Actor) {
|
|
toSerialize["actor"] = o.Actor
|
|
}
|
|
if !IsNil(o.ApiUrl) {
|
|
toSerialize["api_url"] = o.ApiUrl
|
|
}
|
|
if !IsNil(o.BaseRef) {
|
|
toSerialize["base_ref"] = o.BaseRef
|
|
}
|
|
if !IsNil(o.Event) {
|
|
toSerialize["event"] = o.Event
|
|
}
|
|
if !IsNil(o.EventName) {
|
|
toSerialize["event_name"] = o.EventName
|
|
}
|
|
if !IsNil(o.HeadRef) {
|
|
toSerialize["head_ref"] = o.HeadRef
|
|
}
|
|
if !IsNil(o.Job) {
|
|
toSerialize["job"] = o.Job
|
|
}
|
|
if !IsNil(o.Ref) {
|
|
toSerialize["ref"] = o.Ref
|
|
}
|
|
if !IsNil(o.RefName) {
|
|
toSerialize["ref_name"] = o.RefName
|
|
}
|
|
if !IsNil(o.RefType) {
|
|
toSerialize["ref_type"] = o.RefType
|
|
}
|
|
if !IsNil(o.Repository) {
|
|
toSerialize["repository"] = o.Repository
|
|
}
|
|
if !IsNil(o.RepositoryOwner) {
|
|
toSerialize["repository_owner"] = o.RepositoryOwner
|
|
}
|
|
if !IsNil(o.RetentionDays) {
|
|
toSerialize["retention_days"] = o.RetentionDays
|
|
}
|
|
if !IsNil(o.RunAttempt) {
|
|
toSerialize["run_attempt"] = o.RunAttempt
|
|
}
|
|
if !IsNil(o.RunId) {
|
|
toSerialize["run_id"] = o.RunId
|
|
}
|
|
if !IsNil(o.RunNumber) {
|
|
toSerialize["run_number"] = o.RunNumber
|
|
}
|
|
if !IsNil(o.RuntimeToken) {
|
|
toSerialize["runtime_token"] = o.RuntimeToken
|
|
}
|
|
if !IsNil(o.ServerUrl) {
|
|
toSerialize["server_url"] = o.ServerUrl
|
|
}
|
|
if !IsNil(o.Sha) {
|
|
toSerialize["sha"] = o.Sha
|
|
}
|
|
if !IsNil(o.Token) {
|
|
toSerialize["token"] = o.Token
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RunnerContext) UnmarshalJSON(data []byte) (err error) {
|
|
varRunnerContext := _RunnerContext{}
|
|
|
|
err = json.Unmarshal(data, &varRunnerContext)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RunnerContext(varRunnerContext)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "actions_url")
|
|
delete(additionalProperties, "actor")
|
|
delete(additionalProperties, "api_url")
|
|
delete(additionalProperties, "base_ref")
|
|
delete(additionalProperties, "event")
|
|
delete(additionalProperties, "event_name")
|
|
delete(additionalProperties, "head_ref")
|
|
delete(additionalProperties, "job")
|
|
delete(additionalProperties, "ref")
|
|
delete(additionalProperties, "ref_name")
|
|
delete(additionalProperties, "ref_type")
|
|
delete(additionalProperties, "repository")
|
|
delete(additionalProperties, "repository_owner")
|
|
delete(additionalProperties, "retention_days")
|
|
delete(additionalProperties, "run_attempt")
|
|
delete(additionalProperties, "run_id")
|
|
delete(additionalProperties, "run_number")
|
|
delete(additionalProperties, "runtime_token")
|
|
delete(additionalProperties, "server_url")
|
|
delete(additionalProperties, "sha")
|
|
delete(additionalProperties, "token")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRunnerContext struct {
|
|
value *RunnerContext
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRunnerContext) Get() *RunnerContext {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRunnerContext) Set(val *RunnerContext) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRunnerContext) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRunnerContext) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRunnerContext(val *RunnerContext) *NullableRunnerContext {
|
|
return &NullableRunnerContext{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRunnerContext) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRunnerContext) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|