163 lines
4.9 KiB
Go
163 lines
4.9 KiB
Go
/*
|
|
Model Registry REST API
|
|
|
|
REST API for Model Registry to create and manage ML model metadata
|
|
|
|
API version: v1alpha3
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package openapi
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the BaseResourceDates type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BaseResourceDates{}
|
|
|
|
// BaseResourceDates Common timestamp fields for resources
|
|
type BaseResourceDates struct {
|
|
// Output only. Create time of the resource in millisecond since epoch.
|
|
CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"`
|
|
// Output only. Last update time of the resource since epoch in millisecond since epoch.
|
|
LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"`
|
|
}
|
|
|
|
// NewBaseResourceDates instantiates a new BaseResourceDates 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 NewBaseResourceDates() *BaseResourceDates {
|
|
this := BaseResourceDates{}
|
|
return &this
|
|
}
|
|
|
|
// NewBaseResourceDatesWithDefaults instantiates a new BaseResourceDates 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 NewBaseResourceDatesWithDefaults() *BaseResourceDates {
|
|
this := BaseResourceDates{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise.
|
|
func (o *BaseResourceDates) GetCreateTimeSinceEpoch() string {
|
|
if o == nil || IsNil(o.CreateTimeSinceEpoch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreateTimeSinceEpoch
|
|
}
|
|
|
|
// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BaseResourceDates) GetCreateTimeSinceEpochOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreateTimeSinceEpoch) {
|
|
return nil, false
|
|
}
|
|
return o.CreateTimeSinceEpoch, true
|
|
}
|
|
|
|
// HasCreateTimeSinceEpoch returns a boolean if a field has been set.
|
|
func (o *BaseResourceDates) HasCreateTimeSinceEpoch() bool {
|
|
if o != nil && !IsNil(o.CreateTimeSinceEpoch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field.
|
|
func (o *BaseResourceDates) SetCreateTimeSinceEpoch(v string) {
|
|
o.CreateTimeSinceEpoch = &v
|
|
}
|
|
|
|
// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise.
|
|
func (o *BaseResourceDates) GetLastUpdateTimeSinceEpoch() string {
|
|
if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LastUpdateTimeSinceEpoch
|
|
}
|
|
|
|
// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BaseResourceDates) GetLastUpdateTimeSinceEpochOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) {
|
|
return nil, false
|
|
}
|
|
return o.LastUpdateTimeSinceEpoch, true
|
|
}
|
|
|
|
// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set.
|
|
func (o *BaseResourceDates) HasLastUpdateTimeSinceEpoch() bool {
|
|
if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field.
|
|
func (o *BaseResourceDates) SetLastUpdateTimeSinceEpoch(v string) {
|
|
o.LastUpdateTimeSinceEpoch = &v
|
|
}
|
|
|
|
func (o BaseResourceDates) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BaseResourceDates) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreateTimeSinceEpoch) {
|
|
toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch
|
|
}
|
|
if !IsNil(o.LastUpdateTimeSinceEpoch) {
|
|
toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableBaseResourceDates struct {
|
|
value *BaseResourceDates
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBaseResourceDates) Get() *BaseResourceDates {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBaseResourceDates) Set(val *BaseResourceDates) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBaseResourceDates) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBaseResourceDates) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBaseResourceDates(val *BaseResourceDates) *NullableBaseResourceDates {
|
|
return &NullableBaseResourceDates{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBaseResourceDates) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBaseResourceDates) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|