Files
sdk/model_git_workflow_view.go

231 lines
5.8 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 GitWorkflowView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GitWorkflowView{}
// GitWorkflowView struct for GitWorkflowView
type GitWorkflowView struct {
// Fault is why this document cannot run at all, when it cannot be read.
Fault *string `json:"fault,omitempty"`
// Jobs is what it declares, and where each would run.
Jobs []GitJobView `json:"jobs,omitempty"`
// Name is the document's path in the repository.
Name *string `json:"name,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GitWorkflowView GitWorkflowView
// NewGitWorkflowView instantiates a new GitWorkflowView 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 NewGitWorkflowView() *GitWorkflowView {
this := GitWorkflowView{}
return &this
}
// NewGitWorkflowViewWithDefaults instantiates a new GitWorkflowView 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 NewGitWorkflowViewWithDefaults() *GitWorkflowView {
this := GitWorkflowView{}
return &this
}
// GetFault returns the Fault field value if set, zero value otherwise.
func (o *GitWorkflowView) GetFault() string {
if o == nil || IsNil(o.Fault) {
var ret string
return ret
}
return *o.Fault
}
// GetFaultOk returns a tuple with the Fault field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitWorkflowView) GetFaultOk() (*string, bool) {
if o == nil || IsNil(o.Fault) {
return nil, false
}
return o.Fault, true
}
// HasFault returns a boolean if a field has been set.
func (o *GitWorkflowView) HasFault() bool {
if o != nil && !IsNil(o.Fault) {
return true
}
return false
}
// SetFault gets a reference to the given string and assigns it to the Fault field.
func (o *GitWorkflowView) SetFault(v string) {
o.Fault = &v
}
// GetJobs returns the Jobs field value if set, zero value otherwise.
func (o *GitWorkflowView) GetJobs() []GitJobView {
if o == nil || IsNil(o.Jobs) {
var ret []GitJobView
return ret
}
return o.Jobs
}
// GetJobsOk returns a tuple with the Jobs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitWorkflowView) GetJobsOk() ([]GitJobView, bool) {
if o == nil || IsNil(o.Jobs) {
return nil, false
}
return o.Jobs, true
}
// HasJobs returns a boolean if a field has been set.
func (o *GitWorkflowView) HasJobs() bool {
if o != nil && !IsNil(o.Jobs) {
return true
}
return false
}
// SetJobs gets a reference to the given []GitJobView and assigns it to the Jobs field.
func (o *GitWorkflowView) SetJobs(v []GitJobView) {
o.Jobs = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *GitWorkflowView) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitWorkflowView) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *GitWorkflowView) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *GitWorkflowView) SetName(v string) {
o.Name = &v
}
func (o GitWorkflowView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GitWorkflowView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Fault) {
toSerialize["fault"] = o.Fault
}
if !IsNil(o.Jobs) {
toSerialize["jobs"] = o.Jobs
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GitWorkflowView) UnmarshalJSON(data []byte) (err error) {
varGitWorkflowView := _GitWorkflowView{}
err = json.Unmarshal(data, &varGitWorkflowView)
if err != nil {
return err
}
*o = GitWorkflowView(varGitWorkflowView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "fault")
delete(additionalProperties, "jobs")
delete(additionalProperties, "name")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGitWorkflowView struct {
value *GitWorkflowView
isSet bool
}
func (v NullableGitWorkflowView) Get() *GitWorkflowView {
return v.value
}
func (v *NullableGitWorkflowView) Set(val *GitWorkflowView) {
v.value = val
v.isSet = true
}
func (v NullableGitWorkflowView) IsSet() bool {
return v.isSet
}
func (v *NullableGitWorkflowView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGitWorkflowView(val *GitWorkflowView) *NullableGitWorkflowView {
return &NullableGitWorkflowView{value: val, isSet: true}
}
func (v NullableGitWorkflowView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGitWorkflowView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}