mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-16 02:31:24 +00:00
521 lines
13 KiB
Go
521 lines
13 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"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// V1Subtask struct for V1Subtask
|
||
|
type V1Subtask struct {
|
||
|
Arch *string `json:"arch,omitempty"`
|
||
|
Type *V1TaskType `json:"type,omitempty"`
|
||
|
Response *ProtobufAny `json:"response,omitempty"`
|
||
|
Metadata *ProtobufAny `json:"metadata,omitempty"`
|
||
|
Status *V1TaskStatus `json:"status,omitempty"`
|
||
|
ParentTaskId *string `json:"parentTaskId,omitempty"`
|
||
|
Id *string `json:"id,omitempty"`
|
||
|
SubmitterId *string `json:"submitterId,omitempty"`
|
||
|
SubmitterDisplayName *string `json:"submitterDisplayName,omitempty"`
|
||
|
SubmitterEmail *string `json:"submitterEmail,omitempty"`
|
||
|
FinishedAt *time.Time `json:"finishedAt,omitempty"`
|
||
|
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewV1Subtask instantiates a new V1Subtask 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 NewV1Subtask() *V1Subtask {
|
||
|
this := V1Subtask{}
|
||
|
var type_ V1TaskType = UNKNOWN
|
||
|
this.Type = &type_
|
||
|
var status V1TaskStatus = UNSPECIFIED
|
||
|
this.Status = &status
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// NewV1SubtaskWithDefaults instantiates a new V1Subtask 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 NewV1SubtaskWithDefaults() *V1Subtask {
|
||
|
this := V1Subtask{}
|
||
|
var type_ V1TaskType = UNKNOWN
|
||
|
this.Type = &type_
|
||
|
var status V1TaskStatus = UNSPECIFIED
|
||
|
this.Status = &status
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// GetArch returns the Arch field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetArch() string {
|
||
|
if o == nil || o.Arch == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Arch
|
||
|
}
|
||
|
|
||
|
// GetArchOk returns a tuple with the Arch field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetArchOk() (*string, bool) {
|
||
|
if o == nil || o.Arch == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Arch, true
|
||
|
}
|
||
|
|
||
|
// HasArch returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasArch() bool {
|
||
|
if o != nil && o.Arch != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetArch gets a reference to the given string and assigns it to the Arch field.
|
||
|
func (o *V1Subtask) SetArch(v string) {
|
||
|
o.Arch = &v
|
||
|
}
|
||
|
|
||
|
// GetType returns the Type field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetType() V1TaskType {
|
||
|
if o == nil || o.Type == nil {
|
||
|
var ret V1TaskType
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Type
|
||
|
}
|
||
|
|
||
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetTypeOk() (*V1TaskType, bool) {
|
||
|
if o == nil || o.Type == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Type, true
|
||
|
}
|
||
|
|
||
|
// HasType returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasType() bool {
|
||
|
if o != nil && o.Type != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetType gets a reference to the given V1TaskType and assigns it to the Type field.
|
||
|
func (o *V1Subtask) SetType(v V1TaskType) {
|
||
|
o.Type = &v
|
||
|
}
|
||
|
|
||
|
// GetResponse returns the Response field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetResponse() ProtobufAny {
|
||
|
if o == nil || o.Response == nil {
|
||
|
var ret ProtobufAny
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Response
|
||
|
}
|
||
|
|
||
|
// GetResponseOk returns a tuple with the Response field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetResponseOk() (*ProtobufAny, bool) {
|
||
|
if o == nil || o.Response == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Response, true
|
||
|
}
|
||
|
|
||
|
// HasResponse returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasResponse() bool {
|
||
|
if o != nil && o.Response != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetResponse gets a reference to the given ProtobufAny and assigns it to the Response field.
|
||
|
func (o *V1Subtask) SetResponse(v ProtobufAny) {
|
||
|
o.Response = &v
|
||
|
}
|
||
|
|
||
|
// GetMetadata returns the Metadata field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetMetadata() ProtobufAny {
|
||
|
if o == nil || o.Metadata == nil {
|
||
|
var ret ProtobufAny
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Metadata
|
||
|
}
|
||
|
|
||
|
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetMetadataOk() (*ProtobufAny, bool) {
|
||
|
if o == nil || o.Metadata == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Metadata, true
|
||
|
}
|
||
|
|
||
|
// HasMetadata returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasMetadata() bool {
|
||
|
if o != nil && o.Metadata != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetMetadata gets a reference to the given ProtobufAny and assigns it to the Metadata field.
|
||
|
func (o *V1Subtask) SetMetadata(v ProtobufAny) {
|
||
|
o.Metadata = &v
|
||
|
}
|
||
|
|
||
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetStatus() V1TaskStatus {
|
||
|
if o == nil || o.Status == nil {
|
||
|
var ret V1TaskStatus
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Status
|
||
|
}
|
||
|
|
||
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetStatusOk() (*V1TaskStatus, bool) {
|
||
|
if o == nil || o.Status == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Status, true
|
||
|
}
|
||
|
|
||
|
// HasStatus returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasStatus() bool {
|
||
|
if o != nil && o.Status != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetStatus gets a reference to the given V1TaskStatus and assigns it to the Status field.
|
||
|
func (o *V1Subtask) SetStatus(v V1TaskStatus) {
|
||
|
o.Status = &v
|
||
|
}
|
||
|
|
||
|
// GetParentTaskId returns the ParentTaskId field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetParentTaskId() string {
|
||
|
if o == nil || o.ParentTaskId == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.ParentTaskId
|
||
|
}
|
||
|
|
||
|
// GetParentTaskIdOk returns a tuple with the ParentTaskId field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetParentTaskIdOk() (*string, bool) {
|
||
|
if o == nil || o.ParentTaskId == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.ParentTaskId, true
|
||
|
}
|
||
|
|
||
|
// HasParentTaskId returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasParentTaskId() bool {
|
||
|
if o != nil && o.ParentTaskId != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetParentTaskId gets a reference to the given string and assigns it to the ParentTaskId field.
|
||
|
func (o *V1Subtask) SetParentTaskId(v string) {
|
||
|
o.ParentTaskId = &v
|
||
|
}
|
||
|
|
||
|
// GetId returns the Id field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetId() string {
|
||
|
if o == nil || o.Id == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.Id
|
||
|
}
|
||
|
|
||
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetIdOk() (*string, bool) {
|
||
|
if o == nil || o.Id == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Id, true
|
||
|
}
|
||
|
|
||
|
// HasId returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasId() bool {
|
||
|
if o != nil && o.Id != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
||
|
func (o *V1Subtask) SetId(v string) {
|
||
|
o.Id = &v
|
||
|
}
|
||
|
|
||
|
// GetSubmitterId returns the SubmitterId field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetSubmitterId() string {
|
||
|
if o == nil || o.SubmitterId == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.SubmitterId
|
||
|
}
|
||
|
|
||
|
// GetSubmitterIdOk returns a tuple with the SubmitterId field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetSubmitterIdOk() (*string, bool) {
|
||
|
if o == nil || o.SubmitterId == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.SubmitterId, true
|
||
|
}
|
||
|
|
||
|
// HasSubmitterId returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasSubmitterId() bool {
|
||
|
if o != nil && o.SubmitterId != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetSubmitterId gets a reference to the given string and assigns it to the SubmitterId field.
|
||
|
func (o *V1Subtask) SetSubmitterId(v string) {
|
||
|
o.SubmitterId = &v
|
||
|
}
|
||
|
|
||
|
// GetSubmitterDisplayName returns the SubmitterDisplayName field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetSubmitterDisplayName() string {
|
||
|
if o == nil || o.SubmitterDisplayName == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.SubmitterDisplayName
|
||
|
}
|
||
|
|
||
|
// GetSubmitterDisplayNameOk returns a tuple with the SubmitterDisplayName field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetSubmitterDisplayNameOk() (*string, bool) {
|
||
|
if o == nil || o.SubmitterDisplayName == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.SubmitterDisplayName, true
|
||
|
}
|
||
|
|
||
|
// HasSubmitterDisplayName returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasSubmitterDisplayName() bool {
|
||
|
if o != nil && o.SubmitterDisplayName != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetSubmitterDisplayName gets a reference to the given string and assigns it to the SubmitterDisplayName field.
|
||
|
func (o *V1Subtask) SetSubmitterDisplayName(v string) {
|
||
|
o.SubmitterDisplayName = &v
|
||
|
}
|
||
|
|
||
|
// GetSubmitterEmail returns the SubmitterEmail field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetSubmitterEmail() string {
|
||
|
if o == nil || o.SubmitterEmail == nil {
|
||
|
var ret string
|
||
|
return ret
|
||
|
}
|
||
|
return *o.SubmitterEmail
|
||
|
}
|
||
|
|
||
|
// GetSubmitterEmailOk returns a tuple with the SubmitterEmail field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetSubmitterEmailOk() (*string, bool) {
|
||
|
if o == nil || o.SubmitterEmail == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.SubmitterEmail, true
|
||
|
}
|
||
|
|
||
|
// HasSubmitterEmail returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasSubmitterEmail() bool {
|
||
|
if o != nil && o.SubmitterEmail != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetSubmitterEmail gets a reference to the given string and assigns it to the SubmitterEmail field.
|
||
|
func (o *V1Subtask) SetSubmitterEmail(v string) {
|
||
|
o.SubmitterEmail = &v
|
||
|
}
|
||
|
|
||
|
// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetFinishedAt() time.Time {
|
||
|
if o == nil || o.FinishedAt == nil {
|
||
|
var ret time.Time
|
||
|
return ret
|
||
|
}
|
||
|
return *o.FinishedAt
|
||
|
}
|
||
|
|
||
|
// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetFinishedAtOk() (*time.Time, bool) {
|
||
|
if o == nil || o.FinishedAt == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.FinishedAt, true
|
||
|
}
|
||
|
|
||
|
// HasFinishedAt returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasFinishedAt() bool {
|
||
|
if o != nil && o.FinishedAt != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetFinishedAt gets a reference to the given time.Time and assigns it to the FinishedAt field.
|
||
|
func (o *V1Subtask) SetFinishedAt(v time.Time) {
|
||
|
o.FinishedAt = &v
|
||
|
}
|
||
|
|
||
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||
|
func (o *V1Subtask) GetCreatedAt() time.Time {
|
||
|
if o == nil || o.CreatedAt == nil {
|
||
|
var ret time.Time
|
||
|
return ret
|
||
|
}
|
||
|
return *o.CreatedAt
|
||
|
}
|
||
|
|
||
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Subtask) GetCreatedAtOk() (*time.Time, bool) {
|
||
|
if o == nil || o.CreatedAt == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.CreatedAt, true
|
||
|
}
|
||
|
|
||
|
// HasCreatedAt returns a boolean if a field has been set.
|
||
|
func (o *V1Subtask) HasCreatedAt() bool {
|
||
|
if o != nil && o.CreatedAt != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||
|
func (o *V1Subtask) SetCreatedAt(v time.Time) {
|
||
|
o.CreatedAt = &v
|
||
|
}
|
||
|
|
||
|
func (o V1Subtask) MarshalJSON() ([]byte, error) {
|
||
|
toSerialize := map[string]interface{}{}
|
||
|
if o.Arch != nil {
|
||
|
toSerialize["arch"] = o.Arch
|
||
|
}
|
||
|
if o.Type != nil {
|
||
|
toSerialize["type"] = o.Type
|
||
|
}
|
||
|
if o.Response != nil {
|
||
|
toSerialize["response"] = o.Response
|
||
|
}
|
||
|
if o.Metadata != nil {
|
||
|
toSerialize["metadata"] = o.Metadata
|
||
|
}
|
||
|
if o.Status != nil {
|
||
|
toSerialize["status"] = o.Status
|
||
|
}
|
||
|
if o.ParentTaskId != nil {
|
||
|
toSerialize["parentTaskId"] = o.ParentTaskId
|
||
|
}
|
||
|
if o.Id != nil {
|
||
|
toSerialize["id"] = o.Id
|
||
|
}
|
||
|
if o.SubmitterId != nil {
|
||
|
toSerialize["submitterId"] = o.SubmitterId
|
||
|
}
|
||
|
if o.SubmitterDisplayName != nil {
|
||
|
toSerialize["submitterDisplayName"] = o.SubmitterDisplayName
|
||
|
}
|
||
|
if o.SubmitterEmail != nil {
|
||
|
toSerialize["submitterEmail"] = o.SubmitterEmail
|
||
|
}
|
||
|
if o.FinishedAt != nil {
|
||
|
toSerialize["finishedAt"] = o.FinishedAt
|
||
|
}
|
||
|
if o.CreatedAt != nil {
|
||
|
toSerialize["createdAt"] = o.CreatedAt
|
||
|
}
|
||
|
return json.Marshal(toSerialize)
|
||
|
}
|
||
|
|
||
|
type NullableV1Subtask struct {
|
||
|
value *V1Subtask
|
||
|
isSet bool
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Subtask) Get() *V1Subtask {
|
||
|
return v.value
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Subtask) Set(val *V1Subtask) {
|
||
|
v.value = val
|
||
|
v.isSet = true
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Subtask) IsSet() bool {
|
||
|
return v.isSet
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Subtask) Unset() {
|
||
|
v.value = nil
|
||
|
v.isSet = false
|
||
|
}
|
||
|
|
||
|
func NewNullableV1Subtask(val *V1Subtask) *NullableV1Subtask {
|
||
|
return &NullableV1Subtask{value: val, isSet: true}
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Subtask) MarshalJSON() ([]byte, error) {
|
||
|
return json.Marshal(v.value)
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Subtask) UnmarshalJSON(src []byte) error {
|
||
|
v.isSet = true
|
||
|
return json.Unmarshal(src, &v.value)
|
||
|
}
|
||
|
|
||
|
|