Files
sdk/model_licensing_release_asset.go

266 lines
7.6 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 LicensingReleaseAsset type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LicensingReleaseAsset{}
// LicensingReleaseAsset struct for LicensingReleaseAsset
type LicensingReleaseAsset struct {
CosignCert *string `json:"cosign_cert,omitempty"`
CosignSignature *string `json:"cosign_signature,omitempty"`
// DownloadURL is a short-lived signed URL to the artifact bytes. The scaffold returns the ArtifactRef as-is; production issues a signed URL.
DownloadUrl *string `json:"download_url,omitempty"`
Release *LicensingRelease `json:"release,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LicensingReleaseAsset LicensingReleaseAsset
// NewLicensingReleaseAsset instantiates a new LicensingReleaseAsset 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 NewLicensingReleaseAsset() *LicensingReleaseAsset {
this := LicensingReleaseAsset{}
return &this
}
// NewLicensingReleaseAssetWithDefaults instantiates a new LicensingReleaseAsset 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 NewLicensingReleaseAssetWithDefaults() *LicensingReleaseAsset {
this := LicensingReleaseAsset{}
return &this
}
// GetCosignCert returns the CosignCert field value if set, zero value otherwise.
func (o *LicensingReleaseAsset) GetCosignCert() string {
if o == nil || IsNil(o.CosignCert) {
var ret string
return ret
}
return *o.CosignCert
}
// GetCosignCertOk returns a tuple with the CosignCert field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LicensingReleaseAsset) GetCosignCertOk() (*string, bool) {
if o == nil || IsNil(o.CosignCert) {
return nil, false
}
return o.CosignCert, true
}
// HasCosignCert returns a boolean if a field has been set.
func (o *LicensingReleaseAsset) HasCosignCert() bool {
if o != nil && !IsNil(o.CosignCert) {
return true
}
return false
}
// SetCosignCert gets a reference to the given string and assigns it to the CosignCert field.
func (o *LicensingReleaseAsset) SetCosignCert(v string) {
o.CosignCert = &v
}
// GetCosignSignature returns the CosignSignature field value if set, zero value otherwise.
func (o *LicensingReleaseAsset) GetCosignSignature() string {
if o == nil || IsNil(o.CosignSignature) {
var ret string
return ret
}
return *o.CosignSignature
}
// GetCosignSignatureOk returns a tuple with the CosignSignature field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LicensingReleaseAsset) GetCosignSignatureOk() (*string, bool) {
if o == nil || IsNil(o.CosignSignature) {
return nil, false
}
return o.CosignSignature, true
}
// HasCosignSignature returns a boolean if a field has been set.
func (o *LicensingReleaseAsset) HasCosignSignature() bool {
if o != nil && !IsNil(o.CosignSignature) {
return true
}
return false
}
// SetCosignSignature gets a reference to the given string and assigns it to the CosignSignature field.
func (o *LicensingReleaseAsset) SetCosignSignature(v string) {
o.CosignSignature = &v
}
// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise.
func (o *LicensingReleaseAsset) GetDownloadUrl() string {
if o == nil || IsNil(o.DownloadUrl) {
var ret string
return ret
}
return *o.DownloadUrl
}
// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LicensingReleaseAsset) GetDownloadUrlOk() (*string, bool) {
if o == nil || IsNil(o.DownloadUrl) {
return nil, false
}
return o.DownloadUrl, true
}
// HasDownloadUrl returns a boolean if a field has been set.
func (o *LicensingReleaseAsset) HasDownloadUrl() bool {
if o != nil && !IsNil(o.DownloadUrl) {
return true
}
return false
}
// SetDownloadUrl gets a reference to the given string and assigns it to the DownloadUrl field.
func (o *LicensingReleaseAsset) SetDownloadUrl(v string) {
o.DownloadUrl = &v
}
// GetRelease returns the Release field value if set, zero value otherwise.
func (o *LicensingReleaseAsset) GetRelease() LicensingRelease {
if o == nil || IsNil(o.Release) {
var ret LicensingRelease
return ret
}
return *o.Release
}
// GetReleaseOk returns a tuple with the Release field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LicensingReleaseAsset) GetReleaseOk() (*LicensingRelease, bool) {
if o == nil || IsNil(o.Release) {
return nil, false
}
return o.Release, true
}
// HasRelease returns a boolean if a field has been set.
func (o *LicensingReleaseAsset) HasRelease() bool {
if o != nil && !IsNil(o.Release) {
return true
}
return false
}
// SetRelease gets a reference to the given LicensingRelease and assigns it to the Release field.
func (o *LicensingReleaseAsset) SetRelease(v LicensingRelease) {
o.Release = &v
}
func (o LicensingReleaseAsset) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LicensingReleaseAsset) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CosignCert) {
toSerialize["cosign_cert"] = o.CosignCert
}
if !IsNil(o.CosignSignature) {
toSerialize["cosign_signature"] = o.CosignSignature
}
if !IsNil(o.DownloadUrl) {
toSerialize["download_url"] = o.DownloadUrl
}
if !IsNil(o.Release) {
toSerialize["release"] = o.Release
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LicensingReleaseAsset) UnmarshalJSON(data []byte) (err error) {
varLicensingReleaseAsset := _LicensingReleaseAsset{}
err = json.Unmarshal(data, &varLicensingReleaseAsset)
if err != nil {
return err
}
*o = LicensingReleaseAsset(varLicensingReleaseAsset)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "cosign_cert")
delete(additionalProperties, "cosign_signature")
delete(additionalProperties, "download_url")
delete(additionalProperties, "release")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLicensingReleaseAsset struct {
value *LicensingReleaseAsset
isSet bool
}
func (v NullableLicensingReleaseAsset) Get() *LicensingReleaseAsset {
return v.value
}
func (v *NullableLicensingReleaseAsset) Set(val *LicensingReleaseAsset) {
v.value = val
v.isSet = true
}
func (v NullableLicensingReleaseAsset) IsSet() bool {
return v.isSet
}
func (v *NullableLicensingReleaseAsset) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLicensingReleaseAsset(val *LicensingReleaseAsset) *NullableLicensingReleaseAsset {
return &NullableLicensingReleaseAsset{value: val, isSet: true}
}
func (v NullableLicensingReleaseAsset) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLicensingReleaseAsset) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}