Files
sdk/model_deploy_argo_revision_metadata.go

307 lines
9.1 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the DeployArgoRevisionMetadata type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoRevisionMetadata{}
// DeployArgoRevisionMetadata struct for DeployArgoRevisionMetadata
type DeployArgoRevisionMetadata struct {
// Author is the commit author. Always absent: an App CR pins an IMAGE, so this process has no commit to read one from and will not invent one.
Author *string `json:"author,omitempty"`
// Date is when the App CR was created, RFC 3339 UTC — the only real timestamp there is here. It is NOT the date of the revision asked for.
Date *string `json:"date,omitempty"`
// Message is the revision asked for, echoed back — not a commit message. The empty revision and \"HEAD\" resolve to the image tag the CR declares (spec.image.tag), and anything longer than 256 characters is truncated to it.
Message *string `json:"message,omitempty"`
// SignatureInfo is the GPG verification result for the revision. Always absent: nothing here verifies a signature, and an empty field says so rather than implying an unsigned commit.
SignatureInfo *string `json:"signatureInfo,omitempty"`
// Tags are the git tags pointing at the revision. Always absent, for the same reason as Author.
Tags []string `json:"tags,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoRevisionMetadata DeployArgoRevisionMetadata
// NewDeployArgoRevisionMetadata instantiates a new DeployArgoRevisionMetadata 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 NewDeployArgoRevisionMetadata() *DeployArgoRevisionMetadata {
this := DeployArgoRevisionMetadata{}
return &this
}
// NewDeployArgoRevisionMetadataWithDefaults instantiates a new DeployArgoRevisionMetadata 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 NewDeployArgoRevisionMetadataWithDefaults() *DeployArgoRevisionMetadata {
this := DeployArgoRevisionMetadata{}
return &this
}
// GetAuthor returns the Author field value if set, zero value otherwise.
func (o *DeployArgoRevisionMetadata) GetAuthor() string {
if o == nil || IsNil(o.Author) {
var ret string
return ret
}
return *o.Author
}
// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoRevisionMetadata) GetAuthorOk() (*string, bool) {
if o == nil || IsNil(o.Author) {
return nil, false
}
return o.Author, true
}
// HasAuthor returns a boolean if a field has been set.
func (o *DeployArgoRevisionMetadata) HasAuthor() bool {
if o != nil && !IsNil(o.Author) {
return true
}
return false
}
// SetAuthor gets a reference to the given string and assigns it to the Author field.
func (o *DeployArgoRevisionMetadata) SetAuthor(v string) {
o.Author = &v
}
// GetDate returns the Date field value if set, zero value otherwise.
func (o *DeployArgoRevisionMetadata) GetDate() string {
if o == nil || IsNil(o.Date) {
var ret string
return ret
}
return *o.Date
}
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoRevisionMetadata) GetDateOk() (*string, bool) {
if o == nil || IsNil(o.Date) {
return nil, false
}
return o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *DeployArgoRevisionMetadata) HasDate() bool {
if o != nil && !IsNil(o.Date) {
return true
}
return false
}
// SetDate gets a reference to the given string and assigns it to the Date field.
func (o *DeployArgoRevisionMetadata) SetDate(v string) {
o.Date = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *DeployArgoRevisionMetadata) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoRevisionMetadata) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *DeployArgoRevisionMetadata) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *DeployArgoRevisionMetadata) SetMessage(v string) {
o.Message = &v
}
// GetSignatureInfo returns the SignatureInfo field value if set, zero value otherwise.
func (o *DeployArgoRevisionMetadata) GetSignatureInfo() string {
if o == nil || IsNil(o.SignatureInfo) {
var ret string
return ret
}
return *o.SignatureInfo
}
// GetSignatureInfoOk returns a tuple with the SignatureInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoRevisionMetadata) GetSignatureInfoOk() (*string, bool) {
if o == nil || IsNil(o.SignatureInfo) {
return nil, false
}
return o.SignatureInfo, true
}
// HasSignatureInfo returns a boolean if a field has been set.
func (o *DeployArgoRevisionMetadata) HasSignatureInfo() bool {
if o != nil && !IsNil(o.SignatureInfo) {
return true
}
return false
}
// SetSignatureInfo gets a reference to the given string and assigns it to the SignatureInfo field.
func (o *DeployArgoRevisionMetadata) SetSignatureInfo(v string) {
o.SignatureInfo = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *DeployArgoRevisionMetadata) GetTags() []string {
if o == nil || IsNil(o.Tags) {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoRevisionMetadata) GetTagsOk() ([]string, bool) {
if o == nil || IsNil(o.Tags) {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *DeployArgoRevisionMetadata) HasTags() bool {
if o != nil && !IsNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *DeployArgoRevisionMetadata) SetTags(v []string) {
o.Tags = v
}
func (o DeployArgoRevisionMetadata) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoRevisionMetadata) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Author) {
toSerialize["author"] = o.Author
}
if !IsNil(o.Date) {
toSerialize["date"] = o.Date
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
if !IsNil(o.SignatureInfo) {
toSerialize["signatureInfo"] = o.SignatureInfo
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoRevisionMetadata) UnmarshalJSON(data []byte) (err error) {
varDeployArgoRevisionMetadata := _DeployArgoRevisionMetadata{}
err = json.Unmarshal(data, &varDeployArgoRevisionMetadata)
if err != nil {
return err
}
*o = DeployArgoRevisionMetadata(varDeployArgoRevisionMetadata)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "author")
delete(additionalProperties, "date")
delete(additionalProperties, "message")
delete(additionalProperties, "signatureInfo")
delete(additionalProperties, "tags")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoRevisionMetadata struct {
value *DeployArgoRevisionMetadata
isSet bool
}
func (v NullableDeployArgoRevisionMetadata) Get() *DeployArgoRevisionMetadata {
return v.value
}
func (v *NullableDeployArgoRevisionMetadata) Set(val *DeployArgoRevisionMetadata) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoRevisionMetadata) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoRevisionMetadata) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoRevisionMetadata(val *DeployArgoRevisionMetadata) *NullableDeployArgoRevisionMetadata {
return &NullableDeployArgoRevisionMetadata{value: val, isSet: true}
}
func (v NullableDeployArgoRevisionMetadata) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoRevisionMetadata) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}