diff --git a/CHANGELOG.md b/CHANGELOG.md index b9bf04520..c736b506e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,13 @@ - [v1.13.0](services/cdn/CHANGELOG.md#v1130) - **Bugfix:** Disable strict decoding of API responses - **Feature:** Add `AdditionalProperties` fields to model structs -- `certificates`: [v1.4.1](services/certificates/CHANGELOG.md#v141) - - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` +- `certificates`: + - [v1.4.1](services/certificates/CHANGELOG.md#v141) + - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` + - [v1.5.0](services/certificates/CHANGELOG.md#v150) + - **Feature:** Add new method `GetQuota` to get the quota for TLS certificates in a project + - `v2betaapi`: + - **Deprecation:** The `v2beta2api` is deprecated and will be removed in the future. Migrate to `v2api` - `cost`: [v0.1.0](services/cost/CHANGELOG.md#v010) - **New:** STACKIT Cost module can be used to retrieve STACKIT cost information - `edge`: diff --git a/services/certificates/CHANGELOG.md b/services/certificates/CHANGELOG.md index 47f95a410..5e00a0b27 100644 --- a/services/certificates/CHANGELOG.md +++ b/services/certificates/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.5.0 +- **Feature:** Add new method `GetQuota` to get the quota for TLS certificates in a project +- `v2betaapi`: + - **Deprecation:** The `v2beta2api` is deprecated and will be removed in the future. Migrate to `v2api` + ## v1.4.1 - **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` diff --git a/services/certificates/VERSION b/services/certificates/VERSION index 9bdb566fc..76864c1c2 100644 --- a/services/certificates/VERSION +++ b/services/certificates/VERSION @@ -1 +1 @@ -v1.4.1 \ No newline at end of file +v1.5.0 \ No newline at end of file diff --git a/services/certificates/api_default.go b/services/certificates/api_default.go index 862bcdf97..161900d64 100644 --- a/services/certificates/api_default.go +++ b/services/certificates/api_default.go @@ -99,6 +99,29 @@ type DefaultApi interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetCertificateExecute(ctx context.Context, projectId string, region string, id string) (*GetCertificateResponse, error) + /* + GetQuota Get the quota for TLS certificates in a project. + Retrieves the configured TLS certificate quota for the project. Limit can be changed via service request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiGetQuotaRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest + /* + GetQuotaExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return GetQuotaResponse + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + GetQuotaExecute(ctx context.Context, projectId string, region string) (*GetQuotaResponse, error) /* ListCertificates Retrieve the list of TLS certificate stored in a project. ListCertificates will return the list of TLS certificates in a project. @@ -144,6 +167,12 @@ type ApiGetCertificateRequest interface { Execute() (*GetCertificateResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApiGetQuotaRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*GetQuotaResponse, error) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListCertificatesRequest interface { // page_size specifies how many certificates should be returned on this page. Must be a positive number <= 1000 @@ -626,6 +655,154 @@ func (a *APIClient) GetCertificateExecute(ctx context.Context, projectId string, return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r GetQuotaRequest) Execute() (*GetQuotaResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetQuotaResponse + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/quotas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + var v Status + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +GetQuota: Get the quota for TLS certificates in a project. + +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiGetQuotaRequest +*/ +func (a *APIClient) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { + return GetQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (a *APIClient) GetQuotaExecute(ctx context.Context, projectId string, region string) (*GetQuotaResponse, error) { + r := GetQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } + return r.Execute() +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListCertificatesRequest struct { ctx context.Context diff --git a/services/certificates/model_certificates_quota.go b/services/certificates/model_certificates_quota.go new file mode 100644 index 000000000..d1101799e --- /dev/null +++ b/services/certificates/model_certificates_quota.go @@ -0,0 +1,213 @@ +/* +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 CertificatesQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificatesQuota{} + +/* + types and functions for limit +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetLimitAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetLimitArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetLimitRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCertificatesQuotaGetLimitAttributeTypeOk(arg CertificatesQuotaGetLimitAttributeType) (ret CertificatesQuotaGetLimitRetType, 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 setCertificatesQuotaGetLimitAttributeType(arg *CertificatesQuotaGetLimitAttributeType, val CertificatesQuotaGetLimitRetType) { + *arg = &val +} + +/* + types and functions for usage +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetUsageAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetUsageArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuotaGetUsageRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCertificatesQuotaGetUsageAttributeTypeOk(arg CertificatesQuotaGetUsageAttributeType) (ret CertificatesQuotaGetUsageRetType, 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 setCertificatesQuotaGetUsageAttributeType(arg *CertificatesQuotaGetUsageAttributeType, val CertificatesQuotaGetUsageRetType) { + *arg = &val +} + +// CertificatesQuota Certificates quotas holds the limits and usage for certificates resources +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CertificatesQuota struct { + // The maximum number of TLS certificates in this project. + // Can be cast to int32 without loss of precision. + Limit CertificatesQuotaGetLimitAttributeType `json:"limit,omitempty"` + // The number of certificates that are currently existing in this project. + // Can be cast to int32 without loss of precision. + Usage CertificatesQuotaGetUsageAttributeType `json:"usage,omitempty"` +} + +// NewCertificatesQuota instantiates a new CertificatesQuota 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 NewCertificatesQuota() *CertificatesQuota { + this := CertificatesQuota{} + return &this +} + +// NewCertificatesQuotaWithDefaults instantiates a new CertificatesQuota 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 NewCertificatesQuotaWithDefaults() *CertificatesQuota { + this := CertificatesQuota{} + return &this +} + +// GetLimit returns the Limit 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 *CertificatesQuota) GetLimit() (res CertificatesQuotaGetLimitRetType) { + res, _ = o.GetLimitOk() + return +} + +// GetLimitOk returns a tuple with the Limit 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 *CertificatesQuota) GetLimitOk() (ret CertificatesQuotaGetLimitRetType, ok bool) { + return getCertificatesQuotaGetLimitAttributeTypeOk(o.Limit) +} + +// HasLimit 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 *CertificatesQuota) HasLimit() bool { + _, ok := o.GetLimitOk() + return ok +} + +// SetLimit gets a reference to the given int64 and assigns it to the Limit field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CertificatesQuota) SetLimit(v CertificatesQuotaGetLimitRetType) { + setCertificatesQuotaGetLimitAttributeType(&o.Limit, 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 *CertificatesQuota) GetUsage() (res CertificatesQuotaGetUsageRetType) { + 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 *CertificatesQuota) GetUsageOk() (ret CertificatesQuotaGetUsageRetType, ok bool) { + return getCertificatesQuotaGetUsageAttributeTypeOk(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 *CertificatesQuota) HasUsage() bool { + _, ok := o.GetUsageOk() + return ok +} + +// SetUsage gets a reference to the given int64 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 *CertificatesQuota) SetUsage(v CertificatesQuotaGetUsageRetType) { + setCertificatesQuotaGetUsageAttributeType(&o.Usage, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o CertificatesQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCertificatesQuotaGetLimitAttributeTypeOk(o.Limit); ok { + toSerialize["Limit"] = val + } + if val, ok := getCertificatesQuotaGetUsageAttributeTypeOk(o.Usage); ok { + toSerialize["Usage"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableCertificatesQuota struct { + value *CertificatesQuota + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableCertificatesQuota) Get() *CertificatesQuota { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableCertificatesQuota) Set(val *CertificatesQuota) { + 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 NullableCertificatesQuota) 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 *NullableCertificatesQuota) 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 NewNullableCertificatesQuota(val *CertificatesQuota) *NullableCertificatesQuota { + return &NullableCertificatesQuota{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 NullableCertificatesQuota) 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 *NullableCertificatesQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_certificates_quota_test.go b/services/certificates/model_certificates_quota_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_certificates_quota_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_quota_response.go b/services/certificates/model_get_quota_response.go new file mode 100644 index 000000000..1522df5dc --- /dev/null +++ b/services/certificates/model_get_quota_response.go @@ -0,0 +1,269 @@ +/* +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 GetQuotaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetQuotaResponse{} + +/* + types and functions for projectId +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetProjectIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProjectIdAttributeType) (ret GetQuotaResponseGetProjectIdRetType, 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 setGetQuotaResponseGetProjectIdAttributeType(arg *GetQuotaResponseGetProjectIdAttributeType, val GetQuotaResponseGetProjectIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetProjectIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetProjectIdRetType = string + +/* + types and functions for quotas +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetQuotasAttributeType = *Quotas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetQuotasArgType = Quotas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetQuotasRetType = Quotas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetQuotaResponseGetQuotasAttributeTypeOk(arg GetQuotaResponseGetQuotasAttributeType) (ret GetQuotaResponseGetQuotasRetType, 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 setGetQuotaResponseGetQuotasAttributeType(arg *GetQuotaResponseGetQuotasAttributeType, val GetQuotaResponseGetQuotasRetType) { + *arg = &val +} + +/* + types and functions for region +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetRegionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetQuotaResponseGetRegionAttributeTypeOk(arg GetQuotaResponseGetRegionAttributeType) (ret GetQuotaResponseGetRegionRetType, 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 setGetQuotaResponseGetRegionAttributeType(arg *GetQuotaResponseGetRegionAttributeType, val GetQuotaResponseGetRegionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetRegionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponseGetRegionRetType = string + +// GetQuotaResponse struct for GetQuotaResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetQuotaResponse struct { + // Project identifier + ProjectId GetQuotaResponseGetProjectIdAttributeType `json:"projectId,omitempty"` + Quotas GetQuotaResponseGetQuotasAttributeType `json:"quotas,omitempty"` + // Region + Region GetQuotaResponseGetRegionAttributeType `json:"region,omitempty"` +} + +// NewGetQuotaResponse instantiates a new GetQuotaResponse 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 NewGetQuotaResponse() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// NewGetQuotaResponseWithDefaults instantiates a new GetQuotaResponse 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 NewGetQuotaResponseWithDefaults() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// GetProjectId returns the ProjectId 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 *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetType) { + res, _ = o.GetProjectIdOk() + return +} + +// GetProjectIdOk returns a tuple with the ProjectId 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 *GetQuotaResponse) GetProjectIdOk() (ret GetQuotaResponseGetProjectIdRetType, ok bool) { + return getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// HasProjectId 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 *GetQuotaResponse) HasProjectId() bool { + _, ok := o.GetProjectIdOk() + return ok +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetQuotaResponse) SetProjectId(v GetQuotaResponseGetProjectIdRetType) { + setGetQuotaResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetQuotas returns the Quotas 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 *GetQuotaResponse) GetQuotas() (res GetQuotaResponseGetQuotasRetType) { + res, _ = o.GetQuotasOk() + return +} + +// GetQuotasOk returns a tuple with the Quotas 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 *GetQuotaResponse) GetQuotasOk() (ret GetQuotaResponseGetQuotasRetType, ok bool) { + return getGetQuotaResponseGetQuotasAttributeTypeOk(o.Quotas) +} + +// HasQuotas 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 *GetQuotaResponse) HasQuotas() bool { + _, ok := o.GetQuotasOk() + return ok +} + +// SetQuotas gets a reference to the given Quotas and assigns it to the Quotas field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetQuotaResponse) SetQuotas(v GetQuotaResponseGetQuotasRetType) { + setGetQuotaResponseGetQuotasAttributeType(&o.Quotas, v) +} + +// GetRegion returns the Region 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 *GetQuotaResponse) GetRegion() (res GetQuotaResponseGetRegionRetType) { + res, _ = o.GetRegionOk() + return +} + +// GetRegionOk returns a tuple with the Region 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 *GetQuotaResponse) GetRegionOk() (ret GetQuotaResponseGetRegionRetType, ok bool) { + return getGetQuotaResponseGetRegionAttributeTypeOk(o.Region) +} + +// HasRegion 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 *GetQuotaResponse) HasRegion() bool { + _, ok := o.GetRegionOk() + return ok +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetQuotaResponse) SetRegion(v GetQuotaResponseGetRegionRetType) { + setGetQuotaResponseGetRegionAttributeType(&o.Region, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getGetQuotaResponseGetQuotasAttributeTypeOk(o.Quotas); ok { + toSerialize["Quotas"] = val + } + if val, ok := getGetQuotaResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableGetQuotaResponse struct { + value *GetQuotaResponse + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { + 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 NullableGetQuotaResponse) 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 *NullableGetQuotaResponse) 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 NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { + return &NullableGetQuotaResponse{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 NullableGetQuotaResponse) 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 *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_get_quota_response_test.go b/services/certificates/model_get_quota_response_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_get_quota_response_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_quotas.go b/services/certificates/model_quotas.go new file mode 100644 index 000000000..5d2a43295 --- /dev/null +++ b/services/certificates/model_quotas.go @@ -0,0 +1,151 @@ +/* +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 Quotas type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Quotas{} + +/* + types and functions for certificates +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type QuotasGetCertificatesAttributeType = *CertificatesQuota + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type QuotasGetCertificatesArgType = CertificatesQuota + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type QuotasGetCertificatesRetType = CertificatesQuota + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getQuotasGetCertificatesAttributeTypeOk(arg QuotasGetCertificatesAttributeType) (ret QuotasGetCertificatesRetType, 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 setQuotasGetCertificatesAttributeType(arg *QuotasGetCertificatesAttributeType, val QuotasGetCertificatesRetType) { + *arg = &val +} + +// Quotas Quotas holds the specific quota elements for different resources +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Quotas struct { + Certificates QuotasGetCertificatesAttributeType `json:"certificates,omitempty"` +} + +// NewQuotas instantiates a new Quotas 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 NewQuotas() *Quotas { + this := Quotas{} + return &this +} + +// NewQuotasWithDefaults instantiates a new Quotas 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 NewQuotasWithDefaults() *Quotas { + this := Quotas{} + return &this +} + +// GetCertificates returns the Certificates 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 *Quotas) GetCertificates() (res QuotasGetCertificatesRetType) { + res, _ = o.GetCertificatesOk() + return +} + +// GetCertificatesOk returns a tuple with the Certificates 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 *Quotas) GetCertificatesOk() (ret QuotasGetCertificatesRetType, ok bool) { + return getQuotasGetCertificatesAttributeTypeOk(o.Certificates) +} + +// HasCertificates 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 *Quotas) HasCertificates() bool { + _, ok := o.GetCertificatesOk() + return ok +} + +// SetCertificates gets a reference to the given CertificatesQuota and assigns it to the Certificates field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Quotas) SetCertificates(v QuotasGetCertificatesRetType) { + setQuotasGetCertificatesAttributeType(&o.Certificates, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Quotas) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotasGetCertificatesAttributeTypeOk(o.Certificates); ok { + toSerialize["Certificates"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableQuotas struct { + value *Quotas + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableQuotas) Get() *Quotas { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableQuotas) Set(val *Quotas) { + 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 NullableQuotas) 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 *NullableQuotas) 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 NewNullableQuotas(val *Quotas) *NullableQuotas { + return &NullableQuotas{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 NullableQuotas) 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 *NullableQuotas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/model_quotas_test.go b/services/certificates/model_quotas_test.go new file mode 100644 index 000000000..f6042c30f --- /dev/null +++ b/services/certificates/model_quotas_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 e3713dde3..cca6a5e9a 100644 --- a/services/certificates/oas_commit +++ b/services/certificates/oas_commit @@ -1 +1 @@ -0e64886dd0847341800d7191ed193b75413be998 +95de5cba3201a683657cb472d5fa30aa768f19cc diff --git a/services/certificates/v2api/api_default.go b/services/certificates/v2api/api_default.go index be8d09f40..43ee6891e 100644 --- a/services/certificates/v2api/api_default.go +++ b/services/certificates/v2api/api_default.go @@ -73,6 +73,22 @@ type DefaultAPI interface { // @return GetCertificateResponse GetCertificateExecute(r ApiGetCertificateRequest) (*GetCertificateResponse, error) + /* + GetQuota Get the quota for TLS certificates in a project. + + Retrieves the configured TLS certificate quota for the project. Limit can be changed via service request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiGetQuotaRequest + */ + GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest + + // GetQuotaExecute executes the request + // @return GetQuotaResponse + GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) + /* ListCertificates Retrieve the list of TLS certificate stored in a project. @@ -532,6 +548,146 @@ func (a *DefaultAPIService) GetCertificateExecute(r ApiGetCertificateRequest) (* return localVarReturnValue, nil } +type ApiGetQuotaRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiGetQuotaRequest) Execute() (*GetQuotaResponse, error) { + return r.ApiService.GetQuotaExecute(r) +} + +/* +GetQuota Get the quota for TLS certificates in a project. + +Retrieves the configured TLS certificate quota for the project. Limit can be changed via service request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiGetQuotaRequest +*/ +func (a *DefaultAPIService) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return GetQuotaResponse +func (a *DefaultAPIService) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetQuotaResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/quotas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + var v Status + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + type ApiListCertificatesRequest struct { ctx context.Context ApiService DefaultAPI diff --git a/services/certificates/v2api/api_default_mock.go b/services/certificates/v2api/api_default_mock.go index 0e54adbea..eb5090840 100644 --- a/services/certificates/v2api/api_default_mock.go +++ b/services/certificates/v2api/api_default_mock.go @@ -26,6 +26,8 @@ type DefaultAPIServiceMock struct { DeleteCertificateExecuteMock *func(r ApiDeleteCertificateRequest) (map[string]interface{}, error) // GetCertificateExecuteMock can be populated to implement the behavior of the GetCertificateExecute function of this mock GetCertificateExecuteMock *func(r ApiGetCertificateRequest) (*GetCertificateResponse, error) + // GetQuotaExecuteMock can be populated to implement the behavior of the GetQuotaExecute function of this mock + GetQuotaExecuteMock *func(r ApiGetQuotaRequest) (*GetQuotaResponse, error) // ListCertificatesExecuteMock can be populated to implement the behavior of the ListCertificatesExecute function of this mock ListCertificatesExecuteMock *func(r ApiListCertificatesRequest) (*ListCertificatesResponse, error) } @@ -89,6 +91,25 @@ func (a DefaultAPIServiceMock) GetCertificateExecute(r ApiGetCertificateRequest) return (*a.GetCertificateExecuteMock)(r) } +func (a DefaultAPIServiceMock) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { + return ApiGetQuotaRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// GetQuotaExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetQuotaExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) { + if a.GetQuotaExecuteMock == nil { + var localVarReturnValue *GetQuotaResponse + return localVarReturnValue, nil + } + + return (*a.GetQuotaExecuteMock)(r) +} + func (a DefaultAPIServiceMock) ListCertificates(ctx context.Context, projectId string, region string) ApiListCertificatesRequest { return ApiListCertificatesRequest{ ApiService: a, diff --git a/services/certificates/v2api/model_certificates_quota.go b/services/certificates/v2api/model_certificates_quota.go new file mode 100644 index 000000000..173371371 --- /dev/null +++ b/services/certificates/v2api/model_certificates_quota.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 CertificatesQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificatesQuota{} + +// CertificatesQuota Certificates quotas holds the limits and usage for certificates resources +type CertificatesQuota struct { + // The maximum number of TLS certificates in this project. + Limit *int32 `json:"limit,omitempty"` + // The number of certificates that are currently existing in this project. + Usage *int32 `json:"usage,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CertificatesQuota CertificatesQuota + +// NewCertificatesQuota instantiates a new CertificatesQuota 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 NewCertificatesQuota() *CertificatesQuota { + this := CertificatesQuota{} + return &this +} + +// NewCertificatesQuotaWithDefaults instantiates a new CertificatesQuota 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 NewCertificatesQuotaWithDefaults() *CertificatesQuota { + this := CertificatesQuota{} + return &this +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *CertificatesQuota) GetLimit() int32 { + if o == nil || IsNil(o.Limit) { + var ret int32 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificatesQuota) GetLimitOk() (*int32, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *CertificatesQuota) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given int32 and assigns it to the Limit field. +func (o *CertificatesQuota) SetLimit(v int32) { + o.Limit = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *CertificatesQuota) GetUsage() int32 { + if o == nil || IsNil(o.Usage) { + var ret int32 + 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 *CertificatesQuota) GetUsageOk() (*int32, 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 *CertificatesQuota) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given int32 and assigns it to the Usage field. +func (o *CertificatesQuota) SetUsage(v int32) { + o.Usage = &v +} + +func (o CertificatesQuota) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificatesQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertificatesQuota) UnmarshalJSON(data []byte) (err error) { + varCertificatesQuota := _CertificatesQuota{} + + err = json.Unmarshal(data, &varCertificatesQuota) + + if err != nil { + return err + } + + *o = CertificatesQuota(varCertificatesQuota) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "limit") + delete(additionalProperties, "usage") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertificatesQuota struct { + value *CertificatesQuota + isSet bool +} + +func (v NullableCertificatesQuota) Get() *CertificatesQuota { + return v.value +} + +func (v *NullableCertificatesQuota) Set(val *CertificatesQuota) { + v.value = val + v.isSet = true +} + +func (v NullableCertificatesQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificatesQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificatesQuota(val *CertificatesQuota) *NullableCertificatesQuota { + return &NullableCertificatesQuota{value: val, isSet: true} +} + +func (v NullableCertificatesQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificatesQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/v2api/model_get_quota_response.go b/services/certificates/v2api/model_get_quota_response.go new file mode 100644 index 000000000..7180ad571 --- /dev/null +++ b/services/certificates/v2api/model_get_quota_response.go @@ -0,0 +1,229 @@ +/* +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 GetQuotaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetQuotaResponse{} + +// GetQuotaResponse struct for GetQuotaResponse +type GetQuotaResponse struct { + // Project identifier + ProjectId *string `json:"projectId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"` + Quotas *Quotas `json:"quotas,omitempty"` + // Region + Region *string `json:"region,omitempty" validate:"regexp=^[a-z]{2,4}[0-9]{2}$"` + AdditionalProperties map[string]interface{} +} + +type _GetQuotaResponse GetQuotaResponse + +// NewGetQuotaResponse instantiates a new GetQuotaResponse 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 NewGetQuotaResponse() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// NewGetQuotaResponseWithDefaults instantiates a new GetQuotaResponse 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 NewGetQuotaResponseWithDefaults() *GetQuotaResponse { + this := GetQuotaResponse{} + return &this +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *GetQuotaResponse) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetQuotas returns the Quotas field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetQuotas() Quotas { + if o == nil || IsNil(o.Quotas) { + var ret Quotas + return ret + } + return *o.Quotas +} + +// GetQuotasOk returns a tuple with the Quotas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetQuotasOk() (*Quotas, bool) { + if o == nil || IsNil(o.Quotas) { + return nil, false + } + return o.Quotas, true +} + +// HasQuotas returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasQuotas() bool { + if o != nil && !IsNil(o.Quotas) { + return true + } + + return false +} + +// SetQuotas gets a reference to the given Quotas and assigns it to the Quotas field. +func (o *GetQuotaResponse) SetQuotas(v Quotas) { + o.Quotas = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *GetQuotaResponse) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetQuotaResponse) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *GetQuotaResponse) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *GetQuotaResponse) SetRegion(v string) { + o.Region = &v +} + +func (o GetQuotaResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } + if !IsNil(o.Quotas) { + toSerialize["quotas"] = o.Quotas + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetQuotaResponse) UnmarshalJSON(data []byte) (err error) { + varGetQuotaResponse := _GetQuotaResponse{} + + err = json.Unmarshal(data, &varGetQuotaResponse) + + if err != nil { + return err + } + + *o = GetQuotaResponse(varGetQuotaResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectId") + delete(additionalProperties, "quotas") + delete(additionalProperties, "region") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetQuotaResponse struct { + value *GetQuotaResponse + isSet bool +} + +func (v NullableGetQuotaResponse) Get() *GetQuotaResponse { + return v.value +} + +func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetQuotaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetQuotaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse { + return &NullableGetQuotaResponse{value: val, isSet: true} +} + +func (v NullableGetQuotaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/v2api/model_quotas.go b/services/certificates/v2api/model_quotas.go new file mode 100644 index 000000000..94df43d7f --- /dev/null +++ b/services/certificates/v2api/model_quotas.go @@ -0,0 +1,153 @@ +/* +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 Quotas type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Quotas{} + +// Quotas Quotas holds the specific quota elements for different resources +type Quotas struct { + Certificates *CertificatesQuota `json:"certificates,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Quotas Quotas + +// NewQuotas instantiates a new Quotas 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 NewQuotas() *Quotas { + this := Quotas{} + return &this +} + +// NewQuotasWithDefaults instantiates a new Quotas 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 NewQuotasWithDefaults() *Quotas { + this := Quotas{} + return &this +} + +// GetCertificates returns the Certificates field value if set, zero value otherwise. +func (o *Quotas) GetCertificates() CertificatesQuota { + if o == nil || IsNil(o.Certificates) { + var ret CertificatesQuota + return ret + } + return *o.Certificates +} + +// GetCertificatesOk returns a tuple with the Certificates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Quotas) GetCertificatesOk() (*CertificatesQuota, bool) { + if o == nil || IsNil(o.Certificates) { + return nil, false + } + return o.Certificates, true +} + +// HasCertificates returns a boolean if a field has been set. +func (o *Quotas) HasCertificates() bool { + if o != nil && !IsNil(o.Certificates) { + return true + } + + return false +} + +// SetCertificates gets a reference to the given CertificatesQuota and assigns it to the Certificates field. +func (o *Quotas) SetCertificates(v CertificatesQuota) { + o.Certificates = &v +} + +func (o Quotas) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Quotas) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Certificates) { + toSerialize["certificates"] = o.Certificates + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Quotas) UnmarshalJSON(data []byte) (err error) { + varQuotas := _Quotas{} + + err = json.Unmarshal(data, &varQuotas) + + if err != nil { + return err + } + + *o = Quotas(varQuotas) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificates") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableQuotas struct { + value *Quotas + isSet bool +} + +func (v NullableQuotas) Get() *Quotas { + return v.value +} + +func (v *NullableQuotas) Set(val *Quotas) { + v.value = val + v.isSet = true +} + +func (v NullableQuotas) IsSet() bool { + return v.isSet +} + +func (v *NullableQuotas) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuotas(val *Quotas) *NullableQuotas { + return &NullableQuotas{value: val, isSet: true} +} + +func (v NullableQuotas) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuotas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/certificates/v2betaapi/api_default.go b/services/certificates/v2betaapi/api_default.go index 2fd20f4f4..11fdf7c18 100644 --- a/services/certificates/v2betaapi/api_default.go +++ b/services/certificates/v2betaapi/api_default.go @@ -32,11 +32,14 @@ type DefaultAPI interface { @param projectId @param region @return ApiCreateCertificateRequest + + Deprecated */ CreateCertificate(ctx context.Context, projectId string, region string) ApiCreateCertificateRequest // CreateCertificateExecute executes the request // @return CreateCertificateResponse + // Deprecated CreateCertificateExecute(r ApiCreateCertificateRequest) (*CreateCertificateResponse, error) /* @@ -49,11 +52,14 @@ type DefaultAPI interface { @param region @param id @return ApiDeleteCertificateRequest + + Deprecated */ DeleteCertificate(ctx context.Context, projectId string, region string, id string) ApiDeleteCertificateRequest // DeleteCertificateExecute executes the request // @return map[string]interface{} + // Deprecated DeleteCertificateExecute(r ApiDeleteCertificateRequest) (map[string]interface{}, error) /* @@ -66,11 +72,14 @@ type DefaultAPI interface { @param region @param id @return ApiGetCertificateRequest + + Deprecated */ GetCertificate(ctx context.Context, projectId string, region string, id string) ApiGetCertificateRequest // GetCertificateExecute executes the request // @return GetCertificateResponse + // Deprecated GetCertificateExecute(r ApiGetCertificateRequest) (*GetCertificateResponse, error) /* @@ -82,11 +91,14 @@ type DefaultAPI interface { @param projectId @param region @return ApiListCertificatesRequest + + Deprecated */ ListCertificates(ctx context.Context, projectId string, region string) ApiListCertificatesRequest // ListCertificatesExecute executes the request // @return ListCertificatesResponse + // Deprecated ListCertificatesExecute(r ApiListCertificatesRequest) (*ListCertificatesResponse, error) } @@ -119,6 +131,8 @@ CreateCertificate will store a TLS certificate in a project. @param projectId @param region @return ApiCreateCertificateRequest + +Deprecated */ func (a *DefaultAPIService) CreateCertificate(ctx context.Context, projectId string, region string) ApiCreateCertificateRequest { return ApiCreateCertificateRequest{ @@ -132,6 +146,8 @@ func (a *DefaultAPIService) CreateCertificate(ctx context.Context, projectId str // Execute executes the request // // @return CreateCertificateResponse +// +// Deprecated func (a *DefaultAPIService) CreateCertificateExecute(r ApiCreateCertificateRequest) (*CreateCertificateResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -266,6 +282,8 @@ DeleteCertificate will delete the stored TLS certificate. @param region @param id @return ApiDeleteCertificateRequest + +Deprecated */ func (a *DefaultAPIService) DeleteCertificate(ctx context.Context, projectId string, region string, id string) ApiDeleteCertificateRequest { return ApiDeleteCertificateRequest{ @@ -280,6 +298,8 @@ func (a *DefaultAPIService) DeleteCertificate(ctx context.Context, projectId str // Execute executes the request // // @return map[string]interface{} +// +// Deprecated func (a *DefaultAPIService) DeleteCertificateExecute(r ApiDeleteCertificateRequest) (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -410,6 +430,8 @@ GetCertificate will return the public parts of a stored TLS certificate. @param region @param id @return ApiGetCertificateRequest + +Deprecated */ func (a *DefaultAPIService) GetCertificate(ctx context.Context, projectId string, region string, id string) ApiGetCertificateRequest { return ApiGetCertificateRequest{ @@ -424,6 +446,8 @@ func (a *DefaultAPIService) GetCertificate(ctx context.Context, projectId string // Execute executes the request // // @return GetCertificateResponse +// +// Deprecated func (a *DefaultAPIService) GetCertificateExecute(r ApiGetCertificateRequest) (*GetCertificateResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -566,6 +590,8 @@ ListCertificates will return the list of TLS certificates in a project. @param projectId @param region @return ApiListCertificatesRequest + +Deprecated */ func (a *DefaultAPIService) ListCertificates(ctx context.Context, projectId string, region string) ApiListCertificatesRequest { return ApiListCertificatesRequest{ @@ -579,6 +605,8 @@ func (a *DefaultAPIService) ListCertificates(ctx context.Context, projectId stri // Execute executes the request // // @return ListCertificatesResponse +// +// Deprecated func (a *DefaultAPIService) ListCertificatesExecute(r ApiListCertificatesRequest) (*ListCertificatesResponse, error) { var ( localVarHTTPMethod = http.MethodGet diff --git a/services/certificates/v2betaapi/api_default_mock.go b/services/certificates/v2betaapi/api_default_mock.go index 17ef95abc..d18226cda 100644 --- a/services/certificates/v2betaapi/api_default_mock.go +++ b/services/certificates/v2betaapi/api_default_mock.go @@ -20,16 +20,17 @@ var _ DefaultAPI = &DefaultAPIServiceMock{} // DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. // By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. type DefaultAPIServiceMock struct { - // CreateCertificateExecuteMock can be populated to implement the behavior of the CreateCertificateExecute function of this mock + // Deprecated: CreateCertificateExecuteMock can be populated to implement the behavior of the CreateCertificateExecute function of this mock CreateCertificateExecuteMock *func(r ApiCreateCertificateRequest) (*CreateCertificateResponse, error) - // DeleteCertificateExecuteMock can be populated to implement the behavior of the DeleteCertificateExecute function of this mock + // Deprecated: DeleteCertificateExecuteMock can be populated to implement the behavior of the DeleteCertificateExecute function of this mock DeleteCertificateExecuteMock *func(r ApiDeleteCertificateRequest) (map[string]interface{}, error) - // GetCertificateExecuteMock can be populated to implement the behavior of the GetCertificateExecute function of this mock + // Deprecated: GetCertificateExecuteMock can be populated to implement the behavior of the GetCertificateExecute function of this mock GetCertificateExecuteMock *func(r ApiGetCertificateRequest) (*GetCertificateResponse, error) - // ListCertificatesExecuteMock can be populated to implement the behavior of the ListCertificatesExecute function of this mock + // Deprecated: ListCertificatesExecuteMock can be populated to implement the behavior of the ListCertificatesExecute function of this mock ListCertificatesExecuteMock *func(r ApiListCertificatesRequest) (*ListCertificatesResponse, error) } +// Deprecated func (a DefaultAPIServiceMock) CreateCertificate(ctx context.Context, projectId string, region string) ApiCreateCertificateRequest { return ApiCreateCertificateRequest{ ApiService: a, @@ -39,7 +40,7 @@ func (a DefaultAPIServiceMock) CreateCertificate(ctx context.Context, projectId } } -// CreateCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateCertificateExecuteMock field in the DefaultAPIServiceMock struct. +// Deprecated: CreateCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateCertificateExecuteMock field in the DefaultAPIServiceMock struct. func (a DefaultAPIServiceMock) CreateCertificateExecute(r ApiCreateCertificateRequest) (*CreateCertificateResponse, error) { if a.CreateCertificateExecuteMock == nil { var localVarReturnValue *CreateCertificateResponse @@ -49,6 +50,7 @@ func (a DefaultAPIServiceMock) CreateCertificateExecute(r ApiCreateCertificateRe return (*a.CreateCertificateExecuteMock)(r) } +// Deprecated func (a DefaultAPIServiceMock) DeleteCertificate(ctx context.Context, projectId string, region string, id string) ApiDeleteCertificateRequest { return ApiDeleteCertificateRequest{ ApiService: a, @@ -59,7 +61,7 @@ func (a DefaultAPIServiceMock) DeleteCertificate(ctx context.Context, projectId } } -// DeleteCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteCertificateExecuteMock field in the DefaultAPIServiceMock struct. +// Deprecated: DeleteCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteCertificateExecuteMock field in the DefaultAPIServiceMock struct. func (a DefaultAPIServiceMock) DeleteCertificateExecute(r ApiDeleteCertificateRequest) (map[string]interface{}, error) { if a.DeleteCertificateExecuteMock == nil { var localVarReturnValue map[string]interface{} @@ -69,6 +71,7 @@ func (a DefaultAPIServiceMock) DeleteCertificateExecute(r ApiDeleteCertificateRe return (*a.DeleteCertificateExecuteMock)(r) } +// Deprecated func (a DefaultAPIServiceMock) GetCertificate(ctx context.Context, projectId string, region string, id string) ApiGetCertificateRequest { return ApiGetCertificateRequest{ ApiService: a, @@ -79,7 +82,7 @@ func (a DefaultAPIServiceMock) GetCertificate(ctx context.Context, projectId str } } -// GetCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetCertificateExecuteMock field in the DefaultAPIServiceMock struct. +// Deprecated: GetCertificateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetCertificateExecuteMock field in the DefaultAPIServiceMock struct. func (a DefaultAPIServiceMock) GetCertificateExecute(r ApiGetCertificateRequest) (*GetCertificateResponse, error) { if a.GetCertificateExecuteMock == nil { var localVarReturnValue *GetCertificateResponse @@ -89,6 +92,7 @@ func (a DefaultAPIServiceMock) GetCertificateExecute(r ApiGetCertificateRequest) return (*a.GetCertificateExecuteMock)(r) } +// Deprecated func (a DefaultAPIServiceMock) ListCertificates(ctx context.Context, projectId string, region string) ApiListCertificatesRequest { return ApiListCertificatesRequest{ ApiService: a, @@ -98,7 +102,7 @@ func (a DefaultAPIServiceMock) ListCertificates(ctx context.Context, projectId s } } -// ListCertificatesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCertificatesExecuteMock field in the DefaultAPIServiceMock struct. +// Deprecated: ListCertificatesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCertificatesExecuteMock field in the DefaultAPIServiceMock struct. func (a DefaultAPIServiceMock) ListCertificatesExecute(r ApiListCertificatesRequest) (*ListCertificatesResponse, error) { if a.ListCertificatesExecuteMock == nil { var localVarReturnValue *ListCertificatesResponse