mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
572 lines
16 KiB
Go
572 lines
16 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 LicensingRelease type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LicensingRelease{}
|
|
|
|
// LicensingRelease struct for LicensingRelease
|
|
type LicensingRelease struct {
|
|
// AppID scopes the release to an app build (\"hanzo\" | \"lux\" | \"zoo\").
|
|
AppId *string `json:"app_id,omitempty"`
|
|
// ArtifactRef is where the binary lives (object-store key / OCI ref / path).
|
|
ArtifactRef *string `json:"artifact_ref,omitempty"`
|
|
// CosignCert is the cosign/Fulcio cert (keyless) or public key ref used to verify CosignSignature. The download response hands this to the client.
|
|
CosignCert *string `json:"cosign_cert,omitempty"`
|
|
// CosignSignature is the base64 cosign signature over the artifact digest.
|
|
CosignSignature *string `json:"cosign_signature,omitempty"`
|
|
CreatedAt *int64 `json:"created_at,omitempty"`
|
|
// ID is the release identifier, e.g. \"engine-rocm-0.4.2-linux-amd64\". The accelerator belongs here — one product is built several ways — and never in Product below.
|
|
Id *string `json:"id,omitempty"`
|
|
// MinFeatures, when set, are features the license must include to download.
|
|
MinFeatures []string `json:"min_features,omitempty"`
|
|
// Platform is \"<os>/<arch>\", e.g. \"linux/amd64\".
|
|
Platform *string `json:"platform,omitempty"`
|
|
// Product is the licensed product this artifact belongs to (commerce SKU): \"engine\" for every one of those builds.
|
|
Product *string `json:"product,omitempty"`
|
|
// SHA256 is the hex digest of the artifact (integrity + cosign subject).
|
|
Sha256 *string `json:"sha256,omitempty"`
|
|
// Version is the semantic version of the binary.
|
|
Version *string `json:"version,omitempty"`
|
|
// Yanked marks a pulled release (download refused; tokens may be revoked release-scoped too).
|
|
Yanked *bool `json:"yanked,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _LicensingRelease LicensingRelease
|
|
|
|
// NewLicensingRelease instantiates a new LicensingRelease 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 NewLicensingRelease() *LicensingRelease {
|
|
this := LicensingRelease{}
|
|
return &this
|
|
}
|
|
|
|
// NewLicensingReleaseWithDefaults instantiates a new LicensingRelease 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 NewLicensingReleaseWithDefaults() *LicensingRelease {
|
|
this := LicensingRelease{}
|
|
return &this
|
|
}
|
|
|
|
// GetAppId returns the AppId field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetAppId() string {
|
|
if o == nil || IsNil(o.AppId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AppId
|
|
}
|
|
|
|
// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetAppIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AppId) {
|
|
return nil, false
|
|
}
|
|
return o.AppId, true
|
|
}
|
|
|
|
// HasAppId returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasAppId() bool {
|
|
if o != nil && !IsNil(o.AppId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAppId gets a reference to the given string and assigns it to the AppId field.
|
|
func (o *LicensingRelease) SetAppId(v string) {
|
|
o.AppId = &v
|
|
}
|
|
|
|
// GetArtifactRef returns the ArtifactRef field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetArtifactRef() string {
|
|
if o == nil || IsNil(o.ArtifactRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ArtifactRef
|
|
}
|
|
|
|
// GetArtifactRefOk returns a tuple with the ArtifactRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetArtifactRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ArtifactRef) {
|
|
return nil, false
|
|
}
|
|
return o.ArtifactRef, true
|
|
}
|
|
|
|
// HasArtifactRef returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasArtifactRef() bool {
|
|
if o != nil && !IsNil(o.ArtifactRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArtifactRef gets a reference to the given string and assigns it to the ArtifactRef field.
|
|
func (o *LicensingRelease) SetArtifactRef(v string) {
|
|
o.ArtifactRef = &v
|
|
}
|
|
|
|
// GetCosignCert returns the CosignCert field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) 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 *LicensingRelease) 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 *LicensingRelease) 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 *LicensingRelease) SetCosignCert(v string) {
|
|
o.CosignCert = &v
|
|
}
|
|
|
|
// GetCosignSignature returns the CosignSignature field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) 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 *LicensingRelease) 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 *LicensingRelease) 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 *LicensingRelease) SetCosignSignature(v string) {
|
|
o.CosignSignature = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
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 *LicensingRelease) GetCreatedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *LicensingRelease) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
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 *LicensingRelease) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *LicensingRelease) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetMinFeatures returns the MinFeatures field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetMinFeatures() []string {
|
|
if o == nil || IsNil(o.MinFeatures) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.MinFeatures
|
|
}
|
|
|
|
// GetMinFeaturesOk returns a tuple with the MinFeatures field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetMinFeaturesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.MinFeatures) {
|
|
return nil, false
|
|
}
|
|
return o.MinFeatures, true
|
|
}
|
|
|
|
// HasMinFeatures returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasMinFeatures() bool {
|
|
if o != nil && !IsNil(o.MinFeatures) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMinFeatures gets a reference to the given []string and assigns it to the MinFeatures field.
|
|
func (o *LicensingRelease) SetMinFeatures(v []string) {
|
|
o.MinFeatures = v
|
|
}
|
|
|
|
// GetPlatform returns the Platform field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetPlatform() string {
|
|
if o == nil || IsNil(o.Platform) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Platform
|
|
}
|
|
|
|
// GetPlatformOk returns a tuple with the Platform field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetPlatformOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Platform) {
|
|
return nil, false
|
|
}
|
|
return o.Platform, true
|
|
}
|
|
|
|
// HasPlatform returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasPlatform() bool {
|
|
if o != nil && !IsNil(o.Platform) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPlatform gets a reference to the given string and assigns it to the Platform field.
|
|
func (o *LicensingRelease) SetPlatform(v string) {
|
|
o.Platform = &v
|
|
}
|
|
|
|
// GetProduct returns the Product field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetProduct() string {
|
|
if o == nil || IsNil(o.Product) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Product
|
|
}
|
|
|
|
// GetProductOk returns a tuple with the Product field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetProductOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Product) {
|
|
return nil, false
|
|
}
|
|
return o.Product, true
|
|
}
|
|
|
|
// HasProduct returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasProduct() bool {
|
|
if o != nil && !IsNil(o.Product) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProduct gets a reference to the given string and assigns it to the Product field.
|
|
func (o *LicensingRelease) SetProduct(v string) {
|
|
o.Product = &v
|
|
}
|
|
|
|
// GetSha256 returns the Sha256 field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetSha256() string {
|
|
if o == nil || IsNil(o.Sha256) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sha256
|
|
}
|
|
|
|
// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetSha256Ok() (*string, bool) {
|
|
if o == nil || IsNil(o.Sha256) {
|
|
return nil, false
|
|
}
|
|
return o.Sha256, true
|
|
}
|
|
|
|
// HasSha256 returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasSha256() bool {
|
|
if o != nil && !IsNil(o.Sha256) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSha256 gets a reference to the given string and assigns it to the Sha256 field.
|
|
func (o *LicensingRelease) SetSha256(v string) {
|
|
o.Sha256 = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetVersion() string {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
|
func (o *LicensingRelease) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetYanked returns the Yanked field value if set, zero value otherwise.
|
|
func (o *LicensingRelease) GetYanked() bool {
|
|
if o == nil || IsNil(o.Yanked) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Yanked
|
|
}
|
|
|
|
// GetYankedOk returns a tuple with the Yanked field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingRelease) GetYankedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Yanked) {
|
|
return nil, false
|
|
}
|
|
return o.Yanked, true
|
|
}
|
|
|
|
// HasYanked returns a boolean if a field has been set.
|
|
func (o *LicensingRelease) HasYanked() bool {
|
|
if o != nil && !IsNil(o.Yanked) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetYanked gets a reference to the given bool and assigns it to the Yanked field.
|
|
func (o *LicensingRelease) SetYanked(v bool) {
|
|
o.Yanked = &v
|
|
}
|
|
|
|
func (o LicensingRelease) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o LicensingRelease) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AppId) {
|
|
toSerialize["app_id"] = o.AppId
|
|
}
|
|
if !IsNil(o.ArtifactRef) {
|
|
toSerialize["artifact_ref"] = o.ArtifactRef
|
|
}
|
|
if !IsNil(o.CosignCert) {
|
|
toSerialize["cosign_cert"] = o.CosignCert
|
|
}
|
|
if !IsNil(o.CosignSignature) {
|
|
toSerialize["cosign_signature"] = o.CosignSignature
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["created_at"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.MinFeatures) {
|
|
toSerialize["min_features"] = o.MinFeatures
|
|
}
|
|
if !IsNil(o.Platform) {
|
|
toSerialize["platform"] = o.Platform
|
|
}
|
|
if !IsNil(o.Product) {
|
|
toSerialize["product"] = o.Product
|
|
}
|
|
if !IsNil(o.Sha256) {
|
|
toSerialize["sha256"] = o.Sha256
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.Yanked) {
|
|
toSerialize["yanked"] = o.Yanked
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *LicensingRelease) UnmarshalJSON(data []byte) (err error) {
|
|
varLicensingRelease := _LicensingRelease{}
|
|
|
|
err = json.Unmarshal(data, &varLicensingRelease)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = LicensingRelease(varLicensingRelease)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "app_id")
|
|
delete(additionalProperties, "artifact_ref")
|
|
delete(additionalProperties, "cosign_cert")
|
|
delete(additionalProperties, "cosign_signature")
|
|
delete(additionalProperties, "created_at")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "min_features")
|
|
delete(additionalProperties, "platform")
|
|
delete(additionalProperties, "product")
|
|
delete(additionalProperties, "sha256")
|
|
delete(additionalProperties, "version")
|
|
delete(additionalProperties, "yanked")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableLicensingRelease struct {
|
|
value *LicensingRelease
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLicensingRelease) Get() *LicensingRelease {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLicensingRelease) Set(val *LicensingRelease) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLicensingRelease) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLicensingRelease) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLicensingRelease(val *LicensingRelease) *NullableLicensingRelease {
|
|
return &NullableLicensingRelease{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLicensingRelease) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLicensingRelease) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|