mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.8 KiB
Go
193 lines
5.8 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 LicensingFingerprintResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LicensingFingerprintResponse{}
|
|
|
|
// LicensingFingerprintResponse struct for LicensingFingerprintResponse
|
|
type LicensingFingerprintResponse struct {
|
|
// Fingerprint is the OPAQUE binding value to pass to POST /v1/licensing/issue. It is one-way: the raw signals cannot be recovered from it and are never echoed back.
|
|
Fingerprint *string `json:"fingerprint,omitempty"`
|
|
// Version is the binding algorithm revision, so a stored fingerprint stays recognizable across a recipe rotation.
|
|
Version *string `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _LicensingFingerprintResponse LicensingFingerprintResponse
|
|
|
|
// NewLicensingFingerprintResponse instantiates a new LicensingFingerprintResponse 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 NewLicensingFingerprintResponse() *LicensingFingerprintResponse {
|
|
this := LicensingFingerprintResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewLicensingFingerprintResponseWithDefaults instantiates a new LicensingFingerprintResponse 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 NewLicensingFingerprintResponseWithDefaults() *LicensingFingerprintResponse {
|
|
this := LicensingFingerprintResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetFingerprint returns the Fingerprint field value if set, zero value otherwise.
|
|
func (o *LicensingFingerprintResponse) GetFingerprint() string {
|
|
if o == nil || IsNil(o.Fingerprint) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Fingerprint
|
|
}
|
|
|
|
// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LicensingFingerprintResponse) GetFingerprintOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Fingerprint) {
|
|
return nil, false
|
|
}
|
|
return o.Fingerprint, true
|
|
}
|
|
|
|
// HasFingerprint returns a boolean if a field has been set.
|
|
func (o *LicensingFingerprintResponse) HasFingerprint() bool {
|
|
if o != nil && !IsNil(o.Fingerprint) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field.
|
|
func (o *LicensingFingerprintResponse) SetFingerprint(v string) {
|
|
o.Fingerprint = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *LicensingFingerprintResponse) 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 *LicensingFingerprintResponse) 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 *LicensingFingerprintResponse) 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 *LicensingFingerprintResponse) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o LicensingFingerprintResponse) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o LicensingFingerprintResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Fingerprint) {
|
|
toSerialize["fingerprint"] = o.Fingerprint
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *LicensingFingerprintResponse) UnmarshalJSON(data []byte) (err error) {
|
|
varLicensingFingerprintResponse := _LicensingFingerprintResponse{}
|
|
|
|
err = json.Unmarshal(data, &varLicensingFingerprintResponse)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = LicensingFingerprintResponse(varLicensingFingerprintResponse)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "fingerprint")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableLicensingFingerprintResponse struct {
|
|
value *LicensingFingerprintResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLicensingFingerprintResponse) Get() *LicensingFingerprintResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLicensingFingerprintResponse) Set(val *LicensingFingerprintResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLicensingFingerprintResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLicensingFingerprintResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLicensingFingerprintResponse(val *LicensingFingerprintResponse) *NullableLicensingFingerprintResponse {
|
|
return &NullableLicensingFingerprintResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLicensingFingerprintResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLicensingFingerprintResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|