From 27baf281bb77aecc7ea02302ea8cd383e126a8dd Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 21 May 2026 13:26:13 +0000 Subject: [PATCH] Generate certificates --- .../model_certificate_usage_item.go | 211 ++++ .../model_certificate_usage_item_test.go | 11 + services/certificates/model_data.go | 978 ++++++++++++++++++ services/certificates/model_data_test.go | 11 + .../model_get_certificate_response.go | 118 ++- services/certificates/model_usage.go | 212 ++++ services/certificates/model_usage_test.go | 11 + services/certificates/oas_commit | 2 +- .../v2api/model_certificate_usage_item.go | 192 ++++ services/certificates/v2api/model_data.go | 686 ++++++++++++ .../v2api/model_get_certificate_response.go | 76 +- services/certificates/v2api/model_usage.go | 192 ++++ 12 files changed, 2697 insertions(+), 3 deletions(-) create mode 100644 services/certificates/model_certificate_usage_item.go create mode 100644 services/certificates/model_certificate_usage_item_test.go create mode 100644 services/certificates/model_data.go create mode 100644 services/certificates/model_data_test.go create mode 100644 services/certificates/model_usage.go create mode 100644 services/certificates/model_usage_test.go create mode 100644 services/certificates/v2api/model_certificate_usage_item.go create mode 100644 services/certificates/v2api/model_data.go create mode 100644 services/certificates/v2api/model_usage.go diff --git a/services/certificates/model_certificate_usage_item.go b/services/certificates/model_certificate_usage_item.go new file mode 100644 index 000000000..1dca7473c --- /dev/null +++ b/services/certificates/model_certificate_usage_item.go @@ -0,0 +1,211 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package certificates + +import ( + "encoding/json" +) + +// checks if the CertificateUsageItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateUsageItem{} + +/* + types and functions for listenerNames +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetListenerNamesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetListenerNamesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetListenerNamesRetType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCertificateUsageItemGetListenerNamesAttributeTypeOk(arg CertificateUsageItemGetListenerNamesAttributeType) (ret CertificateUsageItemGetListenerNamesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCertificateUsageItemGetListenerNamesAttributeType(arg *CertificateUsageItemGetListenerNamesAttributeType, val CertificateUsageItemGetListenerNamesRetType) { + *arg = &val +} + +/* + types and functions for loadBalancerName +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetLoadBalancerNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCertificateUsageItemGetLoadBalancerNameAttributeTypeOk(arg CertificateUsageItemGetLoadBalancerNameAttributeType) (ret CertificateUsageItemGetLoadBalancerNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCertificateUsageItemGetLoadBalancerNameAttributeType(arg *CertificateUsageItemGetLoadBalancerNameAttributeType, val CertificateUsageItemGetLoadBalancerNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetLoadBalancerNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItemGetLoadBalancerNameRetType = string + +// CertificateUsageItem struct for CertificateUsageItem +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificateUsageItem struct { + // A list of listener names on this Load Balancer that are using the certificate. + ListenerNames CertificateUsageItemGetListenerNamesAttributeType `json:"listenerNames,omitempty"` + // The display name of the Load Balancer. + LoadBalancerName CertificateUsageItemGetLoadBalancerNameAttributeType `json:"loadBalancerName,omitempty"` +} + +// NewCertificateUsageItem instantiates a new CertificateUsageItem 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewCertificateUsageItem() *CertificateUsageItem { + this := CertificateUsageItem{} + return &this +} + +// NewCertificateUsageItemWithDefaults instantiates a new CertificateUsageItem 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewCertificateUsageItemWithDefaults() *CertificateUsageItem { + this := CertificateUsageItem{} + return &this +} + +// GetListenerNames returns the ListenerNames field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) GetListenerNames() (res CertificateUsageItemGetListenerNamesRetType) { + res, _ = o.GetListenerNamesOk() + return +} + +// GetListenerNamesOk returns a tuple with the ListenerNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) GetListenerNamesOk() (ret CertificateUsageItemGetListenerNamesRetType, ok bool) { + return getCertificateUsageItemGetListenerNamesAttributeTypeOk(o.ListenerNames) +} + +// HasListenerNames returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) HasListenerNames() bool { + _, ok := o.GetListenerNamesOk() + return ok +} + +// SetListenerNames gets a reference to the given []string and assigns it to the ListenerNames field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) SetListenerNames(v CertificateUsageItemGetListenerNamesRetType) { + setCertificateUsageItemGetListenerNamesAttributeType(&o.ListenerNames, v) +} + +// GetLoadBalancerName returns the LoadBalancerName field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) GetLoadBalancerName() (res CertificateUsageItemGetLoadBalancerNameRetType) { + res, _ = o.GetLoadBalancerNameOk() + return +} + +// GetLoadBalancerNameOk returns a tuple with the LoadBalancerName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) GetLoadBalancerNameOk() (ret CertificateUsageItemGetLoadBalancerNameRetType, ok bool) { + return getCertificateUsageItemGetLoadBalancerNameAttributeTypeOk(o.LoadBalancerName) +} + +// HasLoadBalancerName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) HasLoadBalancerName() bool { + _, ok := o.GetLoadBalancerNameOk() + return ok +} + +// SetLoadBalancerName gets a reference to the given string and assigns it to the LoadBalancerName field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificateUsageItem) SetLoadBalancerName(v CertificateUsageItemGetLoadBalancerNameRetType) { + setCertificateUsageItemGetLoadBalancerNameAttributeType(&o.LoadBalancerName, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o CertificateUsageItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCertificateUsageItemGetListenerNamesAttributeTypeOk(o.ListenerNames); ok { + toSerialize["ListenerNames"] = val + } + if val, ok := getCertificateUsageItemGetLoadBalancerNameAttributeTypeOk(o.LoadBalancerName); ok { + toSerialize["LoadBalancerName"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableCertificateUsageItem struct { + value *CertificateUsageItem + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCertificateUsageItem) Get() *CertificateUsageItem { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCertificateUsageItem) Set(val *CertificateUsageItem) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCertificateUsageItem) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCertificateUsageItem) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableCertificateUsageItem(val *CertificateUsageItem) *NullableCertificateUsageItem { + return &NullableCertificateUsageItem{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCertificateUsageItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCertificateUsageItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_certificate_usage_item_test.go b/services/certificates/model_certificate_usage_item_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_certificate_usage_item_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package certificates diff --git a/services/certificates/model_data.go b/services/certificates/model_data.go new file mode 100644 index 000000000..9674040c4 --- /dev/null +++ b/services/certificates/model_data.go @@ -0,0 +1,978 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package certificates + +import ( + "encoding/json" +) + +// checks if the Data type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Data{} + +/* + types and functions for dnsNames +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetDnsNamesAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetDnsNamesAttributeTypeOk(arg DataGetDnsNamesAttributeType) (ret DataGetDnsNamesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetDnsNamesAttributeType(arg *DataGetDnsNamesAttributeType, val DataGetDnsNamesRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetDnsNamesArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetDnsNamesRetType = string + +/* + types and functions for extendedKeyUsage +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetExtendedKeyUsageAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetExtendedKeyUsageAttributeTypeOk(arg DataGetExtendedKeyUsageAttributeType) (ret DataGetExtendedKeyUsageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetExtendedKeyUsageAttributeType(arg *DataGetExtendedKeyUsageAttributeType, val DataGetExtendedKeyUsageRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetExtendedKeyUsageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetExtendedKeyUsageRetType = string + +/* + types and functions for fingerprintSha1 +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha1AttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetFingerprintSha1AttributeTypeOk(arg DataGetFingerprintSha1AttributeType) (ret DataGetFingerprintSha1RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetFingerprintSha1AttributeType(arg *DataGetFingerprintSha1AttributeType, val DataGetFingerprintSha1RetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha1ArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha1RetType = string + +/* + types and functions for fingerprintSha256 +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha256AttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetFingerprintSha256AttributeTypeOk(arg DataGetFingerprintSha256AttributeType) (ret DataGetFingerprintSha256RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetFingerprintSha256AttributeType(arg *DataGetFingerprintSha256AttributeType, val DataGetFingerprintSha256RetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha256ArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetFingerprintSha256RetType = string + +/* + types and functions for isCa +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsCaAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsCaArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsCaRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDatagetIsCaAttributeTypeOk(arg DatagetIsCaAttributeType) (ret DatagetIsCaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDatagetIsCaAttributeType(arg *DatagetIsCaAttributeType, val DatagetIsCaRetType) { + *arg = &val +} + +/* + types and functions for isSelfSigned +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsSelfSignedAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsSelfSignedArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatagetIsSelfSignedRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDatagetIsSelfSignedAttributeTypeOk(arg DatagetIsSelfSignedAttributeType) (ret DatagetIsSelfSignedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDatagetIsSelfSignedAttributeType(arg *DatagetIsSelfSignedAttributeType, val DatagetIsSelfSignedRetType) { + *arg = &val +} + +/* + types and functions for issuerCn +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetIssuerCnAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetIssuerCnAttributeTypeOk(arg DataGetIssuerCnAttributeType) (ret DataGetIssuerCnRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetIssuerCnAttributeType(arg *DataGetIssuerCnAttributeType, val DataGetIssuerCnRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetIssuerCnArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetIssuerCnRetType = string + +/* + types and functions for keyStrength +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetKeyStrengthAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetKeyStrengthAttributeTypeOk(arg DataGetKeyStrengthAttributeType) (ret DataGetKeyStrengthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetKeyStrengthAttributeType(arg *DataGetKeyStrengthAttributeType, val DataGetKeyStrengthRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetKeyStrengthArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetKeyStrengthRetType = string + +/* + types and functions for notAfter +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotAfterAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetNotAfterAttributeTypeOk(arg DataGetNotAfterAttributeType) (ret DataGetNotAfterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetNotAfterAttributeType(arg *DataGetNotAfterAttributeType, val DataGetNotAfterRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotAfterArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotAfterRetType = string + +/* + types and functions for notBefore +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotBeforeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetNotBeforeAttributeTypeOk(arg DataGetNotBeforeAttributeType) (ret DataGetNotBeforeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetNotBeforeAttributeType(arg *DataGetNotBeforeAttributeType, val DataGetNotBeforeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotBeforeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetNotBeforeRetType = string + +/* + types and functions for organization +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetOrganizationAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetOrganizationAttributeTypeOk(arg DataGetOrganizationAttributeType) (ret DataGetOrganizationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetOrganizationAttributeType(arg *DataGetOrganizationAttributeType, val DataGetOrganizationRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetOrganizationArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetOrganizationRetType = string + +/* + types and functions for publicKeyAlgorithm +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetPublicKeyAlgorithmAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetPublicKeyAlgorithmAttributeTypeOk(arg DataGetPublicKeyAlgorithmAttributeType) (ret DataGetPublicKeyAlgorithmRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetPublicKeyAlgorithmAttributeType(arg *DataGetPublicKeyAlgorithmAttributeType, val DataGetPublicKeyAlgorithmRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetPublicKeyAlgorithmArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetPublicKeyAlgorithmRetType = string + +/* + types and functions for serialNumber +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSerialNumberAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetSerialNumberAttributeTypeOk(arg DataGetSerialNumberAttributeType) (ret DataGetSerialNumberRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetSerialNumberAttributeType(arg *DataGetSerialNumberAttributeType, val DataGetSerialNumberRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSerialNumberArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSerialNumberRetType = string + +/* + types and functions for signatureAlgorithm +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSignatureAlgorithmAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetSignatureAlgorithmAttributeTypeOk(arg DataGetSignatureAlgorithmAttributeType) (ret DataGetSignatureAlgorithmRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetSignatureAlgorithmAttributeType(arg *DataGetSignatureAlgorithmAttributeType, val DataGetSignatureAlgorithmRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSignatureAlgorithmArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSignatureAlgorithmRetType = string + +/* + types and functions for subjectCn +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSubjectCnAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDataGetSubjectCnAttributeTypeOk(arg DataGetSubjectCnAttributeType) (ret DataGetSubjectCnRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDataGetSubjectCnAttributeType(arg *DataGetSubjectCnAttributeType, val DataGetSubjectCnRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSubjectCnArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DataGetSubjectCnRetType = string + +// Data struct for Data +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Data struct { + // Comma-separated list of all domains and IP addresses the certificate is valid for (Subject Alternative Names). + DnsNames DataGetDnsNamesAttributeType `json:"dnsNames,omitempty"` + // Comma-separated list of purposes the cert is valid for. 'Server Auth' is required for Load Balancer use. + ExtendedKeyUsage DataGetExtendedKeyUsageAttributeType `json:"extendedKeyUsage,omitempty"` + // The legacy SHA1 thumbprint. Provided for cross-referencing with older systems and browsers. + FingerprintSha1 DataGetFingerprintSha1AttributeType `json:"fingerprintSha1,omitempty"` + // The unique SHA256 hash of the raw certificate bytes. Use this as the primary unique identifier. + FingerprintSha256 DataGetFingerprintSha256AttributeType `json:"fingerprintSha256,omitempty"` + // Indicates if the certificate is a Certificate Authority, meaning it can sign other certificates. + IsCa DatagetIsCaAttributeType `json:"isCa,omitempty"` + // Indicates if the certificate was signed by its own private key rather than a trusted third-party CA. + IsSelfSigned DatagetIsSelfSignedAttributeType `json:"isSelfSigned,omitempty"` + // The Common Name of the Certificate Authority (CA) that signed and issued the certificate. + IssuerCn DataGetIssuerCnAttributeType `json:"issuerCn,omitempty"` + // Human-readable summary of the public key's algorithm and bit-length or curve name. + KeyStrength DataGetKeyStrengthAttributeType `json:"keyStrength,omitempty"` + // The expiration timestamp. After this date, browsers will show security warnings (RFC3339 format). + NotAfter DataGetNotAfterAttributeType `json:"notAfter,omitempty"` + // The timestamp indicating when the certificate starts being valid (RFC3339 format). + NotBefore DataGetNotBeforeAttributeType `json:"notBefore,omitempty"` + // Organization name associated with the certificate subject. + Organization DataGetOrganizationAttributeType `json:"organization,omitempty"` + // The cryptographic algorithm used to generate the public/private key pair. + PublicKeyAlgorithm DataGetPublicKeyAlgorithmAttributeType `json:"publicKeyAlgorithm,omitempty"` + // The unique serial number assigned by the CA, represented in uppercase hexadecimal format. + SerialNumber DataGetSerialNumberAttributeType `json:"serialNumber,omitempty"` + // The algorithm used by the CA to sign this certificate. + SignatureAlgorithm DataGetSignatureAlgorithmAttributeType `json:"signatureAlgorithm,omitempty"` + // The primary identity of the certificate. Fallback sequence: Common Name -> First DNS Name -> Full Subject String. + SubjectCn DataGetSubjectCnAttributeType `json:"subjectCn,omitempty"` +} + +// NewData instantiates a new Data 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewData() *Data { + this := Data{} + return &this +} + +// NewDataWithDefaults instantiates a new Data 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewDataWithDefaults() *Data { + this := Data{} + return &this +} + +// GetDnsNames returns the DnsNames field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetDnsNames() (res DataGetDnsNamesRetType) { + res, _ = o.GetDnsNamesOk() + return +} + +// GetDnsNamesOk returns a tuple with the DnsNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetDnsNamesOk() (ret DataGetDnsNamesRetType, ok bool) { + return getDataGetDnsNamesAttributeTypeOk(o.DnsNames) +} + +// HasDnsNames returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasDnsNames() bool { + _, ok := o.GetDnsNamesOk() + return ok +} + +// SetDnsNames gets a reference to the given string and assigns it to the DnsNames field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetDnsNames(v DataGetDnsNamesRetType) { + setDataGetDnsNamesAttributeType(&o.DnsNames, v) +} + +// GetExtendedKeyUsage returns the ExtendedKeyUsage field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetExtendedKeyUsage() (res DataGetExtendedKeyUsageRetType) { + res, _ = o.GetExtendedKeyUsageOk() + return +} + +// GetExtendedKeyUsageOk returns a tuple with the ExtendedKeyUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetExtendedKeyUsageOk() (ret DataGetExtendedKeyUsageRetType, ok bool) { + return getDataGetExtendedKeyUsageAttributeTypeOk(o.ExtendedKeyUsage) +} + +// HasExtendedKeyUsage returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasExtendedKeyUsage() bool { + _, ok := o.GetExtendedKeyUsageOk() + return ok +} + +// SetExtendedKeyUsage gets a reference to the given string and assigns it to the ExtendedKeyUsage field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetExtendedKeyUsage(v DataGetExtendedKeyUsageRetType) { + setDataGetExtendedKeyUsageAttributeType(&o.ExtendedKeyUsage, v) +} + +// GetFingerprintSha1 returns the FingerprintSha1 field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetFingerprintSha1() (res DataGetFingerprintSha1RetType) { + res, _ = o.GetFingerprintSha1Ok() + return +} + +// GetFingerprintSha1Ok returns a tuple with the FingerprintSha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetFingerprintSha1Ok() (ret DataGetFingerprintSha1RetType, ok bool) { + return getDataGetFingerprintSha1AttributeTypeOk(o.FingerprintSha1) +} + +// HasFingerprintSha1 returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasFingerprintSha1() bool { + _, ok := o.GetFingerprintSha1Ok() + return ok +} + +// SetFingerprintSha1 gets a reference to the given string and assigns it to the FingerprintSha1 field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetFingerprintSha1(v DataGetFingerprintSha1RetType) { + setDataGetFingerprintSha1AttributeType(&o.FingerprintSha1, v) +} + +// GetFingerprintSha256 returns the FingerprintSha256 field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetFingerprintSha256() (res DataGetFingerprintSha256RetType) { + res, _ = o.GetFingerprintSha256Ok() + return +} + +// GetFingerprintSha256Ok returns a tuple with the FingerprintSha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetFingerprintSha256Ok() (ret DataGetFingerprintSha256RetType, ok bool) { + return getDataGetFingerprintSha256AttributeTypeOk(o.FingerprintSha256) +} + +// HasFingerprintSha256 returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasFingerprintSha256() bool { + _, ok := o.GetFingerprintSha256Ok() + return ok +} + +// SetFingerprintSha256 gets a reference to the given string and assigns it to the FingerprintSha256 field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetFingerprintSha256(v DataGetFingerprintSha256RetType) { + setDataGetFingerprintSha256AttributeType(&o.FingerprintSha256, v) +} + +// GetIsCa returns the IsCa field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIsCa() (res DatagetIsCaRetType) { + res, _ = o.GetIsCaOk() + return +} + +// GetIsCaOk returns a tuple with the IsCa field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIsCaOk() (ret DatagetIsCaRetType, ok bool) { + return getDatagetIsCaAttributeTypeOk(o.IsCa) +} + +// HasIsCa returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasIsCa() bool { + _, ok := o.GetIsCaOk() + return ok +} + +// SetIsCa gets a reference to the given bool and assigns it to the IsCa field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetIsCa(v DatagetIsCaRetType) { + setDatagetIsCaAttributeType(&o.IsCa, v) +} + +// GetIsSelfSigned returns the IsSelfSigned field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIsSelfSigned() (res DatagetIsSelfSignedRetType) { + res, _ = o.GetIsSelfSignedOk() + return +} + +// GetIsSelfSignedOk returns a tuple with the IsSelfSigned field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIsSelfSignedOk() (ret DatagetIsSelfSignedRetType, ok bool) { + return getDatagetIsSelfSignedAttributeTypeOk(o.IsSelfSigned) +} + +// HasIsSelfSigned returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasIsSelfSigned() bool { + _, ok := o.GetIsSelfSignedOk() + return ok +} + +// SetIsSelfSigned gets a reference to the given bool and assigns it to the IsSelfSigned field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetIsSelfSigned(v DatagetIsSelfSignedRetType) { + setDatagetIsSelfSignedAttributeType(&o.IsSelfSigned, v) +} + +// GetIssuerCn returns the IssuerCn field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIssuerCn() (res DataGetIssuerCnRetType) { + res, _ = o.GetIssuerCnOk() + return +} + +// GetIssuerCnOk returns a tuple with the IssuerCn field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetIssuerCnOk() (ret DataGetIssuerCnRetType, ok bool) { + return getDataGetIssuerCnAttributeTypeOk(o.IssuerCn) +} + +// HasIssuerCn returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasIssuerCn() bool { + _, ok := o.GetIssuerCnOk() + return ok +} + +// SetIssuerCn gets a reference to the given string and assigns it to the IssuerCn field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetIssuerCn(v DataGetIssuerCnRetType) { + setDataGetIssuerCnAttributeType(&o.IssuerCn, v) +} + +// GetKeyStrength returns the KeyStrength field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetKeyStrength() (res DataGetKeyStrengthRetType) { + res, _ = o.GetKeyStrengthOk() + return +} + +// GetKeyStrengthOk returns a tuple with the KeyStrength field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetKeyStrengthOk() (ret DataGetKeyStrengthRetType, ok bool) { + return getDataGetKeyStrengthAttributeTypeOk(o.KeyStrength) +} + +// HasKeyStrength returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasKeyStrength() bool { + _, ok := o.GetKeyStrengthOk() + return ok +} + +// SetKeyStrength gets a reference to the given string and assigns it to the KeyStrength field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetKeyStrength(v DataGetKeyStrengthRetType) { + setDataGetKeyStrengthAttributeType(&o.KeyStrength, v) +} + +// GetNotAfter returns the NotAfter field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetNotAfter() (res DataGetNotAfterRetType) { + res, _ = o.GetNotAfterOk() + return +} + +// GetNotAfterOk returns a tuple with the NotAfter field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetNotAfterOk() (ret DataGetNotAfterRetType, ok bool) { + return getDataGetNotAfterAttributeTypeOk(o.NotAfter) +} + +// HasNotAfter returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasNotAfter() bool { + _, ok := o.GetNotAfterOk() + return ok +} + +// SetNotAfter gets a reference to the given string and assigns it to the NotAfter field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetNotAfter(v DataGetNotAfterRetType) { + setDataGetNotAfterAttributeType(&o.NotAfter, v) +} + +// GetNotBefore returns the NotBefore field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetNotBefore() (res DataGetNotBeforeRetType) { + res, _ = o.GetNotBeforeOk() + return +} + +// GetNotBeforeOk returns a tuple with the NotBefore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetNotBeforeOk() (ret DataGetNotBeforeRetType, ok bool) { + return getDataGetNotBeforeAttributeTypeOk(o.NotBefore) +} + +// HasNotBefore returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasNotBefore() bool { + _, ok := o.GetNotBeforeOk() + return ok +} + +// SetNotBefore gets a reference to the given string and assigns it to the NotBefore field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetNotBefore(v DataGetNotBeforeRetType) { + setDataGetNotBeforeAttributeType(&o.NotBefore, v) +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetOrganization() (res DataGetOrganizationRetType) { + res, _ = o.GetOrganizationOk() + return +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetOrganizationOk() (ret DataGetOrganizationRetType, ok bool) { + return getDataGetOrganizationAttributeTypeOk(o.Organization) +} + +// HasOrganization returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasOrganization() bool { + _, ok := o.GetOrganizationOk() + return ok +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetOrganization(v DataGetOrganizationRetType) { + setDataGetOrganizationAttributeType(&o.Organization, v) +} + +// GetPublicKeyAlgorithm returns the PublicKeyAlgorithm field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetPublicKeyAlgorithm() (res DataGetPublicKeyAlgorithmRetType) { + res, _ = o.GetPublicKeyAlgorithmOk() + return +} + +// GetPublicKeyAlgorithmOk returns a tuple with the PublicKeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetPublicKeyAlgorithmOk() (ret DataGetPublicKeyAlgorithmRetType, ok bool) { + return getDataGetPublicKeyAlgorithmAttributeTypeOk(o.PublicKeyAlgorithm) +} + +// HasPublicKeyAlgorithm returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasPublicKeyAlgorithm() bool { + _, ok := o.GetPublicKeyAlgorithmOk() + return ok +} + +// SetPublicKeyAlgorithm gets a reference to the given string and assigns it to the PublicKeyAlgorithm field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetPublicKeyAlgorithm(v DataGetPublicKeyAlgorithmRetType) { + setDataGetPublicKeyAlgorithmAttributeType(&o.PublicKeyAlgorithm, v) +} + +// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSerialNumber() (res DataGetSerialNumberRetType) { + res, _ = o.GetSerialNumberOk() + return +} + +// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSerialNumberOk() (ret DataGetSerialNumberRetType, ok bool) { + return getDataGetSerialNumberAttributeTypeOk(o.SerialNumber) +} + +// HasSerialNumber returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasSerialNumber() bool { + _, ok := o.GetSerialNumberOk() + return ok +} + +// SetSerialNumber gets a reference to the given string and assigns it to the SerialNumber field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetSerialNumber(v DataGetSerialNumberRetType) { + setDataGetSerialNumberAttributeType(&o.SerialNumber, v) +} + +// GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSignatureAlgorithm() (res DataGetSignatureAlgorithmRetType) { + res, _ = o.GetSignatureAlgorithmOk() + return +} + +// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSignatureAlgorithmOk() (ret DataGetSignatureAlgorithmRetType, ok bool) { + return getDataGetSignatureAlgorithmAttributeTypeOk(o.SignatureAlgorithm) +} + +// HasSignatureAlgorithm returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasSignatureAlgorithm() bool { + _, ok := o.GetSignatureAlgorithmOk() + return ok +} + +// SetSignatureAlgorithm gets a reference to the given string and assigns it to the SignatureAlgorithm field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetSignatureAlgorithm(v DataGetSignatureAlgorithmRetType) { + setDataGetSignatureAlgorithmAttributeType(&o.SignatureAlgorithm, v) +} + +// GetSubjectCn returns the SubjectCn field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSubjectCn() (res DataGetSubjectCnRetType) { + res, _ = o.GetSubjectCnOk() + return +} + +// GetSubjectCnOk returns a tuple with the SubjectCn field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) GetSubjectCnOk() (ret DataGetSubjectCnRetType, ok bool) { + return getDataGetSubjectCnAttributeTypeOk(o.SubjectCn) +} + +// HasSubjectCn returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) HasSubjectCn() bool { + _, ok := o.GetSubjectCnOk() + return ok +} + +// SetSubjectCn gets a reference to the given string and assigns it to the SubjectCn field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Data) SetSubjectCn(v DataGetSubjectCnRetType) { + setDataGetSubjectCnAttributeType(&o.SubjectCn, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Data) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getDataGetDnsNamesAttributeTypeOk(o.DnsNames); ok { + toSerialize["DnsNames"] = val + } + if val, ok := getDataGetExtendedKeyUsageAttributeTypeOk(o.ExtendedKeyUsage); ok { + toSerialize["ExtendedKeyUsage"] = val + } + if val, ok := getDataGetFingerprintSha1AttributeTypeOk(o.FingerprintSha1); ok { + toSerialize["FingerprintSha1"] = val + } + if val, ok := getDataGetFingerprintSha256AttributeTypeOk(o.FingerprintSha256); ok { + toSerialize["FingerprintSha256"] = val + } + if val, ok := getDatagetIsCaAttributeTypeOk(o.IsCa); ok { + toSerialize["IsCa"] = val + } + if val, ok := getDatagetIsSelfSignedAttributeTypeOk(o.IsSelfSigned); ok { + toSerialize["IsSelfSigned"] = val + } + if val, ok := getDataGetIssuerCnAttributeTypeOk(o.IssuerCn); ok { + toSerialize["IssuerCn"] = val + } + if val, ok := getDataGetKeyStrengthAttributeTypeOk(o.KeyStrength); ok { + toSerialize["KeyStrength"] = val + } + if val, ok := getDataGetNotAfterAttributeTypeOk(o.NotAfter); ok { + toSerialize["NotAfter"] = val + } + if val, ok := getDataGetNotBeforeAttributeTypeOk(o.NotBefore); ok { + toSerialize["NotBefore"] = val + } + if val, ok := getDataGetOrganizationAttributeTypeOk(o.Organization); ok { + toSerialize["Organization"] = val + } + if val, ok := getDataGetPublicKeyAlgorithmAttributeTypeOk(o.PublicKeyAlgorithm); ok { + toSerialize["PublicKeyAlgorithm"] = val + } + if val, ok := getDataGetSerialNumberAttributeTypeOk(o.SerialNumber); ok { + toSerialize["SerialNumber"] = val + } + if val, ok := getDataGetSignatureAlgorithmAttributeTypeOk(o.SignatureAlgorithm); ok { + toSerialize["SignatureAlgorithm"] = val + } + if val, ok := getDataGetSubjectCnAttributeTypeOk(o.SubjectCn); ok { + toSerialize["SubjectCn"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableData struct { + value *Data + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableData) Get() *Data { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableData) Set(val *Data) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableData) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableData) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableData(val *Data) *NullableData { + return &NullableData{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_data_test.go b/services/certificates/model_data_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_data_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package certificates diff --git a/services/certificates/model_get_certificate_response.go b/services/certificates/model_get_certificate_response.go index 66be3031c..0a442a139 100644 --- a/services/certificates/model_get_certificate_response.go +++ b/services/certificates/model_get_certificate_response.go @@ -18,6 +18,33 @@ import ( // checks if the GetCertificateResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetCertificateResponse{} +/* + types and functions for data +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetDataAttributeType = *Data + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetDataArgType = Data + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetDataRetType = Data + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetCertificateResponseGetDataAttributeTypeOk(arg GetCertificateResponseGetDataAttributeType) (ret GetCertificateResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetCertificateResponseGetDataAttributeType(arg *GetCertificateResponseGetDataAttributeType, val GetCertificateResponseGetDataRetType) { + *arg = &val +} + /* types and functions for id */ @@ -153,19 +180,48 @@ type GetCertificateResponseGetRegionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetCertificateResponseGetRegionRetType = string +/* + types and functions for usage +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetUsageAttributeType = *Usage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetUsageArgType = Usage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCertificateResponseGetUsageRetType = Usage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetCertificateResponseGetUsageAttributeTypeOk(arg GetCertificateResponseGetUsageAttributeType) (ret GetCertificateResponseGetUsageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetCertificateResponseGetUsageAttributeType(arg *GetCertificateResponseGetUsageAttributeType, val GetCertificateResponseGetUsageRetType) { + *arg = &val +} + // GetCertificateResponse GetCertificateResponse returns name, id and public key // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetCertificateResponse struct { + Data GetCertificateResponseGetDataAttributeType `json:"data,omitempty"` // The certificates resource id Id GetCertificateResponseGetIdAttributeType `json:"id,omitempty"` // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Labels GetCertificateResponseGetLabelsAttributeType `json:"labels,omitempty"` - // TLS certificate name + // Certificate display name Name GetCertificateResponseGetNameAttributeType `json:"name,omitempty"` // The PEM encoded public key part PublicKey GetCertificateResponseGetPublicKeyAttributeType `json:"publicKey,omitempty"` // Region of the LoadBalancer Region GetCertificateResponseGetRegionAttributeType `json:"region,omitempty"` + Usage GetCertificateResponseGetUsageAttributeType `json:"usage,omitempty"` } // NewGetCertificateResponse instantiates a new GetCertificateResponse object @@ -187,6 +243,33 @@ func NewGetCertificateResponseWithDefaults() *GetCertificateResponse { return &this } +// GetData returns the Data field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) GetData() (res GetCertificateResponseGetDataRetType) { + res, _ = o.GetDataOk() + return +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) GetDataOk() (ret GetCertificateResponseGetDataRetType, ok bool) { + return getGetCertificateResponseGetDataAttributeTypeOk(o.Data) +} + +// HasData returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) HasData() bool { + _, ok := o.GetDataOk() + return ok +} + +// SetData gets a reference to the given Data and assigns it to the Data field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) SetData(v GetCertificateResponseGetDataRetType) { + setGetCertificateResponseGetDataAttributeType(&o.Data, v) +} + // GetId returns the Id field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetCertificateResponse) GetId() (res GetCertificateResponseGetIdRetType) { @@ -322,9 +405,39 @@ func (o *GetCertificateResponse) SetRegion(v GetCertificateResponseGetRegionRetT setGetCertificateResponseGetRegionAttributeType(&o.Region, v) } +// GetUsage returns the Usage field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) GetUsage() (res GetCertificateResponseGetUsageRetType) { + res, _ = o.GetUsageOk() + return +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) GetUsageOk() (ret GetCertificateResponseGetUsageRetType, ok bool) { + return getGetCertificateResponseGetUsageAttributeTypeOk(o.Usage) +} + +// HasUsage returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) HasUsage() bool { + _, ok := o.GetUsageOk() + return ok +} + +// SetUsage gets a reference to the given Usage and assigns it to the Usage field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCertificateResponse) SetUsage(v GetCertificateResponseGetUsageRetType) { + setGetCertificateResponseGetUsageAttributeType(&o.Usage, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getGetCertificateResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } if val, ok := getGetCertificateResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } @@ -340,6 +453,9 @@ func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { if val, ok := getGetCertificateResponseGetRegionAttributeTypeOk(o.Region); ok { toSerialize["Region"] = val } + if val, ok := getGetCertificateResponseGetUsageAttributeTypeOk(o.Usage); ok { + toSerialize["Usage"] = val + } return toSerialize, nil } diff --git a/services/certificates/model_usage.go b/services/certificates/model_usage.go new file mode 100644 index 000000000..b3fb2dde7 --- /dev/null +++ b/services/certificates/model_usage.go @@ -0,0 +1,212 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package certificates + +import ( + "encoding/json" +) + +// checks if the Usage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Usage{} + +/* + types and functions for count +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetCountRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUsageGetCountAttributeTypeOk(arg UsageGetCountAttributeType) (ret UsageGetCountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUsageGetCountAttributeType(arg *UsageGetCountAttributeType, val UsageGetCountRetType) { + *arg = &val +} + +/* + types and functions for items +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetItemsAttributeType = *[]CertificateUsageItem + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetItemsArgType = []CertificateUsageItem + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UsageGetItemsRetType = []CertificateUsageItem + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUsageGetItemsAttributeTypeOk(arg UsageGetItemsAttributeType) (ret UsageGetItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUsageGetItemsAttributeType(arg *UsageGetItemsAttributeType, val UsageGetItemsRetType) { + *arg = &val +} + +// Usage struct for Usage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Usage struct { + // Number of Load Balancers using this certificate. + // Can be cast to int32 without loss of precision. + Count UsageGetCountAttributeType `json:"count,omitempty"` + // List of Load Balancers with their associated listeners that use this certificate. + Items UsageGetItemsAttributeType `json:"items,omitempty"` +} + +// NewUsage instantiates a new Usage 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewUsage() *Usage { + this := Usage{} + return &this +} + +// NewUsageWithDefaults instantiates a new Usage 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewUsageWithDefaults() *Usage { + this := Usage{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) GetCount() (res UsageGetCountRetType) { + res, _ = o.GetCountOk() + return +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) GetCountOk() (ret UsageGetCountRetType, ok bool) { + return getUsageGetCountAttributeTypeOk(o.Count) +} + +// HasCount returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) HasCount() bool { + _, ok := o.GetCountOk() + return ok +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) SetCount(v UsageGetCountRetType) { + setUsageGetCountAttributeType(&o.Count, v) +} + +// GetItems returns the Items field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) GetItems() (res UsageGetItemsRetType) { + res, _ = o.GetItemsOk() + return +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) GetItemsOk() (ret UsageGetItemsRetType, ok bool) { + return getUsageGetItemsAttributeTypeOk(o.Items) +} + +// HasItems returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) HasItems() bool { + _, ok := o.GetItemsOk() + return ok +} + +// SetItems gets a reference to the given []CertificateUsageItem and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Usage) SetItems(v UsageGetItemsRetType) { + setUsageGetItemsAttributeType(&o.Items, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Usage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUsageGetCountAttributeTypeOk(o.Count); ok { + toSerialize["Count"] = val + } + if val, ok := getUsageGetItemsAttributeTypeOk(o.Items); ok { + toSerialize["Items"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableUsage struct { + value *Usage + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableUsage) Get() *Usage { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableUsage) Set(val *Usage) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableUsage) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableUsage) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableUsage(val *Usage) *NullableUsage { + return &NullableUsage{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableUsage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableUsage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_usage_test.go b/services/certificates/model_usage_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_usage_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package certificates diff --git a/services/certificates/oas_commit b/services/certificates/oas_commit index c28413233..3bdcef578 100644 --- a/services/certificates/oas_commit +++ b/services/certificates/oas_commit @@ -1 +1 @@ -38bda0623427b072839b307494cc6fbd44486cc5 +5e44a8a3aa0447f4f0511f53cc4eead9b6e6384e diff --git a/services/certificates/v2api/model_certificate_usage_item.go b/services/certificates/v2api/model_certificate_usage_item.go new file mode 100644 index 000000000..ac843c394 --- /dev/null +++ b/services/certificates/v2api/model_certificate_usage_item.go @@ -0,0 +1,192 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CertificateUsageItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateUsageItem{} + +// CertificateUsageItem struct for CertificateUsageItem +type CertificateUsageItem struct { + // A list of listener names on this Load Balancer that are using the certificate. + ListenerNames []string `json:"listenerNames,omitempty"` + // The display name of the Load Balancer. + LoadBalancerName *string `json:"loadBalancerName,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CertificateUsageItem CertificateUsageItem + +// NewCertificateUsageItem instantiates a new CertificateUsageItem 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 NewCertificateUsageItem() *CertificateUsageItem { + this := CertificateUsageItem{} + return &this +} + +// NewCertificateUsageItemWithDefaults instantiates a new CertificateUsageItem 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 NewCertificateUsageItemWithDefaults() *CertificateUsageItem { + this := CertificateUsageItem{} + return &this +} + +// GetListenerNames returns the ListenerNames field value if set, zero value otherwise. +func (o *CertificateUsageItem) GetListenerNames() []string { + if o == nil || IsNil(o.ListenerNames) { + var ret []string + return ret + } + return o.ListenerNames +} + +// GetListenerNamesOk returns a tuple with the ListenerNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateUsageItem) GetListenerNamesOk() ([]string, bool) { + if o == nil || IsNil(o.ListenerNames) { + return nil, false + } + return o.ListenerNames, true +} + +// HasListenerNames returns a boolean if a field has been set. +func (o *CertificateUsageItem) HasListenerNames() bool { + if o != nil && !IsNil(o.ListenerNames) { + return true + } + + return false +} + +// SetListenerNames gets a reference to the given []string and assigns it to the ListenerNames field. +func (o *CertificateUsageItem) SetListenerNames(v []string) { + o.ListenerNames = v +} + +// GetLoadBalancerName returns the LoadBalancerName field value if set, zero value otherwise. +func (o *CertificateUsageItem) GetLoadBalancerName() string { + if o == nil || IsNil(o.LoadBalancerName) { + var ret string + return ret + } + return *o.LoadBalancerName +} + +// GetLoadBalancerNameOk returns a tuple with the LoadBalancerName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateUsageItem) GetLoadBalancerNameOk() (*string, bool) { + if o == nil || IsNil(o.LoadBalancerName) { + return nil, false + } + return o.LoadBalancerName, true +} + +// HasLoadBalancerName returns a boolean if a field has been set. +func (o *CertificateUsageItem) HasLoadBalancerName() bool { + if o != nil && !IsNil(o.LoadBalancerName) { + return true + } + + return false +} + +// SetLoadBalancerName gets a reference to the given string and assigns it to the LoadBalancerName field. +func (o *CertificateUsageItem) SetLoadBalancerName(v string) { + o.LoadBalancerName = &v +} + +func (o CertificateUsageItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateUsageItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ListenerNames) { + toSerialize["listenerNames"] = o.ListenerNames + } + if !IsNil(o.LoadBalancerName) { + toSerialize["loadBalancerName"] = o.LoadBalancerName + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertificateUsageItem) UnmarshalJSON(data []byte) (err error) { + varCertificateUsageItem := _CertificateUsageItem{} + + err = json.Unmarshal(data, &varCertificateUsageItem) + + if err != nil { + return err + } + + *o = CertificateUsageItem(varCertificateUsageItem) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "listenerNames") + delete(additionalProperties, "loadBalancerName") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertificateUsageItem struct { + value *CertificateUsageItem + isSet bool +} + +func (v NullableCertificateUsageItem) Get() *CertificateUsageItem { + return v.value +} + +func (v *NullableCertificateUsageItem) Set(val *CertificateUsageItem) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateUsageItem) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateUsageItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateUsageItem(val *CertificateUsageItem) *NullableCertificateUsageItem { + return &NullableCertificateUsageItem{value: val, isSet: true} +} + +func (v NullableCertificateUsageItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateUsageItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/v2api/model_data.go b/services/certificates/v2api/model_data.go new file mode 100644 index 000000000..8aea30572 --- /dev/null +++ b/services/certificates/v2api/model_data.go @@ -0,0 +1,686 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Data type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Data{} + +// Data struct for Data +type Data struct { + // Comma-separated list of all domains and IP addresses the certificate is valid for (Subject Alternative Names). + DnsNames *string `json:"dnsNames,omitempty"` + // Comma-separated list of purposes the cert is valid for. 'Server Auth' is required for Load Balancer use. + ExtendedKeyUsage *string `json:"extendedKeyUsage,omitempty"` + // The legacy SHA1 thumbprint. Provided for cross-referencing with older systems and browsers. + FingerprintSha1 *string `json:"fingerprintSha1,omitempty" validate:"regexp=^[a-fA-F0-9]{40}$"` + // The unique SHA256 hash of the raw certificate bytes. Use this as the primary unique identifier. + FingerprintSha256 *string `json:"fingerprintSha256,omitempty" validate:"regexp=^[a-fA-F0-9]{64}$"` + // Indicates if the certificate is a Certificate Authority, meaning it can sign other certificates. + IsCa *bool `json:"isCa,omitempty"` + // Indicates if the certificate was signed by its own private key rather than a trusted third-party CA. + IsSelfSigned *bool `json:"isSelfSigned,omitempty"` + // The Common Name of the Certificate Authority (CA) that signed and issued the certificate. + IssuerCn *string `json:"issuerCn,omitempty"` + // Human-readable summary of the public key's algorithm and bit-length or curve name. + KeyStrength *string `json:"keyStrength,omitempty"` + // The expiration timestamp. After this date, browsers will show security warnings (RFC3339 format). + NotAfter *string `json:"notAfter,omitempty"` + // The timestamp indicating when the certificate starts being valid (RFC3339 format). + NotBefore *string `json:"notBefore,omitempty"` + // Organization name associated with the certificate subject. + Organization *string `json:"organization,omitempty"` + // The cryptographic algorithm used to generate the public/private key pair. + PublicKeyAlgorithm *string `json:"publicKeyAlgorithm,omitempty"` + // The unique serial number assigned by the CA, represented in uppercase hexadecimal format. + SerialNumber *string `json:"serialNumber,omitempty"` + // The algorithm used by the CA to sign this certificate. + SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty"` + // The primary identity of the certificate. Fallback sequence: Common Name -> First DNS Name -> Full Subject String. + SubjectCn *string `json:"subjectCn,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Data Data + +// NewData instantiates a new Data 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 NewData() *Data { + this := Data{} + return &this +} + +// NewDataWithDefaults instantiates a new Data 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 NewDataWithDefaults() *Data { + this := Data{} + return &this +} + +// GetDnsNames returns the DnsNames field value if set, zero value otherwise. +func (o *Data) GetDnsNames() string { + if o == nil || IsNil(o.DnsNames) { + var ret string + return ret + } + return *o.DnsNames +} + +// GetDnsNamesOk returns a tuple with the DnsNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetDnsNamesOk() (*string, bool) { + if o == nil || IsNil(o.DnsNames) { + return nil, false + } + return o.DnsNames, true +} + +// HasDnsNames returns a boolean if a field has been set. +func (o *Data) HasDnsNames() bool { + if o != nil && !IsNil(o.DnsNames) { + return true + } + + return false +} + +// SetDnsNames gets a reference to the given string and assigns it to the DnsNames field. +func (o *Data) SetDnsNames(v string) { + o.DnsNames = &v +} + +// GetExtendedKeyUsage returns the ExtendedKeyUsage field value if set, zero value otherwise. +func (o *Data) GetExtendedKeyUsage() string { + if o == nil || IsNil(o.ExtendedKeyUsage) { + var ret string + return ret + } + return *o.ExtendedKeyUsage +} + +// GetExtendedKeyUsageOk returns a tuple with the ExtendedKeyUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetExtendedKeyUsageOk() (*string, bool) { + if o == nil || IsNil(o.ExtendedKeyUsage) { + return nil, false + } + return o.ExtendedKeyUsage, true +} + +// HasExtendedKeyUsage returns a boolean if a field has been set. +func (o *Data) HasExtendedKeyUsage() bool { + if o != nil && !IsNil(o.ExtendedKeyUsage) { + return true + } + + return false +} + +// SetExtendedKeyUsage gets a reference to the given string and assigns it to the ExtendedKeyUsage field. +func (o *Data) SetExtendedKeyUsage(v string) { + o.ExtendedKeyUsage = &v +} + +// GetFingerprintSha1 returns the FingerprintSha1 field value if set, zero value otherwise. +func (o *Data) GetFingerprintSha1() string { + if o == nil || IsNil(o.FingerprintSha1) { + var ret string + return ret + } + return *o.FingerprintSha1 +} + +// GetFingerprintSha1Ok returns a tuple with the FingerprintSha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetFingerprintSha1Ok() (*string, bool) { + if o == nil || IsNil(o.FingerprintSha1) { + return nil, false + } + return o.FingerprintSha1, true +} + +// HasFingerprintSha1 returns a boolean if a field has been set. +func (o *Data) HasFingerprintSha1() bool { + if o != nil && !IsNil(o.FingerprintSha1) { + return true + } + + return false +} + +// SetFingerprintSha1 gets a reference to the given string and assigns it to the FingerprintSha1 field. +func (o *Data) SetFingerprintSha1(v string) { + o.FingerprintSha1 = &v +} + +// GetFingerprintSha256 returns the FingerprintSha256 field value if set, zero value otherwise. +func (o *Data) GetFingerprintSha256() string { + if o == nil || IsNil(o.FingerprintSha256) { + var ret string + return ret + } + return *o.FingerprintSha256 +} + +// GetFingerprintSha256Ok returns a tuple with the FingerprintSha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetFingerprintSha256Ok() (*string, bool) { + if o == nil || IsNil(o.FingerprintSha256) { + return nil, false + } + return o.FingerprintSha256, true +} + +// HasFingerprintSha256 returns a boolean if a field has been set. +func (o *Data) HasFingerprintSha256() bool { + if o != nil && !IsNil(o.FingerprintSha256) { + return true + } + + return false +} + +// SetFingerprintSha256 gets a reference to the given string and assigns it to the FingerprintSha256 field. +func (o *Data) SetFingerprintSha256(v string) { + o.FingerprintSha256 = &v +} + +// GetIsCa returns the IsCa field value if set, zero value otherwise. +func (o *Data) GetIsCa() bool { + if o == nil || IsNil(o.IsCa) { + var ret bool + return ret + } + return *o.IsCa +} + +// GetIsCaOk returns a tuple with the IsCa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetIsCaOk() (*bool, bool) { + if o == nil || IsNil(o.IsCa) { + return nil, false + } + return o.IsCa, true +} + +// HasIsCa returns a boolean if a field has been set. +func (o *Data) HasIsCa() bool { + if o != nil && !IsNil(o.IsCa) { + return true + } + + return false +} + +// SetIsCa gets a reference to the given bool and assigns it to the IsCa field. +func (o *Data) SetIsCa(v bool) { + o.IsCa = &v +} + +// GetIsSelfSigned returns the IsSelfSigned field value if set, zero value otherwise. +func (o *Data) GetIsSelfSigned() bool { + if o == nil || IsNil(o.IsSelfSigned) { + var ret bool + return ret + } + return *o.IsSelfSigned +} + +// GetIsSelfSignedOk returns a tuple with the IsSelfSigned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetIsSelfSignedOk() (*bool, bool) { + if o == nil || IsNil(o.IsSelfSigned) { + return nil, false + } + return o.IsSelfSigned, true +} + +// HasIsSelfSigned returns a boolean if a field has been set. +func (o *Data) HasIsSelfSigned() bool { + if o != nil && !IsNil(o.IsSelfSigned) { + return true + } + + return false +} + +// SetIsSelfSigned gets a reference to the given bool and assigns it to the IsSelfSigned field. +func (o *Data) SetIsSelfSigned(v bool) { + o.IsSelfSigned = &v +} + +// GetIssuerCn returns the IssuerCn field value if set, zero value otherwise. +func (o *Data) GetIssuerCn() string { + if o == nil || IsNil(o.IssuerCn) { + var ret string + return ret + } + return *o.IssuerCn +} + +// GetIssuerCnOk returns a tuple with the IssuerCn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetIssuerCnOk() (*string, bool) { + if o == nil || IsNil(o.IssuerCn) { + return nil, false + } + return o.IssuerCn, true +} + +// HasIssuerCn returns a boolean if a field has been set. +func (o *Data) HasIssuerCn() bool { + if o != nil && !IsNil(o.IssuerCn) { + return true + } + + return false +} + +// SetIssuerCn gets a reference to the given string and assigns it to the IssuerCn field. +func (o *Data) SetIssuerCn(v string) { + o.IssuerCn = &v +} + +// GetKeyStrength returns the KeyStrength field value if set, zero value otherwise. +func (o *Data) GetKeyStrength() string { + if o == nil || IsNil(o.KeyStrength) { + var ret string + return ret + } + return *o.KeyStrength +} + +// GetKeyStrengthOk returns a tuple with the KeyStrength field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetKeyStrengthOk() (*string, bool) { + if o == nil || IsNil(o.KeyStrength) { + return nil, false + } + return o.KeyStrength, true +} + +// HasKeyStrength returns a boolean if a field has been set. +func (o *Data) HasKeyStrength() bool { + if o != nil && !IsNil(o.KeyStrength) { + return true + } + + return false +} + +// SetKeyStrength gets a reference to the given string and assigns it to the KeyStrength field. +func (o *Data) SetKeyStrength(v string) { + o.KeyStrength = &v +} + +// GetNotAfter returns the NotAfter field value if set, zero value otherwise. +func (o *Data) GetNotAfter() string { + if o == nil || IsNil(o.NotAfter) { + var ret string + return ret + } + return *o.NotAfter +} + +// GetNotAfterOk returns a tuple with the NotAfter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetNotAfterOk() (*string, bool) { + if o == nil || IsNil(o.NotAfter) { + return nil, false + } + return o.NotAfter, true +} + +// HasNotAfter returns a boolean if a field has been set. +func (o *Data) HasNotAfter() bool { + if o != nil && !IsNil(o.NotAfter) { + return true + } + + return false +} + +// SetNotAfter gets a reference to the given string and assigns it to the NotAfter field. +func (o *Data) SetNotAfter(v string) { + o.NotAfter = &v +} + +// GetNotBefore returns the NotBefore field value if set, zero value otherwise. +func (o *Data) GetNotBefore() string { + if o == nil || IsNil(o.NotBefore) { + var ret string + return ret + } + return *o.NotBefore +} + +// GetNotBeforeOk returns a tuple with the NotBefore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetNotBeforeOk() (*string, bool) { + if o == nil || IsNil(o.NotBefore) { + return nil, false + } + return o.NotBefore, true +} + +// HasNotBefore returns a boolean if a field has been set. +func (o *Data) HasNotBefore() bool { + if o != nil && !IsNil(o.NotBefore) { + return true + } + + return false +} + +// SetNotBefore gets a reference to the given string and assigns it to the NotBefore field. +func (o *Data) SetNotBefore(v string) { + o.NotBefore = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *Data) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *Data) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *Data) SetOrganization(v string) { + o.Organization = &v +} + +// GetPublicKeyAlgorithm returns the PublicKeyAlgorithm field value if set, zero value otherwise. +func (o *Data) GetPublicKeyAlgorithm() string { + if o == nil || IsNil(o.PublicKeyAlgorithm) { + var ret string + return ret + } + return *o.PublicKeyAlgorithm +} + +// GetPublicKeyAlgorithmOk returns a tuple with the PublicKeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetPublicKeyAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.PublicKeyAlgorithm) { + return nil, false + } + return o.PublicKeyAlgorithm, true +} + +// HasPublicKeyAlgorithm returns a boolean if a field has been set. +func (o *Data) HasPublicKeyAlgorithm() bool { + if o != nil && !IsNil(o.PublicKeyAlgorithm) { + return true + } + + return false +} + +// SetPublicKeyAlgorithm gets a reference to the given string and assigns it to the PublicKeyAlgorithm field. +func (o *Data) SetPublicKeyAlgorithm(v string) { + o.PublicKeyAlgorithm = &v +} + +// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise. +func (o *Data) GetSerialNumber() string { + if o == nil || IsNil(o.SerialNumber) { + var ret string + return ret + } + return *o.SerialNumber +} + +// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetSerialNumberOk() (*string, bool) { + if o == nil || IsNil(o.SerialNumber) { + return nil, false + } + return o.SerialNumber, true +} + +// HasSerialNumber returns a boolean if a field has been set. +func (o *Data) HasSerialNumber() bool { + if o != nil && !IsNil(o.SerialNumber) { + return true + } + + return false +} + +// SetSerialNumber gets a reference to the given string and assigns it to the SerialNumber field. +func (o *Data) SetSerialNumber(v string) { + o.SerialNumber = &v +} + +// GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise. +func (o *Data) GetSignatureAlgorithm() string { + if o == nil || IsNil(o.SignatureAlgorithm) { + var ret string + return ret + } + return *o.SignatureAlgorithm +} + +// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetSignatureAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.SignatureAlgorithm) { + return nil, false + } + return o.SignatureAlgorithm, true +} + +// HasSignatureAlgorithm returns a boolean if a field has been set. +func (o *Data) HasSignatureAlgorithm() bool { + if o != nil && !IsNil(o.SignatureAlgorithm) { + return true + } + + return false +} + +// SetSignatureAlgorithm gets a reference to the given string and assigns it to the SignatureAlgorithm field. +func (o *Data) SetSignatureAlgorithm(v string) { + o.SignatureAlgorithm = &v +} + +// GetSubjectCn returns the SubjectCn field value if set, zero value otherwise. +func (o *Data) GetSubjectCn() string { + if o == nil || IsNil(o.SubjectCn) { + var ret string + return ret + } + return *o.SubjectCn +} + +// GetSubjectCnOk returns a tuple with the SubjectCn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Data) GetSubjectCnOk() (*string, bool) { + if o == nil || IsNil(o.SubjectCn) { + return nil, false + } + return o.SubjectCn, true +} + +// HasSubjectCn returns a boolean if a field has been set. +func (o *Data) HasSubjectCn() bool { + if o != nil && !IsNil(o.SubjectCn) { + return true + } + + return false +} + +// SetSubjectCn gets a reference to the given string and assigns it to the SubjectCn field. +func (o *Data) SetSubjectCn(v string) { + o.SubjectCn = &v +} + +func (o Data) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Data) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DnsNames) { + toSerialize["dnsNames"] = o.DnsNames + } + if !IsNil(o.ExtendedKeyUsage) { + toSerialize["extendedKeyUsage"] = o.ExtendedKeyUsage + } + if !IsNil(o.FingerprintSha1) { + toSerialize["fingerprintSha1"] = o.FingerprintSha1 + } + if !IsNil(o.FingerprintSha256) { + toSerialize["fingerprintSha256"] = o.FingerprintSha256 + } + if !IsNil(o.IsCa) { + toSerialize["isCa"] = o.IsCa + } + if !IsNil(o.IsSelfSigned) { + toSerialize["isSelfSigned"] = o.IsSelfSigned + } + if !IsNil(o.IssuerCn) { + toSerialize["issuerCn"] = o.IssuerCn + } + if !IsNil(o.KeyStrength) { + toSerialize["keyStrength"] = o.KeyStrength + } + if !IsNil(o.NotAfter) { + toSerialize["notAfter"] = o.NotAfter + } + if !IsNil(o.NotBefore) { + toSerialize["notBefore"] = o.NotBefore + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.PublicKeyAlgorithm) { + toSerialize["publicKeyAlgorithm"] = o.PublicKeyAlgorithm + } + if !IsNil(o.SerialNumber) { + toSerialize["serialNumber"] = o.SerialNumber + } + if !IsNil(o.SignatureAlgorithm) { + toSerialize["signatureAlgorithm"] = o.SignatureAlgorithm + } + if !IsNil(o.SubjectCn) { + toSerialize["subjectCn"] = o.SubjectCn + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Data) UnmarshalJSON(data []byte) (err error) { + varData := _Data{} + + err = json.Unmarshal(data, &varData) + + if err != nil { + return err + } + + *o = Data(varData) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dnsNames") + delete(additionalProperties, "extendedKeyUsage") + delete(additionalProperties, "fingerprintSha1") + delete(additionalProperties, "fingerprintSha256") + delete(additionalProperties, "isCa") + delete(additionalProperties, "isSelfSigned") + delete(additionalProperties, "issuerCn") + delete(additionalProperties, "keyStrength") + delete(additionalProperties, "notAfter") + delete(additionalProperties, "notBefore") + delete(additionalProperties, "organization") + delete(additionalProperties, "publicKeyAlgorithm") + delete(additionalProperties, "serialNumber") + delete(additionalProperties, "signatureAlgorithm") + delete(additionalProperties, "subjectCn") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableData struct { + value *Data + isSet bool +} + +func (v NullableData) Get() *Data { + return v.value +} + +func (v *NullableData) Set(val *Data) { + v.value = val + v.isSet = true +} + +func (v NullableData) IsSet() bool { + return v.isSet +} + +func (v *NullableData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableData(val *Data) *NullableData { + return &NullableData{value: val, isSet: true} +} + +func (v NullableData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/v2api/model_get_certificate_response.go b/services/certificates/v2api/model_get_certificate_response.go index 3e0f3cd49..d93304501 100644 --- a/services/certificates/v2api/model_get_certificate_response.go +++ b/services/certificates/v2api/model_get_certificate_response.go @@ -19,16 +19,18 @@ var _ MappedNullable = &GetCertificateResponse{} // GetCertificateResponse GetCertificateResponse returns name, id and public key type GetCertificateResponse struct { + Data *Data `json:"data,omitempty"` // The certificates resource id Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Labels *map[string]string `json:"labels,omitempty"` - // TLS certificate name + // Certificate display name Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` // The PEM encoded public key part PublicKey *string `json:"publicKey,omitempty"` // Region of the LoadBalancer Region *string `json:"region,omitempty"` + Usage *Usage `json:"usage,omitempty"` AdditionalProperties map[string]interface{} } @@ -51,6 +53,38 @@ func NewGetCertificateResponseWithDefaults() *GetCertificateResponse { return &this } +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetCertificateResponse) GetData() Data { + if o == nil || IsNil(o.Data) { + var ret Data + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCertificateResponse) GetDataOk() (*Data, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetCertificateResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Data and assigns it to the Data field. +func (o *GetCertificateResponse) SetData(v Data) { + o.Data = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *GetCertificateResponse) GetId() string { if o == nil || IsNil(o.Id) { @@ -211,6 +245,38 @@ func (o *GetCertificateResponse) SetRegion(v string) { o.Region = &v } +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *GetCertificateResponse) GetUsage() Usage { + if o == nil || IsNil(o.Usage) { + var ret Usage + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCertificateResponse) GetUsageOk() (*Usage, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *GetCertificateResponse) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given Usage and assigns it to the Usage field. +func (o *GetCertificateResponse) SetUsage(v Usage) { + o.Usage = &v +} + func (o GetCertificateResponse) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -221,6 +287,9 @@ func (o GetCertificateResponse) MarshalJSON() ([]byte, error) { func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -236,6 +305,9 @@ func (o GetCertificateResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Region) { toSerialize["region"] = o.Region } + if !IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -258,11 +330,13 @@ func (o *GetCertificateResponse) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "data") delete(additionalProperties, "id") delete(additionalProperties, "labels") delete(additionalProperties, "name") delete(additionalProperties, "publicKey") delete(additionalProperties, "region") + delete(additionalProperties, "usage") o.AdditionalProperties = additionalProperties } diff --git a/services/certificates/v2api/model_usage.go b/services/certificates/v2api/model_usage.go new file mode 100644 index 000000000..9d46effc4 --- /dev/null +++ b/services/certificates/v2api/model_usage.go @@ -0,0 +1,192 @@ +/* +STACKIT Application Load Balancer Certificates API + +This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server. + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Usage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Usage{} + +// Usage struct for Usage +type Usage struct { + // Number of Load Balancers using this certificate. + Count *int32 `json:"count,omitempty"` + // List of Load Balancers with their associated listeners that use this certificate. + Items []CertificateUsageItem `json:"items,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Usage Usage + +// NewUsage instantiates a new Usage 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 NewUsage() *Usage { + this := Usage{} + return &this +} + +// NewUsageWithDefaults instantiates a new Usage 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 NewUsageWithDefaults() *Usage { + this := Usage{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Usage) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Usage) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Usage) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *Usage) SetCount(v int32) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *Usage) GetItems() []CertificateUsageItem { + if o == nil || IsNil(o.Items) { + var ret []CertificateUsageItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Usage) GetItemsOk() ([]CertificateUsageItem, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *Usage) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []CertificateUsageItem and assigns it to the Items field. +func (o *Usage) SetItems(v []CertificateUsageItem) { + o.Items = v +} + +func (o Usage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Usage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Usage) UnmarshalJSON(data []byte) (err error) { + varUsage := _Usage{} + + err = json.Unmarshal(data, &varUsage) + + if err != nil { + return err + } + + *o = Usage(varUsage) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "items") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUsage struct { + value *Usage + isSet bool +} + +func (v NullableUsage) Get() *Usage { + return v.value +} + +func (v *NullableUsage) Set(val *Usage) { + v.value = val + v.isSet = true +} + +func (v NullableUsage) IsSet() bool { + return v.isSet +} + +func (v *NullableUsage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsage(val *Usage) *NullableUsage { + return &NullableUsage{value: val, isSet: true} +} + +func (v NullableUsage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}