mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-31 20:41:22 +00:00
496b60ba44
Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
369 lines
9.0 KiB
Go
369 lines
9.0 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"
|
|
)
|
|
|
|
// V1BuildBatch struct for V1BuildBatch
|
|
type V1BuildBatch struct {
|
|
Id *string `json:"id,omitempty"`
|
|
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
|
Count *int32 `json:"count,omitempty"`
|
|
Pending *int32 `json:"pending,omitempty"`
|
|
Running *int32 `json:"running,omitempty"`
|
|
Succeeded *int32 `json:"succeeded,omitempty"`
|
|
Failed *int32 `json:"failed,omitempty"`
|
|
Canceled *int32 `json:"canceled,omitempty"`
|
|
}
|
|
|
|
// NewV1BuildBatch instantiates a new V1BuildBatch 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 NewV1BuildBatch() *V1BuildBatch {
|
|
this := V1BuildBatch{}
|
|
return &this
|
|
}
|
|
|
|
// NewV1BuildBatchWithDefaults instantiates a new V1BuildBatch 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 NewV1BuildBatchWithDefaults() *V1BuildBatch {
|
|
this := V1BuildBatch{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) 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 *V1BuildBatch) 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 *V1BuildBatch) 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 *V1BuildBatch) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) 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 *V1BuildBatch) 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 *V1BuildBatch) 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 *V1BuildBatch) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetCount() int32 {
|
|
if o == nil || o.Count == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Count
|
|
}
|
|
|
|
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetCountOk() (*int32, bool) {
|
|
if o == nil || o.Count == nil {
|
|
return nil, false
|
|
}
|
|
return o.Count, true
|
|
}
|
|
|
|
// HasCount returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasCount() bool {
|
|
if o != nil && o.Count != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCount gets a reference to the given int32 and assigns it to the Count field.
|
|
func (o *V1BuildBatch) SetCount(v int32) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetPending returns the Pending field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetPending() int32 {
|
|
if o == nil || o.Pending == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Pending
|
|
}
|
|
|
|
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetPendingOk() (*int32, bool) {
|
|
if o == nil || o.Pending == nil {
|
|
return nil, false
|
|
}
|
|
return o.Pending, true
|
|
}
|
|
|
|
// HasPending returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasPending() bool {
|
|
if o != nil && o.Pending != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPending gets a reference to the given int32 and assigns it to the Pending field.
|
|
func (o *V1BuildBatch) SetPending(v int32) {
|
|
o.Pending = &v
|
|
}
|
|
|
|
// GetRunning returns the Running field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetRunning() int32 {
|
|
if o == nil || o.Running == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Running
|
|
}
|
|
|
|
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetRunningOk() (*int32, bool) {
|
|
if o == nil || o.Running == nil {
|
|
return nil, false
|
|
}
|
|
return o.Running, true
|
|
}
|
|
|
|
// HasRunning returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasRunning() bool {
|
|
if o != nil && o.Running != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunning gets a reference to the given int32 and assigns it to the Running field.
|
|
func (o *V1BuildBatch) SetRunning(v int32) {
|
|
o.Running = &v
|
|
}
|
|
|
|
// GetSucceeded returns the Succeeded field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetSucceeded() int32 {
|
|
if o == nil || o.Succeeded == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Succeeded
|
|
}
|
|
|
|
// GetSucceededOk returns a tuple with the Succeeded field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetSucceededOk() (*int32, bool) {
|
|
if o == nil || o.Succeeded == nil {
|
|
return nil, false
|
|
}
|
|
return o.Succeeded, true
|
|
}
|
|
|
|
// HasSucceeded returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasSucceeded() bool {
|
|
if o != nil && o.Succeeded != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSucceeded gets a reference to the given int32 and assigns it to the Succeeded field.
|
|
func (o *V1BuildBatch) SetSucceeded(v int32) {
|
|
o.Succeeded = &v
|
|
}
|
|
|
|
// GetFailed returns the Failed field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetFailed() int32 {
|
|
if o == nil || o.Failed == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Failed
|
|
}
|
|
|
|
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetFailedOk() (*int32, bool) {
|
|
if o == nil || o.Failed == nil {
|
|
return nil, false
|
|
}
|
|
return o.Failed, true
|
|
}
|
|
|
|
// HasFailed returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasFailed() bool {
|
|
if o != nil && o.Failed != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFailed gets a reference to the given int32 and assigns it to the Failed field.
|
|
func (o *V1BuildBatch) SetFailed(v int32) {
|
|
o.Failed = &v
|
|
}
|
|
|
|
// GetCanceled returns the Canceled field value if set, zero value otherwise.
|
|
func (o *V1BuildBatch) GetCanceled() int32 {
|
|
if o == nil || o.Canceled == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Canceled
|
|
}
|
|
|
|
// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *V1BuildBatch) GetCanceledOk() (*int32, bool) {
|
|
if o == nil || o.Canceled == nil {
|
|
return nil, false
|
|
}
|
|
return o.Canceled, true
|
|
}
|
|
|
|
// HasCanceled returns a boolean if a field has been set.
|
|
func (o *V1BuildBatch) HasCanceled() bool {
|
|
if o != nil && o.Canceled != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCanceled gets a reference to the given int32 and assigns it to the Canceled field.
|
|
func (o *V1BuildBatch) SetCanceled(v int32) {
|
|
o.Canceled = &v
|
|
}
|
|
|
|
func (o V1BuildBatch) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Id != nil {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if o.CreatedAt != nil {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if o.Count != nil {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if o.Pending != nil {
|
|
toSerialize["pending"] = o.Pending
|
|
}
|
|
if o.Running != nil {
|
|
toSerialize["running"] = o.Running
|
|
}
|
|
if o.Succeeded != nil {
|
|
toSerialize["succeeded"] = o.Succeeded
|
|
}
|
|
if o.Failed != nil {
|
|
toSerialize["failed"] = o.Failed
|
|
}
|
|
if o.Canceled != nil {
|
|
toSerialize["canceled"] = o.Canceled
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableV1BuildBatch struct {
|
|
value *V1BuildBatch
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableV1BuildBatch) Get() *V1BuildBatch {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableV1BuildBatch) Set(val *V1BuildBatch) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableV1BuildBatch) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableV1BuildBatch) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableV1BuildBatch(val *V1BuildBatch) *NullableV1BuildBatch {
|
|
return &NullableV1BuildBatch{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableV1BuildBatch) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableV1BuildBatch) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|