mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-10 16:31:24 +00:00
265 lines
6.4 KiB
Go
265 lines
6.4 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"
|
||
|
)
|
||
|
|
||
|
// V1Package struct for V1Package
|
||
|
type V1Package struct {
|
||
|
Id *string `json:"id,omitempty"`
|
||
|
Name *string `json:"name,omitempty"`
|
||
|
Type *V1PackageType `json:"type,omitempty"`
|
||
|
LastImportAt *time.Time `json:"lastImportAt,omitempty"`
|
||
|
LastBuildAt *time.Time `json:"lastBuildAt,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewV1Package instantiates a new V1Package 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 NewV1Package() *V1Package {
|
||
|
this := V1Package{}
|
||
|
var type_ V1PackageType = DEFAULT
|
||
|
this.Type = &type_
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// NewV1PackageWithDefaults instantiates a new V1Package 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 NewV1PackageWithDefaults() *V1Package {
|
||
|
this := V1Package{}
|
||
|
var type_ V1PackageType = DEFAULT
|
||
|
this.Type = &type_
|
||
|
return &this
|
||
|
}
|
||
|
|
||
|
// GetId returns the Id field value if set, zero value otherwise.
|
||
|
func (o *V1Package) 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 *V1Package) 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 *V1Package) 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 *V1Package) SetId(v string) {
|
||
|
o.Id = &v
|
||
|
}
|
||
|
|
||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||
|
func (o *V1Package) GetName() string {
|
||
|
if o == nil || o.Name == nil {
|
||
|
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 *V1Package) GetNameOk() (*string, bool) {
|
||
|
if o == nil || o.Name == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.Name, true
|
||
|
}
|
||
|
|
||
|
// HasName returns a boolean if a field has been set.
|
||
|
func (o *V1Package) HasName() bool {
|
||
|
if o != nil && o.Name != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||
|
func (o *V1Package) SetName(v string) {
|
||
|
o.Name = &v
|
||
|
}
|
||
|
|
||
|
// GetType returns the Type field value if set, zero value otherwise.
|
||
|
func (o *V1Package) GetType() V1PackageType {
|
||
|
if o == nil || o.Type == nil {
|
||
|
var ret V1PackageType
|
||
|
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 *V1Package) GetTypeOk() (*V1PackageType, 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 *V1Package) HasType() bool {
|
||
|
if o != nil && o.Type != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetType gets a reference to the given V1PackageType and assigns it to the Type field.
|
||
|
func (o *V1Package) SetType(v V1PackageType) {
|
||
|
o.Type = &v
|
||
|
}
|
||
|
|
||
|
// GetLastImportAt returns the LastImportAt field value if set, zero value otherwise.
|
||
|
func (o *V1Package) GetLastImportAt() time.Time {
|
||
|
if o == nil || o.LastImportAt == nil {
|
||
|
var ret time.Time
|
||
|
return ret
|
||
|
}
|
||
|
return *o.LastImportAt
|
||
|
}
|
||
|
|
||
|
// GetLastImportAtOk returns a tuple with the LastImportAt field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Package) GetLastImportAtOk() (*time.Time, bool) {
|
||
|
if o == nil || o.LastImportAt == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.LastImportAt, true
|
||
|
}
|
||
|
|
||
|
// HasLastImportAt returns a boolean if a field has been set.
|
||
|
func (o *V1Package) HasLastImportAt() bool {
|
||
|
if o != nil && o.LastImportAt != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetLastImportAt gets a reference to the given time.Time and assigns it to the LastImportAt field.
|
||
|
func (o *V1Package) SetLastImportAt(v time.Time) {
|
||
|
o.LastImportAt = &v
|
||
|
}
|
||
|
|
||
|
// GetLastBuildAt returns the LastBuildAt field value if set, zero value otherwise.
|
||
|
func (o *V1Package) GetLastBuildAt() time.Time {
|
||
|
if o == nil || o.LastBuildAt == nil {
|
||
|
var ret time.Time
|
||
|
return ret
|
||
|
}
|
||
|
return *o.LastBuildAt
|
||
|
}
|
||
|
|
||
|
// GetLastBuildAtOk returns a tuple with the LastBuildAt field value if set, nil otherwise
|
||
|
// and a boolean to check if the value has been set.
|
||
|
func (o *V1Package) GetLastBuildAtOk() (*time.Time, bool) {
|
||
|
if o == nil || o.LastBuildAt == nil {
|
||
|
return nil, false
|
||
|
}
|
||
|
return o.LastBuildAt, true
|
||
|
}
|
||
|
|
||
|
// HasLastBuildAt returns a boolean if a field has been set.
|
||
|
func (o *V1Package) HasLastBuildAt() bool {
|
||
|
if o != nil && o.LastBuildAt != nil {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// SetLastBuildAt gets a reference to the given time.Time and assigns it to the LastBuildAt field.
|
||
|
func (o *V1Package) SetLastBuildAt(v time.Time) {
|
||
|
o.LastBuildAt = &v
|
||
|
}
|
||
|
|
||
|
func (o V1Package) MarshalJSON() ([]byte, error) {
|
||
|
toSerialize := map[string]interface{}{}
|
||
|
if o.Id != nil {
|
||
|
toSerialize["id"] = o.Id
|
||
|
}
|
||
|
if o.Name != nil {
|
||
|
toSerialize["name"] = o.Name
|
||
|
}
|
||
|
if o.Type != nil {
|
||
|
toSerialize["type"] = o.Type
|
||
|
}
|
||
|
if o.LastImportAt != nil {
|
||
|
toSerialize["lastImportAt"] = o.LastImportAt
|
||
|
}
|
||
|
if o.LastBuildAt != nil {
|
||
|
toSerialize["lastBuildAt"] = o.LastBuildAt
|
||
|
}
|
||
|
return json.Marshal(toSerialize)
|
||
|
}
|
||
|
|
||
|
type NullableV1Package struct {
|
||
|
value *V1Package
|
||
|
isSet bool
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Package) Get() *V1Package {
|
||
|
return v.value
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Package) Set(val *V1Package) {
|
||
|
v.value = val
|
||
|
v.isSet = true
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Package) IsSet() bool {
|
||
|
return v.isSet
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Package) Unset() {
|
||
|
v.value = nil
|
||
|
v.isSet = false
|
||
|
}
|
||
|
|
||
|
func NewNullableV1Package(val *V1Package) *NullableV1Package {
|
||
|
return &NullableV1Package{value: val, isSet: true}
|
||
|
}
|
||
|
|
||
|
func (v NullableV1Package) MarshalJSON() ([]byte, error) {
|
||
|
return json.Marshal(v.value)
|
||
|
}
|
||
|
|
||
|
func (v *NullableV1Package) UnmarshalJSON(src []byte) error {
|
||
|
v.isSet = true
|
||
|
return json.Unmarshal(src, &v.value)
|
||
|
}
|
||
|
|
||
|
|