Files
sdk/model_iam_cert.go

859 lines
22 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"
"time"
)
// checks if the IamCert type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamCert{}
// IamCert struct for IamCert
type IamCert struct {
AccessKey *string `json:"accessKey,omitempty"`
AccessSecret *string `json:"accessSecret,omitempty"`
Account *string `json:"account,omitempty"`
BitSize *int64 `json:"bitSize,omitempty"`
Certificate *string `json:"certificate,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CreatedTime *string `json:"createdTime,omitempty"`
CryptoAlgorithm *string `json:"cryptoAlgorithm,omitempty"`
Deleted *bool `json:"deleted,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
DomainExpireTime *string `json:"domainExpireTime,omitempty"`
ExpireInYears *int64 `json:"expireInYears,omitempty"`
ExpireTime *string `json:"expireTime,omitempty"`
// Persisted fields
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Owner *string `json:"owner,omitempty"`
Provider *string `json:"provider,omitempty"`
Scope *string `json:"scope,omitempty"`
Type *string `json:"type,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamCert IamCert
// NewIamCert instantiates a new IamCert 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 NewIamCert() *IamCert {
this := IamCert{}
return &this
}
// NewIamCertWithDefaults instantiates a new IamCert 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 NewIamCertWithDefaults() *IamCert {
this := IamCert{}
return &this
}
// GetAccessKey returns the AccessKey field value if set, zero value otherwise.
func (o *IamCert) GetAccessKey() string {
if o == nil || IsNil(o.AccessKey) {
var ret string
return ret
}
return *o.AccessKey
}
// GetAccessKeyOk returns a tuple with the AccessKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetAccessKeyOk() (*string, bool) {
if o == nil || IsNil(o.AccessKey) {
return nil, false
}
return o.AccessKey, true
}
// HasAccessKey returns a boolean if a field has been set.
func (o *IamCert) HasAccessKey() bool {
if o != nil && !IsNil(o.AccessKey) {
return true
}
return false
}
// SetAccessKey gets a reference to the given string and assigns it to the AccessKey field.
func (o *IamCert) SetAccessKey(v string) {
o.AccessKey = &v
}
// GetAccessSecret returns the AccessSecret field value if set, zero value otherwise.
func (o *IamCert) GetAccessSecret() string {
if o == nil || IsNil(o.AccessSecret) {
var ret string
return ret
}
return *o.AccessSecret
}
// GetAccessSecretOk returns a tuple with the AccessSecret field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetAccessSecretOk() (*string, bool) {
if o == nil || IsNil(o.AccessSecret) {
return nil, false
}
return o.AccessSecret, true
}
// HasAccessSecret returns a boolean if a field has been set.
func (o *IamCert) HasAccessSecret() bool {
if o != nil && !IsNil(o.AccessSecret) {
return true
}
return false
}
// SetAccessSecret gets a reference to the given string and assigns it to the AccessSecret field.
func (o *IamCert) SetAccessSecret(v string) {
o.AccessSecret = &v
}
// GetAccount returns the Account field value if set, zero value otherwise.
func (o *IamCert) GetAccount() string {
if o == nil || IsNil(o.Account) {
var ret string
return ret
}
return *o.Account
}
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetAccountOk() (*string, bool) {
if o == nil || IsNil(o.Account) {
return nil, false
}
return o.Account, true
}
// HasAccount returns a boolean if a field has been set.
func (o *IamCert) HasAccount() bool {
if o != nil && !IsNil(o.Account) {
return true
}
return false
}
// SetAccount gets a reference to the given string and assigns it to the Account field.
func (o *IamCert) SetAccount(v string) {
o.Account = &v
}
// GetBitSize returns the BitSize field value if set, zero value otherwise.
func (o *IamCert) GetBitSize() int64 {
if o == nil || IsNil(o.BitSize) {
var ret int64
return ret
}
return *o.BitSize
}
// GetBitSizeOk returns a tuple with the BitSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetBitSizeOk() (*int64, bool) {
if o == nil || IsNil(o.BitSize) {
return nil, false
}
return o.BitSize, true
}
// HasBitSize returns a boolean if a field has been set.
func (o *IamCert) HasBitSize() bool {
if o != nil && !IsNil(o.BitSize) {
return true
}
return false
}
// SetBitSize gets a reference to the given int64 and assigns it to the BitSize field.
func (o *IamCert) SetBitSize(v int64) {
o.BitSize = &v
}
// GetCertificate returns the Certificate field value if set, zero value otherwise.
func (o *IamCert) GetCertificate() string {
if o == nil || IsNil(o.Certificate) {
var ret string
return ret
}
return *o.Certificate
}
// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetCertificateOk() (*string, bool) {
if o == nil || IsNil(o.Certificate) {
return nil, false
}
return o.Certificate, true
}
// HasCertificate returns a boolean if a field has been set.
func (o *IamCert) HasCertificate() bool {
if o != nil && !IsNil(o.Certificate) {
return true
}
return false
}
// SetCertificate gets a reference to the given string and assigns it to the Certificate field.
func (o *IamCert) SetCertificate(v string) {
o.Certificate = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *IamCert) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
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 *IamCert) GetCreatedAtOk() (*time.Time, 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 *IamCert) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *IamCert) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *IamCert) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *IamCert) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *IamCert) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetCryptoAlgorithm returns the CryptoAlgorithm field value if set, zero value otherwise.
func (o *IamCert) GetCryptoAlgorithm() string {
if o == nil || IsNil(o.CryptoAlgorithm) {
var ret string
return ret
}
return *o.CryptoAlgorithm
}
// GetCryptoAlgorithmOk returns a tuple with the CryptoAlgorithm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetCryptoAlgorithmOk() (*string, bool) {
if o == nil || IsNil(o.CryptoAlgorithm) {
return nil, false
}
return o.CryptoAlgorithm, true
}
// HasCryptoAlgorithm returns a boolean if a field has been set.
func (o *IamCert) HasCryptoAlgorithm() bool {
if o != nil && !IsNil(o.CryptoAlgorithm) {
return true
}
return false
}
// SetCryptoAlgorithm gets a reference to the given string and assigns it to the CryptoAlgorithm field.
func (o *IamCert) SetCryptoAlgorithm(v string) {
o.CryptoAlgorithm = &v
}
// GetDeleted returns the Deleted field value if set, zero value otherwise.
func (o *IamCert) GetDeleted() bool {
if o == nil || IsNil(o.Deleted) {
var ret bool
return ret
}
return *o.Deleted
}
// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetDeletedOk() (*bool, bool) {
if o == nil || IsNil(o.Deleted) {
return nil, false
}
return o.Deleted, true
}
// HasDeleted returns a boolean if a field has been set.
func (o *IamCert) HasDeleted() bool {
if o != nil && !IsNil(o.Deleted) {
return true
}
return false
}
// SetDeleted gets a reference to the given bool and assigns it to the Deleted field.
func (o *IamCert) SetDeleted(v bool) {
o.Deleted = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *IamCert) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *IamCert) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *IamCert) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetDomainExpireTime returns the DomainExpireTime field value if set, zero value otherwise.
func (o *IamCert) GetDomainExpireTime() string {
if o == nil || IsNil(o.DomainExpireTime) {
var ret string
return ret
}
return *o.DomainExpireTime
}
// GetDomainExpireTimeOk returns a tuple with the DomainExpireTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetDomainExpireTimeOk() (*string, bool) {
if o == nil || IsNil(o.DomainExpireTime) {
return nil, false
}
return o.DomainExpireTime, true
}
// HasDomainExpireTime returns a boolean if a field has been set.
func (o *IamCert) HasDomainExpireTime() bool {
if o != nil && !IsNil(o.DomainExpireTime) {
return true
}
return false
}
// SetDomainExpireTime gets a reference to the given string and assigns it to the DomainExpireTime field.
func (o *IamCert) SetDomainExpireTime(v string) {
o.DomainExpireTime = &v
}
// GetExpireInYears returns the ExpireInYears field value if set, zero value otherwise.
func (o *IamCert) GetExpireInYears() int64 {
if o == nil || IsNil(o.ExpireInYears) {
var ret int64
return ret
}
return *o.ExpireInYears
}
// GetExpireInYearsOk returns a tuple with the ExpireInYears field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetExpireInYearsOk() (*int64, bool) {
if o == nil || IsNil(o.ExpireInYears) {
return nil, false
}
return o.ExpireInYears, true
}
// HasExpireInYears returns a boolean if a field has been set.
func (o *IamCert) HasExpireInYears() bool {
if o != nil && !IsNil(o.ExpireInYears) {
return true
}
return false
}
// SetExpireInYears gets a reference to the given int64 and assigns it to the ExpireInYears field.
func (o *IamCert) SetExpireInYears(v int64) {
o.ExpireInYears = &v
}
// GetExpireTime returns the ExpireTime field value if set, zero value otherwise.
func (o *IamCert) GetExpireTime() string {
if o == nil || IsNil(o.ExpireTime) {
var ret string
return ret
}
return *o.ExpireTime
}
// GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetExpireTimeOk() (*string, bool) {
if o == nil || IsNil(o.ExpireTime) {
return nil, false
}
return o.ExpireTime, true
}
// HasExpireTime returns a boolean if a field has been set.
func (o *IamCert) HasExpireTime() bool {
if o != nil && !IsNil(o.ExpireTime) {
return true
}
return false
}
// SetExpireTime gets a reference to the given string and assigns it to the ExpireTime field.
func (o *IamCert) SetExpireTime(v string) {
o.ExpireTime = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *IamCert) 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 *IamCert) 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 *IamCert) 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 *IamCert) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *IamCert) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *IamCert) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *IamCert) SetName(v string) {
o.Name = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *IamCert) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *IamCert) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *IamCert) SetOwner(v string) {
o.Owner = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *IamCert) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *IamCert) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *IamCert) SetProvider(v string) {
o.Provider = &v
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *IamCert) GetScope() string {
if o == nil || IsNil(o.Scope) {
var ret string
return ret
}
return *o.Scope
}
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetScopeOk() (*string, bool) {
if o == nil || IsNil(o.Scope) {
return nil, false
}
return o.Scope, true
}
// HasScope returns a boolean if a field has been set.
func (o *IamCert) HasScope() bool {
if o != nil && !IsNil(o.Scope) {
return true
}
return false
}
// SetScope gets a reference to the given string and assigns it to the Scope field.
func (o *IamCert) SetScope(v string) {
o.Scope = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *IamCert) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *IamCert) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *IamCert) SetType(v string) {
o.Type = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *IamCert) GetUpdatedAt() time.Time {
if o == nil || IsNil(o.UpdatedAt) {
var ret time.Time
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamCert) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *IamCert) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *IamCert) SetUpdatedAt(v time.Time) {
o.UpdatedAt = &v
}
func (o IamCert) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamCert) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AccessKey) {
toSerialize["accessKey"] = o.AccessKey
}
if !IsNil(o.AccessSecret) {
toSerialize["accessSecret"] = o.AccessSecret
}
if !IsNil(o.Account) {
toSerialize["account"] = o.Account
}
if !IsNil(o.BitSize) {
toSerialize["bitSize"] = o.BitSize
}
if !IsNil(o.Certificate) {
toSerialize["certificate"] = o.Certificate
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.CryptoAlgorithm) {
toSerialize["cryptoAlgorithm"] = o.CryptoAlgorithm
}
if !IsNil(o.Deleted) {
toSerialize["deleted"] = o.Deleted
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.DomainExpireTime) {
toSerialize["domainExpireTime"] = o.DomainExpireTime
}
if !IsNil(o.ExpireInYears) {
toSerialize["expireInYears"] = o.ExpireInYears
}
if !IsNil(o.ExpireTime) {
toSerialize["expireTime"] = o.ExpireTime
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.Scope) {
toSerialize["scope"] = o.Scope
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamCert) UnmarshalJSON(data []byte) (err error) {
varIamCert := _IamCert{}
err = json.Unmarshal(data, &varIamCert)
if err != nil {
return err
}
*o = IamCert(varIamCert)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "accessKey")
delete(additionalProperties, "accessSecret")
delete(additionalProperties, "account")
delete(additionalProperties, "bitSize")
delete(additionalProperties, "certificate")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "createdTime")
delete(additionalProperties, "cryptoAlgorithm")
delete(additionalProperties, "deleted")
delete(additionalProperties, "displayName")
delete(additionalProperties, "domainExpireTime")
delete(additionalProperties, "expireInYears")
delete(additionalProperties, "expireTime")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "owner")
delete(additionalProperties, "provider")
delete(additionalProperties, "scope")
delete(additionalProperties, "type")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamCert struct {
value *IamCert
isSet bool
}
func (v NullableIamCert) Get() *IamCert {
return v.value
}
func (v *NullableIamCert) Set(val *IamCert) {
v.value = val
v.isSet = true
}
func (v NullableIamCert) IsSet() bool {
return v.isSet
}
func (v *NullableIamCert) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamCert(val *IamCert) *NullableIamCert {
return &NullableIamCert{value: val, isSet: true}
}
func (v NullableIamCert) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamCert) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}