/* Slurm Rest API API to access and control Slurm. API version: 0.0.37 Contact: sales@schedmd.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" ) // checks if the V0037JobSubmission type satisfies the MappedNullable interface at compile time var _ MappedNullable = &V0037JobSubmission{} // V0037JobSubmission struct for V0037JobSubmission type V0037JobSubmission struct { // Executable script (full contents) to run in batch step Script string `json:"script"` Job *V0037JobProperties `json:"job,omitempty"` // Properties of an HetJob Jobs []V0037JobProperties `json:"jobs,omitempty"` } // NewV0037JobSubmission instantiates a new V0037JobSubmission 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 NewV0037JobSubmission(script string) *V0037JobSubmission { this := V0037JobSubmission{} this.Script = script return &this } // NewV0037JobSubmissionWithDefaults instantiates a new V0037JobSubmission 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 NewV0037JobSubmissionWithDefaults() *V0037JobSubmission { this := V0037JobSubmission{} return &this } // GetScript returns the Script field value func (o *V0037JobSubmission) GetScript() string { if o == nil { var ret string return ret } return o.Script } // GetScriptOk returns a tuple with the Script field value // and a boolean to check if the value has been set. func (o *V0037JobSubmission) GetScriptOk() (*string, bool) { if o == nil { return nil, false } return &o.Script, true } // SetScript sets field value func (o *V0037JobSubmission) SetScript(v string) { o.Script = v } // GetJob returns the Job field value if set, zero value otherwise. func (o *V0037JobSubmission) GetJob() V0037JobProperties { if o == nil || IsNil(o.Job) { var ret V0037JobProperties 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 *V0037JobSubmission) GetJobOk() (*V0037JobProperties, 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 *V0037JobSubmission) HasJob() bool { if o != nil && !IsNil(o.Job) { return true } return false } // SetJob gets a reference to the given V0037JobProperties and assigns it to the Job field. func (o *V0037JobSubmission) SetJob(v V0037JobProperties) { o.Job = &v } // GetJobs returns the Jobs field value if set, zero value otherwise. func (o *V0037JobSubmission) GetJobs() []V0037JobProperties { if o == nil || IsNil(o.Jobs) { var ret []V0037JobProperties 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 *V0037JobSubmission) GetJobsOk() ([]V0037JobProperties, 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 *V0037JobSubmission) HasJobs() bool { if o != nil && !IsNil(o.Jobs) { return true } return false } // SetJobs gets a reference to the given []V0037JobProperties and assigns it to the Jobs field. func (o *V0037JobSubmission) SetJobs(v []V0037JobProperties) { o.Jobs = v } func (o V0037JobSubmission) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o V0037JobSubmission) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["script"] = o.Script if !IsNil(o.Job) { toSerialize["job"] = o.Job } if !IsNil(o.Jobs) { toSerialize["jobs"] = o.Jobs } return toSerialize, nil } type NullableV0037JobSubmission struct { value *V0037JobSubmission isSet bool } func (v NullableV0037JobSubmission) Get() *V0037JobSubmission { return v.value } func (v *NullableV0037JobSubmission) Set(val *V0037JobSubmission) { v.value = val v.isSet = true } func (v NullableV0037JobSubmission) IsSet() bool { return v.isSet } func (v *NullableV0037JobSubmission) Unset() { v.value = nil v.isSet = false } func NewNullableV0037JobSubmission(val *V0037JobSubmission) *NullableV0037JobSubmission { return &NullableV0037JobSubmission{value: val, isSet: true} } func (v NullableV0037JobSubmission) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableV0037JobSubmission) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }