peridot/vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_async_task.go
Mustafa Gezen 496b60ba44
Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support
Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
2022-08-31 20:06:01 +02:00

187 lines
4.6 KiB
Go

/*
* peridot/proto/v1/batch.proto
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: version not set
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package peridotopenapi
import (
"encoding/json"
)
// V1AsyncTask AsyncTask represents a collection of subunits of tasks that wholly works towards a specific goal.
type V1AsyncTask struct {
TaskId *string `json:"taskId,omitempty"`
Subtasks *[]V1Subtask `json:"subtasks,omitempty"`
Done *bool `json:"done,omitempty"`
}
// NewV1AsyncTask instantiates a new V1AsyncTask 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 NewV1AsyncTask() *V1AsyncTask {
this := V1AsyncTask{}
return &this
}
// NewV1AsyncTaskWithDefaults instantiates a new V1AsyncTask 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 NewV1AsyncTaskWithDefaults() *V1AsyncTask {
this := V1AsyncTask{}
return &this
}
// GetTaskId returns the TaskId field value if set, zero value otherwise.
func (o *V1AsyncTask) GetTaskId() string {
if o == nil || o.TaskId == nil {
var ret string
return ret
}
return *o.TaskId
}
// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V1AsyncTask) GetTaskIdOk() (*string, bool) {
if o == nil || o.TaskId == nil {
return nil, false
}
return o.TaskId, true
}
// HasTaskId returns a boolean if a field has been set.
func (o *V1AsyncTask) HasTaskId() bool {
if o != nil && o.TaskId != nil {
return true
}
return false
}
// SetTaskId gets a reference to the given string and assigns it to the TaskId field.
func (o *V1AsyncTask) SetTaskId(v string) {
o.TaskId = &v
}
// GetSubtasks returns the Subtasks field value if set, zero value otherwise.
func (o *V1AsyncTask) GetSubtasks() []V1Subtask {
if o == nil || o.Subtasks == nil {
var ret []V1Subtask
return ret
}
return *o.Subtasks
}
// GetSubtasksOk returns a tuple with the Subtasks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V1AsyncTask) GetSubtasksOk() (*[]V1Subtask, bool) {
if o == nil || o.Subtasks == nil {
return nil, false
}
return o.Subtasks, true
}
// HasSubtasks returns a boolean if a field has been set.
func (o *V1AsyncTask) HasSubtasks() bool {
if o != nil && o.Subtasks != nil {
return true
}
return false
}
// SetSubtasks gets a reference to the given []V1Subtask and assigns it to the Subtasks field.
func (o *V1AsyncTask) SetSubtasks(v []V1Subtask) {
o.Subtasks = &v
}
// GetDone returns the Done field value if set, zero value otherwise.
func (o *V1AsyncTask) GetDone() bool {
if o == nil || o.Done == nil {
var ret bool
return ret
}
return *o.Done
}
// GetDoneOk returns a tuple with the Done field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V1AsyncTask) GetDoneOk() (*bool, bool) {
if o == nil || o.Done == nil {
return nil, false
}
return o.Done, true
}
// HasDone returns a boolean if a field has been set.
func (o *V1AsyncTask) HasDone() bool {
if o != nil && o.Done != nil {
return true
}
return false
}
// SetDone gets a reference to the given bool and assigns it to the Done field.
func (o *V1AsyncTask) SetDone(v bool) {
o.Done = &v
}
func (o V1AsyncTask) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.TaskId != nil {
toSerialize["taskId"] = o.TaskId
}
if o.Subtasks != nil {
toSerialize["subtasks"] = o.Subtasks
}
if o.Done != nil {
toSerialize["done"] = o.Done
}
return json.Marshal(toSerialize)
}
type NullableV1AsyncTask struct {
value *V1AsyncTask
isSet bool
}
func (v NullableV1AsyncTask) Get() *V1AsyncTask {
return v.value
}
func (v *NullableV1AsyncTask) Set(val *V1AsyncTask) {
v.value = val
v.isSet = true
}
func (v NullableV1AsyncTask) IsSet() bool {
return v.isSet
}
func (v *NullableV1AsyncTask) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV1AsyncTask(val *V1AsyncTask) *NullableV1AsyncTask {
return &NullableV1AsyncTask{value: val, isSet: true}
}
func (v NullableV1AsyncTask) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV1AsyncTask) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}