diff --git a/services/alb/oas_commit b/services/alb/oas_commit index b129c2291..63b89d028 100644 --- a/services/alb/oas_commit +++ b/services/alb/oas_commit @@ -1 +1 @@ -98c11e0ee4834ddaaa474eccc437d234e6276a70 +c4d9e6ade2a7d29d5c3bf00c8a22f3fd322f9b56 diff --git a/services/alb/v2beta2api/api_default.go b/services/alb/v2beta2api/api_default.go deleted file mode 100644 index 682b9eb3e..000000000 --- a/services/alb/v2beta2api/api_default.go +++ /dev/null @@ -1,2273 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2beta2api - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -type DefaultAPI interface { - - /* - CreateCredentials Create credentials for observability of the application load balancer - - Created credentials can be stored and used for the load balancer observability. For example, when using STACKIT - Observability, credentials first must be created for that STACKIT Observability instance (by using their API or the - STACKIT Portal) and then can be provided to the load balancer by storing them with this endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateCredentialsRequest - - Deprecated - */ - CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest - - // CreateCredentialsExecute executes the request - // @return CreateCredentialsResponse - // Deprecated - CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) - - /* - CreateLoadBalancer Create an application load balancer in a project - - Creates an Application Load Balancer. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateLoadBalancerRequest - - Deprecated - */ - CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest - - // CreateLoadBalancerExecute executes the request - // @return LoadBalancer - // Deprecated - CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) - - /* - DeleteCredentials Delete a single credential in a project. - - Deletes the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiDeleteCredentialsRequest - - Deprecated - */ - DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest - - // DeleteCredentialsExecute executes the request - // @return map[string]interface{} - // Deprecated - DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) - - /* - DeleteLoadBalancer Delete a given load balancer in a project. - - Deletes the specified Application Load Balancer. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiDeleteLoadBalancerRequest - - Deprecated - */ - DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest - - // DeleteLoadBalancerExecute executes the request - // @return map[string]interface{} - // Deprecated - DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) - - /* - GetCredentials Get a single credential reference in a project. - - Gets the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiGetCredentialsRequest - - Deprecated - */ - GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest - - // GetCredentialsExecute executes the request - // @return GetCredentialsResponse - // Deprecated - GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) - - /* - GetLoadBalancer Get a single application load balancer in a project. - - Retrieves details of a specific Application Load Balancer in a project. - Includes creation and update information, current status, and any error descriptions. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiGetLoadBalancerRequest - - Deprecated - */ - GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest - - // GetLoadBalancerExecute executes the request - // @return LoadBalancer - // Deprecated - GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) - - /* - GetQuota Get the quota of Application Load Balancers in a project. - - Retrieves the configured Application Load Balancer 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 - */ - GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest - - // GetQuotaExecute executes the request - // @return GetQuotaResponse - // Deprecated - GetQuotaExecute(r ApiGetQuotaRequest) (*GetQuotaResponse, error) - - /* - ListCredentials List all credentials in a project. - - Lists the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListCredentialsRequest - - Deprecated - */ - ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest - - // ListCredentialsExecute executes the request - // @return ListCredentialsResponse - // Deprecated - ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) - - /* - ListLoadBalancers List load balancers in a project. - - Lists all Application Load Balancers in a project. - Includes details from creation or updates, along with their status and any error descriptions. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListLoadBalancersRequest - - Deprecated - */ - ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest - - // ListLoadBalancersExecute executes the request - // @return ListLoadBalancersResponse - // Deprecated - ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) - - /* - ListPlans List available service plans. - - Lists the configured service plans for a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region - @return ApiListPlansRequest - - Deprecated - */ - ListPlans(ctx context.Context, region string) ApiListPlansRequest - - // ListPlansExecute executes the request - // @return ListPlansResponse - // Deprecated - ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) - - /* - UpdateCredentials Update credentials for observability in a project. - - Updates the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiUpdateCredentialsRequest - - Deprecated - */ - UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest - - // UpdateCredentialsExecute executes the request - // @return UpdateCredentialsResponse - // Deprecated - UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) - - /* - UpdateLoadBalancer Update a load balancer in a project. - - Updates an existing Application Load Balancer by modifying its listeners and target pools. - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiUpdateLoadBalancerRequest - - Deprecated - */ - UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest - - // UpdateLoadBalancerExecute executes the request - // @return LoadBalancer - // Deprecated - UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) - - /* - UpdateTargetPool Update a single target pool of a load balancer in a project. - - Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @param targetPoolName - @return ApiUpdateTargetPoolRequest - - Deprecated - */ - UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest - - // UpdateTargetPoolExecute executes the request - // @return TargetPool - // Deprecated - UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) -} - -// DefaultAPIService DefaultAPI service -type DefaultAPIService service - -type ApiCreateCredentialsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - createCredentialsPayload *CreateCredentialsPayload - xRequestID *string -} - -func (r ApiCreateCredentialsRequest) CreateCredentialsPayload(createCredentialsPayload CreateCredentialsPayload) ApiCreateCredentialsRequest { - r.createCredentialsPayload = &createCredentialsPayload - return r -} - -func (r ApiCreateCredentialsRequest) XRequestID(xRequestID string) ApiCreateCredentialsRequest { - r.xRequestID = &xRequestID - return r -} - -func (r ApiCreateCredentialsRequest) Execute() (*CreateCredentialsResponse, error) { - return r.ApiService.CreateCredentialsExecute(r) -} - -/* -CreateCredentials Create credentials for observability of the application load balancer - -Created credentials can be stored and used for the load balancer observability. For example, when using STACKIT - - Observability, credentials first must be created for that STACKIT Observability instance (by using their API or the - STACKIT Portal) and then can be provided to the load balancer by storing them with this endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateCredentialsRequest - -Deprecated -*/ -func (a *DefaultAPIService) CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest { - return ApiCreateCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return CreateCredentialsResponse -// -// Deprecated -func (a *DefaultAPIService) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateCredentialsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/credentials" - 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{} - if r.createCredentialsPayload == nil { - return localVarReturnValue, reportError("createCredentialsPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "simple", "") - } - // body params - localVarPostBody = r.createCredentialsPayload - 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 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 - } - 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 - } - - 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 ApiCreateLoadBalancerRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - createLoadBalancerPayload *CreateLoadBalancerPayload - xRequestID *string -} - -func (r ApiCreateLoadBalancerRequest) CreateLoadBalancerPayload(createLoadBalancerPayload CreateLoadBalancerPayload) ApiCreateLoadBalancerRequest { - r.createLoadBalancerPayload = &createLoadBalancerPayload - return r -} - -func (r ApiCreateLoadBalancerRequest) XRequestID(xRequestID string) ApiCreateLoadBalancerRequest { - r.xRequestID = &xRequestID - return r -} - -func (r ApiCreateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - return r.ApiService.CreateLoadBalancerExecute(r) -} - -/* -CreateLoadBalancer Create an application load balancer in a project - -Creates an Application Load Balancer. - - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiCreateLoadBalancerRequest - -Deprecated -*/ -func (a *DefaultAPIService) CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest { - return ApiCreateLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return LoadBalancer -// -// Deprecated -func (a *DefaultAPIService) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers" - 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{} - if r.createLoadBalancerPayload == nil { - return localVarReturnValue, reportError("createLoadBalancerPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xRequestID != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Request-ID", r.xRequestID, "simple", "") - } - // body params - localVarPostBody = r.createLoadBalancerPayload - 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 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 - } - 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 - } - - 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 ApiDeleteCredentialsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - credentialsRef string -} - -func (r ApiDeleteCredentialsRequest) Execute() (map[string]interface{}, error) { - return r.ApiService.DeleteCredentialsExecute(r) -} - -/* -DeleteCredentials Delete a single credential in a project. - -Deletes the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiDeleteCredentialsRequest - -Deprecated -*/ -func (a *DefaultAPIService) DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest { - return ApiDeleteCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Execute executes the request -// -// @return map[string]interface{} -// -// Deprecated -func (a *DefaultAPIService) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"credentialsRef"+"}", url.PathEscape(parameterValueToString(r.credentialsRef, "credentialsRef")), -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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiDeleteLoadBalancerRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - name string -} - -func (r ApiDeleteLoadBalancerRequest) Execute() (map[string]interface{}, error) { - return r.ApiService.DeleteLoadBalancerExecute(r) -} - -/* -DeleteLoadBalancer Delete a given load balancer in a project. - -Deletes the specified Application Load Balancer. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiDeleteLoadBalancerRequest - -Deprecated -*/ -func (a *DefaultAPIService) DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest { - return ApiDeleteLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Execute executes the request -// -// @return map[string]interface{} -// -// Deprecated -func (a *DefaultAPIService) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiGetCredentialsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - credentialsRef string -} - -func (r ApiGetCredentialsRequest) Execute() (*GetCredentialsResponse, error) { - return r.ApiService.GetCredentialsExecute(r) -} - -/* -GetCredentials Get a single credential reference in a project. - -Gets the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiGetCredentialsRequest - -Deprecated -*/ -func (a *DefaultAPIService) GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest { - return ApiGetCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Execute executes the request -// -// @return GetCredentialsResponse -// -// Deprecated -func (a *DefaultAPIService) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCredentialsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"credentialsRef"+"}", url.PathEscape(parameterValueToString(r.credentialsRef, "credentialsRef")), -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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiGetLoadBalancerRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - name string -} - -func (r ApiGetLoadBalancerRequest) Execute() (*LoadBalancer, error) { - return r.ApiService.GetLoadBalancerExecute(r) -} - -/* -GetLoadBalancer Get a single application load balancer in a project. - -Retrieves details of a specific Application Load Balancer in a project. - - Includes creation and update information, current status, and any error descriptions. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiGetLoadBalancerRequest - -Deprecated -*/ -func (a *DefaultAPIService) GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest { - return ApiGetLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Execute executes the request -// -// @return LoadBalancer -// -// Deprecated -func (a *DefaultAPIService) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -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", "*/*"} - - // 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 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 - } - 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 - } - - 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 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 of Application Load Balancers in a project. - -Retrieves the configured Application Load Balancer 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 -*/ -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 -// -// Deprecated -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 + "/v2beta2/projects/{projectId}/regions/{region}/quota" - 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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiListCredentialsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string -} - -func (r ApiListCredentialsRequest) Execute() (*ListCredentialsResponse, error) { - return r.ApiService.ListCredentialsExecute(r) -} - -/* -ListCredentials List all credentials in a project. - -Lists the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListCredentialsRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest { - return ApiListCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return ListCredentialsResponse -// -// Deprecated -func (a *DefaultAPIService) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCredentialsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/credentials" - 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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiListLoadBalancersRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - pageSize *string - pageId *string -} - -// page_size specifies how many load balancers should be returned on this page. Must be a positive number <= 1000 -func (r ApiListLoadBalancersRequest) PageSize(pageSize string) ApiListLoadBalancersRequest { - r.pageSize = &pageSize - return r -} - -// page_id is a page identifier returned by the previous response and is used to request the next page -func (r ApiListLoadBalancersRequest) PageId(pageId string) ApiListLoadBalancersRequest { - r.pageId = &pageId - return r -} - -func (r ApiListLoadBalancersRequest) Execute() (*ListLoadBalancersResponse, error) { - return r.ApiService.ListLoadBalancersExecute(r) -} - -/* -ListLoadBalancers List load balancers in a project. - -Lists all Application Load Balancers in a project. - - Includes details from creation or updates, along with their status and any error descriptions. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @return ApiListLoadBalancersRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest { - return ApiListLoadBalancersRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Execute executes the request -// -// @return ListLoadBalancersResponse -// -// Deprecated -func (a *DefaultAPIService) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListLoadBalancersResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListLoadBalancers") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers" - 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{} - - if r.pageSize != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "form", "") - } - if r.pageId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageId", r.pageId, "form", "") - } - // 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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiListPlansRequest struct { - ctx context.Context - ApiService DefaultAPI - region string -} - -func (r ApiListPlansRequest) Execute() (*ListPlansResponse, error) { - return r.ApiService.ListPlansExecute(r) -} - -/* -ListPlans List available service plans. - -Lists the configured service plans for a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param region - @return ApiListPlansRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListPlans(ctx context.Context, region string) ApiListPlansRequest { - return ApiListPlansRequest{ - ApiService: a, - ctx: ctx, - region: region, - } -} - -// Execute executes the request -// -// @return ListPlansResponse -// -// Deprecated -func (a *DefaultAPIService) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListPlansResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPlans") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/regions/{region}/plans" - 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", "*/*"} - - // 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 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 - } - 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 - } - - 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 ApiUpdateCredentialsRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - credentialsRef string - updateCredentialsPayload *UpdateCredentialsPayload -} - -func (r ApiUpdateCredentialsRequest) UpdateCredentialsPayload(updateCredentialsPayload UpdateCredentialsPayload) ApiUpdateCredentialsRequest { - r.updateCredentialsPayload = &updateCredentialsPayload - return r -} - -func (r ApiUpdateCredentialsRequest) Execute() (*UpdateCredentialsResponse, error) { - return r.ApiService.UpdateCredentialsExecute(r) -} - -/* -UpdateCredentials Update credentials for observability in a project. - -Updates the stored Observability credentials. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param credentialsRef - @return ApiUpdateCredentialsRequest - -Deprecated -*/ -func (a *DefaultAPIService) UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest { - return ApiUpdateCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Execute executes the request -// -// @return UpdateCredentialsResponse -// -// Deprecated -func (a *DefaultAPIService) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdateCredentialsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateCredentials") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"credentialsRef"+"}", url.PathEscape(parameterValueToString(r.credentialsRef, "credentialsRef")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateCredentialsPayload == nil { - return localVarReturnValue, reportError("updateCredentialsPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateCredentialsPayload - 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 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 - } - 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 - } - - 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 ApiUpdateLoadBalancerRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - name string - updateLoadBalancerPayload *UpdateLoadBalancerPayload -} - -func (r ApiUpdateLoadBalancerRequest) UpdateLoadBalancerPayload(updateLoadBalancerPayload UpdateLoadBalancerPayload) ApiUpdateLoadBalancerRequest { - r.updateLoadBalancerPayload = &updateLoadBalancerPayload - return r -} - -func (r ApiUpdateLoadBalancerRequest) Execute() (*LoadBalancer, error) { - return r.ApiService.UpdateLoadBalancerExecute(r) -} - -/* -UpdateLoadBalancer Update a load balancer in a project. - -Updates an existing Application Load Balancer by modifying its listeners and target pools. - - Ensure the resource version is current to maintain concurrency safety. - The default load balancing algorithm is Maglev, and selecting a different algorithm is currently not supported. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @return ApiUpdateLoadBalancerRequest - -Deprecated -*/ -func (a *DefaultAPIService) UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest { - return ApiUpdateLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Execute executes the request -// -// @return LoadBalancer -// -// Deprecated -func (a *DefaultAPIService) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LoadBalancer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateLoadBalancer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateLoadBalancerPayload == nil { - return localVarReturnValue, reportError("updateLoadBalancerPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateLoadBalancerPayload - 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 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 - } - 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 - } - - 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 ApiUpdateTargetPoolRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - region string - name string - targetPoolName string - updateTargetPoolPayload *UpdateTargetPoolPayload -} - -func (r ApiUpdateTargetPoolRequest) UpdateTargetPoolPayload(updateTargetPoolPayload UpdateTargetPoolPayload) ApiUpdateTargetPoolRequest { - r.updateTargetPoolPayload = &updateTargetPoolPayload - return r -} - -func (r ApiUpdateTargetPoolRequest) Execute() (*TargetPool, error) { - return r.ApiService.UpdateTargetPoolExecute(r) -} - -/* -UpdateTargetPool Update a single target pool of a load balancer in a project. - -Replaces the content of a specific target pool in the Application Load Balancer (useful for adding or removing target servers). - - Only updates the specified target pool, leaving others unchanged. - Cannot be used to create or rename target pools. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId - @param region - @param name - @param targetPoolName - @return ApiUpdateTargetPoolRequest - -Deprecated -*/ -func (a *DefaultAPIService) UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { - return ApiUpdateTargetPoolRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - targetPoolName: targetPoolName, - } -} - -// Execute executes the request -// -// @return TargetPool -// -// Deprecated -func (a *DefaultAPIService) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TargetPool - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateTargetPool") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}/target-pools/{targetPoolName}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"targetPoolName"+"}", url.PathEscape(parameterValueToString(r.targetPoolName, "targetPoolName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateTargetPoolPayload == nil { - return localVarReturnValue, reportError("updateTargetPoolPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "*/*"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateTargetPoolPayload - 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 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 - } - 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 - } - - 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 -} diff --git a/services/alb/v2beta2api/api_default_mock.go b/services/alb/v2beta2api/api_default_mock.go deleted file mode 100644 index 2b631296e..000000000 --- a/services/alb/v2beta2api/api_default_mock.go +++ /dev/null @@ -1,316 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "context" -) - -// assert the implementation matches the interface -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 { - // Deprecated: CreateCredentialsExecuteMock can be populated to implement the behavior of the CreateCredentialsExecute function of this mock - CreateCredentialsExecuteMock *func(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) - // Deprecated: CreateLoadBalancerExecuteMock can be populated to implement the behavior of the CreateLoadBalancerExecute function of this mock - CreateLoadBalancerExecuteMock *func(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) - // Deprecated: DeleteCredentialsExecuteMock can be populated to implement the behavior of the DeleteCredentialsExecute function of this mock - DeleteCredentialsExecuteMock *func(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) - // Deprecated: DeleteLoadBalancerExecuteMock can be populated to implement the behavior of the DeleteLoadBalancerExecute function of this mock - DeleteLoadBalancerExecuteMock *func(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) - // Deprecated: GetCredentialsExecuteMock can be populated to implement the behavior of the GetCredentialsExecute function of this mock - GetCredentialsExecuteMock *func(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) - // Deprecated: GetLoadBalancerExecuteMock can be populated to implement the behavior of the GetLoadBalancerExecute function of this mock - GetLoadBalancerExecuteMock *func(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) - // Deprecated: GetQuotaExecuteMock can be populated to implement the behavior of the GetQuotaExecute function of this mock - GetQuotaExecuteMock *func(r ApiGetQuotaRequest) (*GetQuotaResponse, error) - // Deprecated: ListCredentialsExecuteMock can be populated to implement the behavior of the ListCredentialsExecute function of this mock - ListCredentialsExecuteMock *func(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) - // Deprecated: ListLoadBalancersExecuteMock can be populated to implement the behavior of the ListLoadBalancersExecute function of this mock - ListLoadBalancersExecuteMock *func(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) - // Deprecated: ListPlansExecuteMock can be populated to implement the behavior of the ListPlansExecute function of this mock - ListPlansExecuteMock *func(r ApiListPlansRequest) (*ListPlansResponse, error) - // Deprecated: UpdateCredentialsExecuteMock can be populated to implement the behavior of the UpdateCredentialsExecute function of this mock - UpdateCredentialsExecuteMock *func(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) - // Deprecated: UpdateLoadBalancerExecuteMock can be populated to implement the behavior of the UpdateLoadBalancerExecute function of this mock - UpdateLoadBalancerExecuteMock *func(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) - // Deprecated: UpdateTargetPoolExecuteMock can be populated to implement the behavior of the UpdateTargetPoolExecute function of this mock - UpdateTargetPoolExecuteMock *func(r ApiUpdateTargetPoolRequest) (*TargetPool, error) -} - -// Deprecated -func (a DefaultAPIServiceMock) CreateCredentials(ctx context.Context, projectId string, region string) ApiCreateCredentialsRequest { - return ApiCreateCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: CreateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateCredentialsExecute(r ApiCreateCredentialsRequest) (*CreateCredentialsResponse, error) { - if a.CreateCredentialsExecuteMock == nil { - var localVarReturnValue *CreateCredentialsResponse - return localVarReturnValue, nil - } - - return (*a.CreateCredentialsExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) CreateLoadBalancer(ctx context.Context, projectId string, region string) ApiCreateLoadBalancerRequest { - return ApiCreateLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: CreateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) CreateLoadBalancerExecute(r ApiCreateLoadBalancerRequest) (*LoadBalancer, error) { - if a.CreateLoadBalancerExecuteMock == nil { - var localVarReturnValue *LoadBalancer - return localVarReturnValue, nil - } - - return (*a.CreateLoadBalancerExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) DeleteCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiDeleteCredentialsRequest { - return ApiDeleteCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: DeleteCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteCredentialsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteCredentialsExecute(r ApiDeleteCredentialsRequest) (map[string]interface{}, error) { - if a.DeleteCredentialsExecuteMock == nil { - var localVarReturnValue map[string]interface{} - return localVarReturnValue, nil - } - - return (*a.DeleteCredentialsExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) DeleteLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiDeleteLoadBalancerRequest { - return ApiDeleteLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: DeleteLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) DeleteLoadBalancerExecute(r ApiDeleteLoadBalancerRequest) (map[string]interface{}, error) { - if a.DeleteLoadBalancerExecuteMock == nil { - var localVarReturnValue map[string]interface{} - return localVarReturnValue, nil - } - - return (*a.DeleteLoadBalancerExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) GetCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiGetCredentialsRequest { - return ApiGetCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: GetCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetCredentialsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetCredentialsExecute(r ApiGetCredentialsRequest) (*GetCredentialsResponse, error) { - if a.GetCredentialsExecuteMock == nil { - var localVarReturnValue *GetCredentialsResponse - return localVarReturnValue, nil - } - - return (*a.GetCredentialsExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) GetLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiGetLoadBalancerRequest { - return ApiGetLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: GetLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) GetLoadBalancerExecute(r ApiGetLoadBalancerRequest) (*LoadBalancer, error) { - if a.GetLoadBalancerExecuteMock == nil { - var localVarReturnValue *LoadBalancer - return localVarReturnValue, nil - } - - return (*a.GetLoadBalancerExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) GetQuota(ctx context.Context, projectId string, region string) ApiGetQuotaRequest { - return ApiGetQuotaRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: 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) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListCredentials(ctx context.Context, projectId string, region string) ApiListCredentialsRequest { - return ApiListCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: ListCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCredentialsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListCredentialsExecute(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) { - if a.ListCredentialsExecuteMock == nil { - var localVarReturnValue *ListCredentialsResponse - return localVarReturnValue, nil - } - - return (*a.ListCredentialsExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListLoadBalancers(ctx context.Context, projectId string, region string) ApiListLoadBalancersRequest { - return ApiListLoadBalancersRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - } -} - -// Deprecated: ListLoadBalancersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListLoadBalancersExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListLoadBalancersExecute(r ApiListLoadBalancersRequest) (*ListLoadBalancersResponse, error) { - if a.ListLoadBalancersExecuteMock == nil { - var localVarReturnValue *ListLoadBalancersResponse - return localVarReturnValue, nil - } - - return (*a.ListLoadBalancersExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListPlans(ctx context.Context, region string) ApiListPlansRequest { - return ApiListPlansRequest{ - ApiService: a, - ctx: ctx, - region: region, - } -} - -// Deprecated: ListPlansExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPlansExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListPlansExecute(r ApiListPlansRequest) (*ListPlansResponse, error) { - if a.ListPlansExecuteMock == nil { - var localVarReturnValue *ListPlansResponse - return localVarReturnValue, nil - } - - return (*a.ListPlansExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) UpdateCredentials(ctx context.Context, projectId string, region string, credentialsRef string) ApiUpdateCredentialsRequest { - return ApiUpdateCredentialsRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - credentialsRef: credentialsRef, - } -} - -// Deprecated: UpdateCredentialsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateCredentialsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateCredentialsExecute(r ApiUpdateCredentialsRequest) (*UpdateCredentialsResponse, error) { - if a.UpdateCredentialsExecuteMock == nil { - var localVarReturnValue *UpdateCredentialsResponse - return localVarReturnValue, nil - } - - return (*a.UpdateCredentialsExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) UpdateLoadBalancer(ctx context.Context, projectId string, region string, name string) ApiUpdateLoadBalancerRequest { - return ApiUpdateLoadBalancerRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - } -} - -// Deprecated: UpdateLoadBalancerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateLoadBalancerExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateLoadBalancerExecute(r ApiUpdateLoadBalancerRequest) (*LoadBalancer, error) { - if a.UpdateLoadBalancerExecuteMock == nil { - var localVarReturnValue *LoadBalancer - return localVarReturnValue, nil - } - - return (*a.UpdateLoadBalancerExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) UpdateTargetPool(ctx context.Context, projectId string, region string, name string, targetPoolName string) ApiUpdateTargetPoolRequest { - return ApiUpdateTargetPoolRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - region: region, - name: name, - targetPoolName: targetPoolName, - } -} - -// Deprecated: UpdateTargetPoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateTargetPoolExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) UpdateTargetPoolExecute(r ApiUpdateTargetPoolRequest) (*TargetPool, error) { - if a.UpdateTargetPoolExecuteMock == nil { - var localVarReturnValue *TargetPool - return localVarReturnValue, nil - } - - return (*a.UpdateTargetPoolExecuteMock)(r) -} diff --git a/services/alb/v2beta2api/client.go b/services/alb/v2beta2api/client.go deleted file mode 100644 index 6750ecdcc..000000000 --- a/services/alb/v2beta2api/client.go +++ /dev/null @@ -1,658 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2beta2api - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "github.com/stackitcloud/stackit-sdk-go/core/auth" - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -var ( - JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) - XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT Application Load Balancer API API v2beta2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultAPI DefaultAPI -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { - cfg := NewConfiguration() - - for _, option := range opts { - err := option(cfg) - if err != nil { - return nil, fmt.Errorf("configuring the client: %w", err) - } - } - - err := config.ConfigureRegion(cfg) - if err != nil { - return nil, fmt.Errorf("configuring region: %w", err) - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultAPI = (*DefaultAPIService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { - return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) - } - - return fmt.Sprintf("%v", obj) - } - var param, ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap, err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i := 0; i < lenIndValue; i++ { - var arrayValue = indValue.Index(i) - var keyPrefixForCollectionType = keyPrefix - if style == "deepObject" { - keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) - } - return - - case reflect.Map: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - iter := indValue.MapRange() - for iter.Next() { - k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } - - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *config.Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if XmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if JsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if JsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if XmlCheck.MatchString(contentType) { - var bs []byte - bs, err = xml.Marshal(body) - if err == nil { - bodyBuf.Write(bs) - } - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/services/alb/v2beta2api/configuration.go b/services/alb/v2beta2api/configuration.go deleted file mode 100644 index 1ee9e8108..000000000 --- a/services/alb/v2beta2api/configuration.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2beta2api - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *config.Configuration { - cfg := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "stackit-sdk-go/alb", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://alb.api.stackit.cloud", - Description: "No description provided", - Variables: map[string]config.ServerVariable{ - "region": { - Description: "No description provided", - DefaultValue: "global", - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - return cfg -} diff --git a/services/alb/v2beta2api/model_active_health_check.go b/services/alb/v2beta2api/model_active_health_check.go deleted file mode 100644 index a7e37974b..000000000 --- a/services/alb/v2beta2api/model_active_health_check.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActiveHealthCheck{} - -// ActiveHealthCheck struct for ActiveHealthCheck -type ActiveHealthCheck struct { - // Healthy threshold of the health checking - HealthyThreshold *int32 `json:"healthyThreshold,omitempty"` - HttpHealthChecks *HttpHealthChecks `json:"httpHealthChecks,omitempty"` - // Interval duration of health checking in seconds - Interval *string `json:"interval,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` - // Interval duration threshold of the health checking in seconds - IntervalJitter *string `json:"intervalJitter,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` - // Active health checking timeout duration in seconds - Timeout *string `json:"timeout,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` - // Unhealthy threshold of the health checking - UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ActiveHealthCheck ActiveHealthCheck - -// NewActiveHealthCheck instantiates a new ActiveHealthCheck 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 NewActiveHealthCheck() *ActiveHealthCheck { - this := ActiveHealthCheck{} - return &this -} - -// NewActiveHealthCheckWithDefaults instantiates a new ActiveHealthCheck 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 NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { - this := ActiveHealthCheck{} - return &this -} - -// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetHealthyThreshold() int32 { - if o == nil || IsNil(o.HealthyThreshold) { - var ret int32 - return ret - } - return *o.HealthyThreshold -} - -// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int32, bool) { - if o == nil || IsNil(o.HealthyThreshold) { - return nil, false - } - return o.HealthyThreshold, true -} - -// HasHealthyThreshold returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasHealthyThreshold() bool { - if o != nil && !IsNil(o.HealthyThreshold) { - return true - } - - return false -} - -// SetHealthyThreshold gets a reference to the given int32 and assigns it to the HealthyThreshold field. -func (o *ActiveHealthCheck) SetHealthyThreshold(v int32) { - o.HealthyThreshold = &v -} - -// GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetHttpHealthChecks() HttpHealthChecks { - if o == nil || IsNil(o.HttpHealthChecks) { - var ret HttpHealthChecks - return ret - } - return *o.HttpHealthChecks -} - -// GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (*HttpHealthChecks, bool) { - if o == nil || IsNil(o.HttpHealthChecks) { - return nil, false - } - return o.HttpHealthChecks, true -} - -// HasHttpHealthChecks returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasHttpHealthChecks() bool { - if o != nil && !IsNil(o.HttpHealthChecks) { - return true - } - - return false -} - -// SetHttpHealthChecks gets a reference to the given HttpHealthChecks and assigns it to the HttpHealthChecks field. -func (o *ActiveHealthCheck) SetHttpHealthChecks(v HttpHealthChecks) { - o.HttpHealthChecks = &v -} - -// GetInterval returns the Interval field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetInterval() string { - if o == nil || IsNil(o.Interval) { - var ret string - return ret - } - return *o.Interval -} - -// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalOk() (*string, bool) { - if o == nil || IsNil(o.Interval) { - return nil, false - } - return o.Interval, true -} - -// HasInterval returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasInterval() bool { - if o != nil && !IsNil(o.Interval) { - return true - } - - return false -} - -// SetInterval gets a reference to the given string and assigns it to the Interval field. -func (o *ActiveHealthCheck) SetInterval(v string) { - o.Interval = &v -} - -// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetIntervalJitter() string { - if o == nil || IsNil(o.IntervalJitter) { - var ret string - return ret - } - return *o.IntervalJitter -} - -// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalJitterOk() (*string, bool) { - if o == nil || IsNil(o.IntervalJitter) { - return nil, false - } - return o.IntervalJitter, true -} - -// HasIntervalJitter returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasIntervalJitter() bool { - if o != nil && !IsNil(o.IntervalJitter) { - return true - } - - return false -} - -// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. -func (o *ActiveHealthCheck) SetIntervalJitter(v string) { - o.IntervalJitter = &v -} - -// GetTimeout returns the Timeout field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetTimeout() string { - if o == nil || IsNil(o.Timeout) { - var ret string - return ret - } - return *o.Timeout -} - -// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetTimeoutOk() (*string, bool) { - if o == nil || IsNil(o.Timeout) { - return nil, false - } - return o.Timeout, true -} - -// HasTimeout returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasTimeout() bool { - if o != nil && !IsNil(o.Timeout) { - return true - } - - return false -} - -// SetTimeout gets a reference to the given string and assigns it to the Timeout field. -func (o *ActiveHealthCheck) SetTimeout(v string) { - o.Timeout = &v -} - -// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetUnhealthyThreshold() int32 { - if o == nil || IsNil(o.UnhealthyThreshold) { - var ret int32 - return ret - } - return *o.UnhealthyThreshold -} - -// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int32, bool) { - if o == nil || IsNil(o.UnhealthyThreshold) { - return nil, false - } - return o.UnhealthyThreshold, true -} - -// HasUnhealthyThreshold returns a boolean if a field has been set. -func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { - if o != nil && !IsNil(o.UnhealthyThreshold) { - return true - } - - return false -} - -// SetUnhealthyThreshold gets a reference to the given int32 and assigns it to the UnhealthyThreshold field. -func (o *ActiveHealthCheck) SetUnhealthyThreshold(v int32) { - o.UnhealthyThreshold = &v -} - -func (o ActiveHealthCheck) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.HealthyThreshold) { - toSerialize["healthyThreshold"] = o.HealthyThreshold - } - if !IsNil(o.HttpHealthChecks) { - toSerialize["httpHealthChecks"] = o.HttpHealthChecks - } - if !IsNil(o.Interval) { - toSerialize["interval"] = o.Interval - } - if !IsNil(o.IntervalJitter) { - toSerialize["intervalJitter"] = o.IntervalJitter - } - if !IsNil(o.Timeout) { - toSerialize["timeout"] = o.Timeout - } - if !IsNil(o.UnhealthyThreshold) { - toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ActiveHealthCheck) UnmarshalJSON(data []byte) (err error) { - varActiveHealthCheck := _ActiveHealthCheck{} - - err = json.Unmarshal(data, &varActiveHealthCheck) - - if err != nil { - return err - } - - *o = ActiveHealthCheck(varActiveHealthCheck) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "healthyThreshold") - delete(additionalProperties, "httpHealthChecks") - delete(additionalProperties, "interval") - delete(additionalProperties, "intervalJitter") - delete(additionalProperties, "timeout") - delete(additionalProperties, "unhealthyThreshold") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableActiveHealthCheck struct { - value *ActiveHealthCheck - isSet bool -} - -func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck { - return v.value -} - -func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) { - v.value = val - v.isSet = true -} - -func (v NullableActiveHealthCheck) IsSet() bool { - return v.isSet -} - -func (v *NullableActiveHealthCheck) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck { - return &NullableActiveHealthCheck{value: val, isSet: true} -} - -func (v NullableActiveHealthCheck) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_certificate_config.go b/services/alb/v2beta2api/model_certificate_config.go deleted file mode 100644 index ab10e9df3..000000000 --- a/services/alb/v2beta2api/model_certificate_config.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CertificateConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CertificateConfig{} - -// CertificateConfig TLS termination certificate configuration. -type CertificateConfig struct { - // Certificate IDs for TLS termination. - CertificateIds []string `json:"certificateIds,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CertificateConfig CertificateConfig - -// NewCertificateConfig instantiates a new CertificateConfig 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 NewCertificateConfig() *CertificateConfig { - this := CertificateConfig{} - return &this -} - -// NewCertificateConfigWithDefaults instantiates a new CertificateConfig 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 NewCertificateConfigWithDefaults() *CertificateConfig { - this := CertificateConfig{} - return &this -} - -// GetCertificateIds returns the CertificateIds field value if set, zero value otherwise. -func (o *CertificateConfig) GetCertificateIds() []string { - if o == nil || IsNil(o.CertificateIds) { - var ret []string - return ret - } - return o.CertificateIds -} - -// GetCertificateIdsOk returns a tuple with the CertificateIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CertificateConfig) GetCertificateIdsOk() ([]string, bool) { - if o == nil || IsNil(o.CertificateIds) { - return nil, false - } - return o.CertificateIds, true -} - -// HasCertificateIds returns a boolean if a field has been set. -func (o *CertificateConfig) HasCertificateIds() bool { - if o != nil && !IsNil(o.CertificateIds) { - return true - } - - return false -} - -// SetCertificateIds gets a reference to the given []string and assigns it to the CertificateIds field. -func (o *CertificateConfig) SetCertificateIds(v []string) { - o.CertificateIds = v -} - -func (o CertificateConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CertificateConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CertificateIds) { - toSerialize["certificateIds"] = o.CertificateIds - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CertificateConfig) UnmarshalJSON(data []byte) (err error) { - varCertificateConfig := _CertificateConfig{} - - err = json.Unmarshal(data, &varCertificateConfig) - - if err != nil { - return err - } - - *o = CertificateConfig(varCertificateConfig) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "certificateIds") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCertificateConfig struct { - value *CertificateConfig - isSet bool -} - -func (v NullableCertificateConfig) Get() *CertificateConfig { - return v.value -} - -func (v *NullableCertificateConfig) Set(val *CertificateConfig) { - v.value = val - v.isSet = true -} - -func (v NullableCertificateConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableCertificateConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCertificateConfig(val *CertificateConfig) *NullableCertificateConfig { - return &NullableCertificateConfig{value: val, isSet: true} -} - -func (v NullableCertificateConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCertificateConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_cookie_persistence.go b/services/alb/v2beta2api/model_cookie_persistence.go deleted file mode 100644 index 60f7ab77f..000000000 --- a/services/alb/v2beta2api/model_cookie_persistence.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CookiePersistence type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CookiePersistence{} - -// CookiePersistence struct for CookiePersistence -type CookiePersistence struct { - // Cookie is the name of the cookie to use. - Name *string `json:"name,omitempty"` - // TTL specifies the time-to-live for the cookie. The default value is 0s, and it acts as a session cookie, expiring when the client session ends. - Ttl *string `json:"ttl,omitempty" validate:"regexp=^-?(?:0|[1-9][0-9]{0,11})(?:\\\\.[0-9]{1,9})?s$"` - AdditionalProperties map[string]interface{} -} - -type _CookiePersistence CookiePersistence - -// NewCookiePersistence instantiates a new CookiePersistence 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 NewCookiePersistence() *CookiePersistence { - this := CookiePersistence{} - return &this -} - -// NewCookiePersistenceWithDefaults instantiates a new CookiePersistence 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 NewCookiePersistenceWithDefaults() *CookiePersistence { - this := CookiePersistence{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CookiePersistence) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CookiePersistence) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *CookiePersistence) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CookiePersistence) SetName(v string) { - o.Name = &v -} - -// GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *CookiePersistence) GetTtl() string { - if o == nil || IsNil(o.Ttl) { - var ret string - return ret - } - return *o.Ttl -} - -// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CookiePersistence) GetTtlOk() (*string, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true -} - -// HasTtl returns a boolean if a field has been set. -func (o *CookiePersistence) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false -} - -// SetTtl gets a reference to the given string and assigns it to the Ttl field. -func (o *CookiePersistence) SetTtl(v string) { - o.Ttl = &v -} - -func (o CookiePersistence) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CookiePersistence) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CookiePersistence) UnmarshalJSON(data []byte) (err error) { - varCookiePersistence := _CookiePersistence{} - - err = json.Unmarshal(data, &varCookiePersistence) - - if err != nil { - return err - } - - *o = CookiePersistence(varCookiePersistence) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "name") - delete(additionalProperties, "ttl") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCookiePersistence struct { - value *CookiePersistence - isSet bool -} - -func (v NullableCookiePersistence) Get() *CookiePersistence { - return v.value -} - -func (v *NullableCookiePersistence) Set(val *CookiePersistence) { - v.value = val - v.isSet = true -} - -func (v NullableCookiePersistence) IsSet() bool { - return v.isSet -} - -func (v *NullableCookiePersistence) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCookiePersistence(val *CookiePersistence) *NullableCookiePersistence { - return &NullableCookiePersistence{value: val, isSet: true} -} - -func (v NullableCookiePersistence) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCookiePersistence) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_create_credentials_payload.go b/services/alb/v2beta2api/model_create_credentials_payload.go deleted file mode 100644 index 5111c04b9..000000000 --- a/services/alb/v2beta2api/model_create_credentials_payload.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsPayload{} - -// CreateCredentialsPayload struct for CreateCredentialsPayload -type CreateCredentialsPayload struct { - // Credential name - DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` - // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. - Password *string `json:"password,omitempty"` - // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. - Username *string `json:"username,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreateCredentialsPayload CreateCredentialsPayload - -// NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayload() *CreateCredentialsPayload { - this := CreateCredentialsPayload{} - return &this -} - -// NewCreateCredentialsPayloadWithDefaults instantiates a new CreateCredentialsPayload 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 NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { - this := CreateCredentialsPayload{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *CreateCredentialsPayload) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CreateCredentialsPayload) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetPassword() string { - if o == nil || IsNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *CreateCredentialsPayload) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *CreateCredentialsPayload) SetPassword(v string) { - o.Password = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *CreateCredentialsPayload) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *CreateCredentialsPayload) SetUsername(v string) { - o.Username = &v -} - -func (o CreateCredentialsPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName - } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateCredentialsPayload) UnmarshalJSON(data []byte) (err error) { - varCreateCredentialsPayload := _CreateCredentialsPayload{} - - err = json.Unmarshal(data, &varCreateCredentialsPayload) - - if err != nil { - return err - } - - *o = CreateCredentialsPayload(varCreateCredentialsPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "displayName") - delete(additionalProperties, "password") - delete(additionalProperties, "username") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateCredentialsPayload struct { - value *CreateCredentialsPayload - isSet bool -} - -func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload { - return v.value -} - -func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateCredentialsPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateCredentialsPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload { - return &NullableCreateCredentialsPayload{value: val, isSet: true} -} - -func (v NullableCreateCredentialsPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_create_credentials_response.go b/services/alb/v2beta2api/model_create_credentials_response.go deleted file mode 100644 index d4765c149..000000000 --- a/services/alb/v2beta2api/model_create_credentials_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateCredentialsResponse{} - -// CreateCredentialsResponse struct for CreateCredentialsResponse -type CreateCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreateCredentialsResponse CreateCredentialsResponse - -// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponse() *CreateCredentialsResponse { - this := CreateCredentialsResponse{} - return &this -} - -// NewCreateCredentialsResponseWithDefaults instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { - this := CreateCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -func (o *CreateCredentialsResponse) GetCredential() CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret CredentialsResponse - return ret - } - return *o.Credential -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true -} - -// HasCredential returns a boolean if a field has been set. -func (o *CreateCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *CreateCredentialsResponse) SetCredential(v CredentialsResponse) { - o.Credential = &v -} - -func (o CreateCredentialsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateCredentialsResponse) UnmarshalJSON(data []byte) (err error) { - varCreateCredentialsResponse := _CreateCredentialsResponse{} - - err = json.Unmarshal(data, &varCreateCredentialsResponse) - - if err != nil { - return err - } - - *o = CreateCredentialsResponse(varCreateCredentialsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credential") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateCredentialsResponse struct { - value *CreateCredentialsResponse - isSet bool -} - -func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { - return v.value -} - -func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreateCredentialsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateCredentialsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { - return &NullableCreateCredentialsResponse{value: val, isSet: true} -} - -func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_create_load_balancer_payload.go b/services/alb/v2beta2api/model_create_load_balancer_payload.go deleted file mode 100644 index fc59d60f8..000000000 --- a/services/alb/v2beta2api/model_create_load_balancer_payload.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateLoadBalancerPayload{} - -// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload -type CreateLoadBalancerPayload struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a application load balancer has. - Errors []LoadBalancerError `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **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"` - // There is a maximum listener count of 20. - Listeners []Listener `json:"listeners,omitempty"` - // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks []Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - // Region of the LoadBalancer. - Region *string `json:"region,omitempty"` - Status *CreateLoadBalancerPayloadStatus `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools []TargetPool `json:"targetPools,omitempty"` - // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - TargetSecurityGroup *SecurityGroup `json:"targetSecurityGroup,omitempty"` - // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreateLoadBalancerPayload CreateLoadBalancerPayload - -// NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayload() *CreateLoadBalancerPayload { - this := CreateLoadBalancerPayload{} - return &this -} - -// NewCreateLoadBalancerPayloadWithDefaults instantiates a new CreateLoadBalancerPayload 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 NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { - this := CreateLoadBalancerPayload{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() bool { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - var ret bool - return ret - } - return *o.DisableTargetSecurityGroupAssignment -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - return nil, false - } - return o.DisableTargetSecurityGroupAssignment, true -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { - if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { - return true - } - - return false -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -func (o *CreateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v bool) { - o.DisableTargetSecurityGroupAssignment = &v -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetErrors() []LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret []LoadBalancerError - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *CreateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { - o.Errors = v -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetExternalAddress() string { - if o == nil || IsNil(o.ExternalAddress) { - var ret string - return ret - } - return *o.ExternalAddress -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true -} - -// HasExternalAddress returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *CreateLoadBalancerPayload) SetExternalAddress(v string) { - o.ExternalAddress = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetLabels() map[string]string { - if o == nil || IsNil(o.Labels) { - var ret map[string]string - return ret - } - return *o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *CreateLoadBalancerPayload) SetLabels(v map[string]string) { - o.Labels = &v -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetListeners() []Listener { - if o == nil || IsNil(o.Listeners) { - var ret []Listener - return ret - } - return o.Listeners -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true -} - -// HasListeners returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *CreateLoadBalancerPayload) SetListeners(v []Listener) { - o.Listeners = v -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.LoadBalancerSecurityGroup -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - return nil, false - } - return o.LoadBalancerSecurityGroup, true -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { - if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { - return true - } - - return false -} - -// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -func (o *CreateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v SecurityGroup) { - o.LoadBalancerSecurityGroup = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CreateLoadBalancerPayload) SetName(v string) { - o.Name = &v -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetNetworks() []Network { - if o == nil || IsNil(o.Networks) { - var ret []Network - return ret - } - return o.Networks -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true -} - -// HasNetworks returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *CreateLoadBalancerPayload) SetNetworks(v []Network) { - o.Networks = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetOptions() LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret LoadBalancerOptions - return ret - } - return *o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *CreateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { - o.Options = &v -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPlanId() string { - if o == nil || IsNil(o.PlanId) { - var ret string - return ret - } - return *o.PlanId -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true -} - -// HasPlanId returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasPlanId() bool { - if o != nil && !IsNil(o.PlanId) { - return true - } - - return false -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -func (o *CreateLoadBalancerPayload) SetPlanId(v string) { - o.PlanId = &v -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPrivateAddress() string { - if o == nil || IsNil(o.PrivateAddress) { - var ret string - return ret - } - return *o.PrivateAddress -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true -} - -// HasPrivateAddress returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *CreateLoadBalancerPayload) SetPrivateAddress(v string) { - o.PrivateAddress = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetRegion(v string) { - o.Region = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetStatus() CreateLoadBalancerPayloadStatus { - if o == nil || IsNil(o.Status) { - var ret CreateLoadBalancerPayloadStatus - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetStatusOk() (*CreateLoadBalancerPayloadStatus, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given CreateLoadBalancerPayloadStatus and assigns it to the Status field. -func (o *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadStatus) { - o.Status = &v -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetTargetPools() []TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret []TargetPool - return ret - } - return o.TargetPools -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true -} - -// HasTargetPools returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *CreateLoadBalancerPayload) SetTargetPools(v []TargetPool) { - o.TargetPools = v -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.TargetSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.TargetSecurityGroup -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.TargetSecurityGroup) { - return nil, false - } - return o.TargetSecurityGroup, true -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasTargetSecurityGroup() bool { - if o != nil && !IsNil(o.TargetSecurityGroup) { - return true - } - - return false -} - -// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. -func (o *CreateLoadBalancerPayload) SetTargetSecurityGroup(v SecurityGroup) { - o.TargetSecurityGroup = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *CreateLoadBalancerPayload) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *CreateLoadBalancerPayload) SetVersion(v string) { - o.Version = &v -} - -func (o CreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisableTargetSecurityGroupAssignment) { - toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment - } - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors - } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners - } - if !IsNil(o.LoadBalancerSecurityGroup) { - toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId - } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools - } - if !IsNil(o.TargetSecurityGroup) { - toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateLoadBalancerPayload) UnmarshalJSON(data []byte) (err error) { - varCreateLoadBalancerPayload := _CreateLoadBalancerPayload{} - - err = json.Unmarshal(data, &varCreateLoadBalancerPayload) - - if err != nil { - return err - } - - *o = CreateLoadBalancerPayload(varCreateLoadBalancerPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "disableTargetSecurityGroupAssignment") - delete(additionalProperties, "errors") - delete(additionalProperties, "externalAddress") - delete(additionalProperties, "labels") - delete(additionalProperties, "listeners") - delete(additionalProperties, "loadBalancerSecurityGroup") - delete(additionalProperties, "name") - delete(additionalProperties, "networks") - delete(additionalProperties, "options") - delete(additionalProperties, "planId") - delete(additionalProperties, "privateAddress") - delete(additionalProperties, "region") - delete(additionalProperties, "status") - delete(additionalProperties, "targetPools") - delete(additionalProperties, "targetSecurityGroup") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateLoadBalancerPayload struct { - value *CreateLoadBalancerPayload - isSet bool -} - -func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload { - return v.value -} - -func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateLoadBalancerPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateLoadBalancerPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload { - return &NullableCreateLoadBalancerPayload{value: val, isSet: true} -} - -func (v NullableCreateLoadBalancerPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_create_load_balancer_payload_status.go b/services/alb/v2beta2api/model_create_load_balancer_payload_status.go deleted file mode 100644 index 5a11b1378..000000000 --- a/services/alb/v2beta2api/model_create_load_balancer_payload_status.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// CreateLoadBalancerPayloadStatus the model 'CreateLoadBalancerPayloadStatus' -type CreateLoadBalancerPayloadStatus string - -// List of CreateLoadBalancerPayload_status -const ( - CREATELOADBALANCERPAYLOADSTATUS_STATUS_UNSPECIFIED CreateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - CREATELOADBALANCERPAYLOADSTATUS_STATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING" - CREATELOADBALANCERPAYLOADSTATUS_STATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY" - CREATELOADBALANCERPAYLOADSTATUS_STATUS_ERROR CreateLoadBalancerPayloadStatus = "STATUS_ERROR" - CREATELOADBALANCERPAYLOADSTATUS_STATUS_TERMINATING CreateLoadBalancerPayloadStatus = "STATUS_TERMINATING" - CREATELOADBALANCERPAYLOADSTATUS_UNKNOWN_DEFAULT_OPEN_API CreateLoadBalancerPayloadStatus = "unknown_default_open_api" -) - -// All allowed values of CreateLoadBalancerPayloadStatus enum -var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", - "unknown_default_open_api", -} - -func (v *CreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := CreateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = CREATELOADBALANCERPAYLOADSTATUS_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewCreateLoadBalancerPayloadStatusFromValue returns a pointer to a valid CreateLoadBalancerPayloadStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewCreateLoadBalancerPayloadStatusFromValue(v string) (*CreateLoadBalancerPayloadStatus, error) { - ev := CreateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CreateLoadBalancerPayloadStatus: valid values are %v", v, AllowedCreateLoadBalancerPayloadStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v CreateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to CreateLoadBalancerPayload_status value -func (v CreateLoadBalancerPayloadStatus) Ptr() *CreateLoadBalancerPayloadStatus { - return &v -} - -type NullableCreateLoadBalancerPayloadStatus struct { - value *CreateLoadBalancerPayloadStatus - isSet bool -} - -func (v NullableCreateLoadBalancerPayloadStatus) Get() *CreateLoadBalancerPayloadStatus { - return v.value -} - -func (v *NullableCreateLoadBalancerPayloadStatus) Set(val *CreateLoadBalancerPayloadStatus) { - v.value = val - v.isSet = true -} - -func (v NullableCreateLoadBalancerPayloadStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateLoadBalancerPayloadStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateLoadBalancerPayloadStatus(val *CreateLoadBalancerPayloadStatus) *NullableCreateLoadBalancerPayloadStatus { - return &NullableCreateLoadBalancerPayloadStatus{value: val, isSet: true} -} - -func (v NullableCreateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_credentials_response.go b/services/alb/v2beta2api/model_credentials_response.go deleted file mode 100644 index ac8812089..000000000 --- a/services/alb/v2beta2api/model_credentials_response.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CredentialsResponse{} - -// CredentialsResponse struct for CredentialsResponse -type CredentialsResponse struct { - // The credentials reference can be used for observability of the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` - // Credential name - DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // Region of the Credential - Region *string `json:"region,omitempty"` - // The username used for the STACKIT Observability instance - Username *string `json:"username,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CredentialsResponse CredentialsResponse - -// NewCredentialsResponse instantiates a new CredentialsResponse 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 NewCredentialsResponse() *CredentialsResponse { - this := CredentialsResponse{} - return &this -} - -// NewCredentialsResponseWithDefaults instantiates a new CredentialsResponse 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 NewCredentialsResponseWithDefaults() *CredentialsResponse { - this := CredentialsResponse{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *CredentialsResponse) GetCredentialsRef() string { - if o == nil || IsNil(o.CredentialsRef) { - var ret string - return ret - } - return *o.CredentialsRef -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true -} - -// HasCredentialsRef returns a boolean if a field has been set. -func (o *CredentialsResponse) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *CredentialsResponse) SetCredentialsRef(v string) { - o.CredentialsRef = &v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CredentialsResponse) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *CredentialsResponse) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CredentialsResponse) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *CredentialsResponse) 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 *CredentialsResponse) 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 *CredentialsResponse) 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 *CredentialsResponse) SetRegion(v string) { - o.Region = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *CredentialsResponse) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *CredentialsResponse) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *CredentialsResponse) SetUsername(v string) { - o.Username = &v -} - -func (o CredentialsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef - } - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CredentialsResponse) UnmarshalJSON(data []byte) (err error) { - varCredentialsResponse := _CredentialsResponse{} - - err = json.Unmarshal(data, &varCredentialsResponse) - - if err != nil { - return err - } - - *o = CredentialsResponse(varCredentialsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credentialsRef") - delete(additionalProperties, "displayName") - delete(additionalProperties, "region") - delete(additionalProperties, "username") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCredentialsResponse struct { - value *CredentialsResponse - isSet bool -} - -func (v NullableCredentialsResponse) Get() *CredentialsResponse { - return v.value -} - -func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCredentialsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCredentialsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse { - return &NullableCredentialsResponse{value: val, isSet: true} -} - -func (v NullableCredentialsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_get_credentials_response.go b/services/alb/v2beta2api/model_get_credentials_response.go deleted file mode 100644 index 04f5430b0..000000000 --- a/services/alb/v2beta2api/model_get_credentials_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCredentialsResponse{} - -// GetCredentialsResponse struct for GetCredentialsResponse -type GetCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetCredentialsResponse GetCredentialsResponse - -// NewGetCredentialsResponse instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponse() *GetCredentialsResponse { - this := GetCredentialsResponse{} - return &this -} - -// NewGetCredentialsResponseWithDefaults instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { - this := GetCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -func (o *GetCredentialsResponse) GetCredential() CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret CredentialsResponse - return ret - } - return *o.Credential -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true -} - -// HasCredential returns a boolean if a field has been set. -func (o *GetCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *GetCredentialsResponse) SetCredential(v CredentialsResponse) { - o.Credential = &v -} - -func (o GetCredentialsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetCredentialsResponse) UnmarshalJSON(data []byte) (err error) { - varGetCredentialsResponse := _GetCredentialsResponse{} - - err = json.Unmarshal(data, &varGetCredentialsResponse) - - if err != nil { - return err - } - - *o = GetCredentialsResponse(varGetCredentialsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credential") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetCredentialsResponse struct { - value *GetCredentialsResponse - isSet bool -} - -func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { - return v.value -} - -func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetCredentialsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetCredentialsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { - return &NullableGetCredentialsResponse{value: val, isSet: true} -} - -func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_get_quota_response.go b/services/alb/v2beta2api/model_get_quota_response.go deleted file mode 100644 index 11604288f..000000000 --- a/services/alb/v2beta2api/model_get_quota_response.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -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 { - // The maximum number of load balancing servers in this project. - MaxLoadBalancers *int32 `json:"maxLoadBalancers,omitempty"` - // 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}$"` - // 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 -} - -// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. -func (o *GetQuotaResponse) GetMaxLoadBalancers() int32 { - if o == nil || IsNil(o.MaxLoadBalancers) { - var ret int32 - return ret - } - return *o.MaxLoadBalancers -} - -// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int32, bool) { - if o == nil || IsNil(o.MaxLoadBalancers) { - return nil, false - } - return o.MaxLoadBalancers, true -} - -// HasMaxLoadBalancers returns a boolean if a field has been set. -func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { - if o != nil && !IsNil(o.MaxLoadBalancers) { - return true - } - - return false -} - -// SetMaxLoadBalancers gets a reference to the given int32 and assigns it to the MaxLoadBalancers field. -func (o *GetQuotaResponse) SetMaxLoadBalancers(v int32) { - o.MaxLoadBalancers = &v -} - -// 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 -} - -// 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.MaxLoadBalancers) { - toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers - } - if !IsNil(o.ProjectId) { - toSerialize["projectId"] = o.ProjectId - } - 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, "maxLoadBalancers") - delete(additionalProperties, "projectId") - 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/alb/v2beta2api/model_google_protobuf_any.go b/services/alb/v2beta2api/model_google_protobuf_any.go deleted file mode 100644 index ee56940e2..000000000 --- a/services/alb/v2beta2api/model_google_protobuf_any.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GoogleProtobufAny{} - -// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. -type GoogleProtobufAny struct { - // The type of the serialized message. - Type *string `json:"@type,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GoogleProtobufAny GoogleProtobufAny - -// NewGoogleProtobufAny instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAny() *GoogleProtobufAny { - this := GoogleProtobufAny{} - return &this -} - -// NewGoogleProtobufAnyWithDefaults instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { - this := GoogleProtobufAny{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *GoogleProtobufAny) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GoogleProtobufAny) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *GoogleProtobufAny) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *GoogleProtobufAny) SetType(v string) { - o.Type = &v -} - -func (o GoogleProtobufAny) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["@type"] = o.Type - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GoogleProtobufAny) UnmarshalJSON(data []byte) (err error) { - varGoogleProtobufAny := _GoogleProtobufAny{} - - err = json.Unmarshal(data, &varGoogleProtobufAny) - - if err != nil { - return err - } - - *o = GoogleProtobufAny(varGoogleProtobufAny) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "@type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGoogleProtobufAny struct { - value *GoogleProtobufAny - isSet bool -} - -func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { - return v.value -} - -func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { - v.value = val - v.isSet = true -} - -func (v NullableGoogleProtobufAny) IsSet() bool { - return v.isSet -} - -func (v *NullableGoogleProtobufAny) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { - return &NullableGoogleProtobufAny{value: val, isSet: true} -} - -func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_host_config.go b/services/alb/v2beta2api/model_host_config.go deleted file mode 100644 index b33b61d67..000000000 --- a/services/alb/v2beta2api/model_host_config.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the HostConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HostConfig{} - -// HostConfig struct for HostConfig -type HostConfig struct { - // Hostname to match. Supports wildcards (e.g. *.example.com). - Host *string `json:"host,omitempty"` - // Routing rules under the specified host, matched by path prefix. - Rules []Rule `json:"rules,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _HostConfig HostConfig - -// NewHostConfig instantiates a new HostConfig 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 NewHostConfig() *HostConfig { - this := HostConfig{} - return &this -} - -// NewHostConfigWithDefaults instantiates a new HostConfig 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 NewHostConfigWithDefaults() *HostConfig { - this := HostConfig{} - return &this -} - -// GetHost returns the Host field value if set, zero value otherwise. -func (o *HostConfig) GetHost() string { - if o == nil || IsNil(o.Host) { - var ret string - return ret - } - return *o.Host -} - -// GetHostOk returns a tuple with the Host field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HostConfig) GetHostOk() (*string, bool) { - if o == nil || IsNil(o.Host) { - return nil, false - } - return o.Host, true -} - -// HasHost returns a boolean if a field has been set. -func (o *HostConfig) HasHost() bool { - if o != nil && !IsNil(o.Host) { - return true - } - - return false -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -func (o *HostConfig) SetHost(v string) { - o.Host = &v -} - -// GetRules returns the Rules field value if set, zero value otherwise. -func (o *HostConfig) GetRules() []Rule { - if o == nil || IsNil(o.Rules) { - var ret []Rule - return ret - } - return o.Rules -} - -// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HostConfig) GetRulesOk() ([]Rule, bool) { - if o == nil || IsNil(o.Rules) { - return nil, false - } - return o.Rules, true -} - -// HasRules returns a boolean if a field has been set. -func (o *HostConfig) HasRules() bool { - if o != nil && !IsNil(o.Rules) { - return true - } - - return false -} - -// SetRules gets a reference to the given []Rule and assigns it to the Rules field. -func (o *HostConfig) SetRules(v []Rule) { - o.Rules = v -} - -func (o HostConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HostConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Host) { - toSerialize["host"] = o.Host - } - if !IsNil(o.Rules) { - toSerialize["rules"] = o.Rules - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *HostConfig) UnmarshalJSON(data []byte) (err error) { - varHostConfig := _HostConfig{} - - err = json.Unmarshal(data, &varHostConfig) - - if err != nil { - return err - } - - *o = HostConfig(varHostConfig) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "host") - delete(additionalProperties, "rules") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableHostConfig struct { - value *HostConfig - isSet bool -} - -func (v NullableHostConfig) Get() *HostConfig { - return v.value -} - -func (v *NullableHostConfig) Set(val *HostConfig) { - v.value = val - v.isSet = true -} - -func (v NullableHostConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableHostConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHostConfig(val *HostConfig) *NullableHostConfig { - return &NullableHostConfig{value: val, isSet: true} -} - -func (v NullableHostConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHostConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_http_header.go b/services/alb/v2beta2api/model_http_header.go deleted file mode 100644 index 45c8c9fbd..000000000 --- a/services/alb/v2beta2api/model_http_header.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the HttpHeader type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpHeader{} - -// HttpHeader struct for HttpHeader -type HttpHeader struct { - // Exact match for the header value. - ExactMatch *string `json:"exactMatch,omitempty"` - // Header name. - Name *string `json:"name,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _HttpHeader HttpHeader - -// NewHttpHeader instantiates a new HttpHeader 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 NewHttpHeader() *HttpHeader { - this := HttpHeader{} - return &this -} - -// NewHttpHeaderWithDefaults instantiates a new HttpHeader 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 NewHttpHeaderWithDefaults() *HttpHeader { - this := HttpHeader{} - return &this -} - -// GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *HttpHeader) GetExactMatch() string { - if o == nil || IsNil(o.ExactMatch) { - var ret string - return ret - } - return *o.ExactMatch -} - -// GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHeader) GetExactMatchOk() (*string, bool) { - if o == nil || IsNil(o.ExactMatch) { - return nil, false - } - return o.ExactMatch, true -} - -// HasExactMatch returns a boolean if a field has been set. -func (o *HttpHeader) HasExactMatch() bool { - if o != nil && !IsNil(o.ExactMatch) { - return true - } - - return false -} - -// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *HttpHeader) SetExactMatch(v string) { - o.ExactMatch = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *HttpHeader) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHeader) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *HttpHeader) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *HttpHeader) SetName(v string) { - o.Name = &v -} - -func (o HttpHeader) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HttpHeader) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ExactMatch) { - toSerialize["exactMatch"] = o.ExactMatch - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *HttpHeader) UnmarshalJSON(data []byte) (err error) { - varHttpHeader := _HttpHeader{} - - err = json.Unmarshal(data, &varHttpHeader) - - if err != nil { - return err - } - - *o = HttpHeader(varHttpHeader) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "exactMatch") - delete(additionalProperties, "name") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableHttpHeader struct { - value *HttpHeader - isSet bool -} - -func (v NullableHttpHeader) Get() *HttpHeader { - return v.value -} - -func (v *NullableHttpHeader) Set(val *HttpHeader) { - v.value = val - v.isSet = true -} - -func (v NullableHttpHeader) IsSet() bool { - return v.isSet -} - -func (v *NullableHttpHeader) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHttpHeader(val *HttpHeader) *NullableHttpHeader { - return &NullableHttpHeader{value: val, isSet: true} -} - -func (v NullableHttpHeader) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHttpHeader) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_http_health_checks.go b/services/alb/v2beta2api/model_http_health_checks.go deleted file mode 100644 index 8ed695134..000000000 --- a/services/alb/v2beta2api/model_http_health_checks.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpHealthChecks{} - -// HttpHealthChecks struct for HttpHealthChecks -type HttpHealthChecks struct { - // List of HTTP status codes that indicate a healthy response - OkStatuses []string `json:"okStatuses,omitempty"` - // Path to send the health check request to - Path *string `json:"path,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _HttpHealthChecks HttpHealthChecks - -// NewHttpHealthChecks instantiates a new HttpHealthChecks 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 NewHttpHealthChecks() *HttpHealthChecks { - this := HttpHealthChecks{} - return &this -} - -// NewHttpHealthChecksWithDefaults instantiates a new HttpHealthChecks 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 NewHttpHealthChecksWithDefaults() *HttpHealthChecks { - this := HttpHealthChecks{} - return &this -} - -// GetOkStatuses returns the OkStatuses field value if set, zero value otherwise. -func (o *HttpHealthChecks) GetOkStatuses() []string { - if o == nil || IsNil(o.OkStatuses) { - var ret []string - return ret - } - return o.OkStatuses -} - -// GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetOkStatusesOk() ([]string, bool) { - if o == nil || IsNil(o.OkStatuses) { - return nil, false - } - return o.OkStatuses, true -} - -// HasOkStatuses returns a boolean if a field has been set. -func (o *HttpHealthChecks) HasOkStatuses() bool { - if o != nil && !IsNil(o.OkStatuses) { - return true - } - - return false -} - -// SetOkStatuses gets a reference to the given []string and assigns it to the OkStatuses field. -func (o *HttpHealthChecks) SetOkStatuses(v []string) { - o.OkStatuses = v -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *HttpHealthChecks) GetPath() string { - if o == nil || IsNil(o.Path) { - var ret string - return ret - } - return *o.Path -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetPathOk() (*string, bool) { - if o == nil || IsNil(o.Path) { - return nil, false - } - return o.Path, true -} - -// HasPath returns a boolean if a field has been set. -func (o *HttpHealthChecks) HasPath() bool { - if o != nil && !IsNil(o.Path) { - return true - } - - return false -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -func (o *HttpHealthChecks) SetPath(v string) { - o.Path = &v -} - -func (o HttpHealthChecks) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.OkStatuses) { - toSerialize["okStatuses"] = o.OkStatuses - } - if !IsNil(o.Path) { - toSerialize["path"] = o.Path - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *HttpHealthChecks) UnmarshalJSON(data []byte) (err error) { - varHttpHealthChecks := _HttpHealthChecks{} - - err = json.Unmarshal(data, &varHttpHealthChecks) - - if err != nil { - return err - } - - *o = HttpHealthChecks(varHttpHealthChecks) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "okStatuses") - delete(additionalProperties, "path") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableHttpHealthChecks struct { - value *HttpHealthChecks - isSet bool -} - -func (v NullableHttpHealthChecks) Get() *HttpHealthChecks { - return v.value -} - -func (v *NullableHttpHealthChecks) Set(val *HttpHealthChecks) { - v.value = val - v.isSet = true -} - -func (v NullableHttpHealthChecks) IsSet() bool { - return v.isSet -} - -func (v *NullableHttpHealthChecks) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHttpHealthChecks(val *HttpHealthChecks) *NullableHttpHealthChecks { - return &NullableHttpHealthChecks{value: val, isSet: true} -} - -func (v NullableHttpHealthChecks) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHttpHealthChecks) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_list_credentials_response.go b/services/alb/v2beta2api/model_list_credentials_response.go deleted file mode 100644 index 0b1481a8e..000000000 --- a/services/alb/v2beta2api/model_list_credentials_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCredentialsResponse{} - -// ListCredentialsResponse struct for ListCredentialsResponse -type ListCredentialsResponse struct { - Credentials []CredentialsResponse `json:"credentials,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ListCredentialsResponse ListCredentialsResponse - -// NewListCredentialsResponse instantiates a new ListCredentialsResponse 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 NewListCredentialsResponse() *ListCredentialsResponse { - this := ListCredentialsResponse{} - return &this -} - -// NewListCredentialsResponseWithDefaults instantiates a new ListCredentialsResponse 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 NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { - this := ListCredentialsResponse{} - return &this -} - -// GetCredentials returns the Credentials field value if set, zero value otherwise. -func (o *ListCredentialsResponse) GetCredentials() []CredentialsResponse { - if o == nil || IsNil(o.Credentials) { - var ret []CredentialsResponse - return ret - } - return o.Credentials -} - -// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCredentialsResponse) GetCredentialsOk() ([]CredentialsResponse, bool) { - if o == nil || IsNil(o.Credentials) { - return nil, false - } - return o.Credentials, true -} - -// HasCredentials returns a boolean if a field has been set. -func (o *ListCredentialsResponse) HasCredentials() bool { - if o != nil && !IsNil(o.Credentials) { - return true - } - - return false -} - -// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. -func (o *ListCredentialsResponse) SetCredentials(v []CredentialsResponse) { - o.Credentials = v -} - -func (o ListCredentialsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Credentials) { - toSerialize["credentials"] = o.Credentials - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ListCredentialsResponse) UnmarshalJSON(data []byte) (err error) { - varListCredentialsResponse := _ListCredentialsResponse{} - - err = json.Unmarshal(data, &varListCredentialsResponse) - - if err != nil { - return err - } - - *o = ListCredentialsResponse(varListCredentialsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credentials") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableListCredentialsResponse struct { - value *ListCredentialsResponse - isSet bool -} - -func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { - return v.value -} - -func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListCredentialsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListCredentialsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { - return &NullableListCredentialsResponse{value: val, isSet: true} -} - -func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_list_load_balancers_response.go b/services/alb/v2beta2api/model_list_load_balancers_response.go deleted file mode 100644 index 34ab5d119..000000000 --- a/services/alb/v2beta2api/model_list_load_balancers_response.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListLoadBalancersResponse{} - -// ListLoadBalancersResponse struct for ListLoadBalancersResponse -type ListLoadBalancersResponse struct { - LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"` - // Continue token from the ListLoadBalancerResponse with Limit option - NextPageId *string `json:"nextPageId,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - AdditionalProperties map[string]interface{} -} - -type _ListLoadBalancersResponse ListLoadBalancersResponse - -// NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponse() *ListLoadBalancersResponse { - this := ListLoadBalancersResponse{} - return &this -} - -// NewListLoadBalancersResponseWithDefaults instantiates a new ListLoadBalancersResponse 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 NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { - this := ListLoadBalancersResponse{} - return &this -} - -// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. -func (o *ListLoadBalancersResponse) GetLoadBalancers() []LoadBalancer { - if o == nil || IsNil(o.LoadBalancers) { - var ret []LoadBalancer - return ret - } - return o.LoadBalancers -} - -// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetLoadBalancersOk() ([]LoadBalancer, bool) { - if o == nil || IsNil(o.LoadBalancers) { - return nil, false - } - return o.LoadBalancers, true -} - -// HasLoadBalancers returns a boolean if a field has been set. -func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { - if o != nil && !IsNil(o.LoadBalancers) { - return true - } - - return false -} - -// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. -func (o *ListLoadBalancersResponse) SetLoadBalancers(v []LoadBalancer) { - o.LoadBalancers = v -} - -// GetNextPageId returns the NextPageId field value if set, zero value otherwise. -func (o *ListLoadBalancersResponse) GetNextPageId() string { - if o == nil || IsNil(o.NextPageId) { - var ret string - return ret - } - return *o.NextPageId -} - -// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetNextPageIdOk() (*string, bool) { - if o == nil || IsNil(o.NextPageId) { - return nil, false - } - return o.NextPageId, true -} - -// HasNextPageId returns a boolean if a field has been set. -func (o *ListLoadBalancersResponse) HasNextPageId() bool { - if o != nil && !IsNil(o.NextPageId) { - return true - } - - return false -} - -// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. -func (o *ListLoadBalancersResponse) SetNextPageId(v string) { - o.NextPageId = &v -} - -func (o ListLoadBalancersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.LoadBalancers) { - toSerialize["loadBalancers"] = o.LoadBalancers - } - if !IsNil(o.NextPageId) { - toSerialize["nextPageId"] = o.NextPageId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ListLoadBalancersResponse) UnmarshalJSON(data []byte) (err error) { - varListLoadBalancersResponse := _ListLoadBalancersResponse{} - - err = json.Unmarshal(data, &varListLoadBalancersResponse) - - if err != nil { - return err - } - - *o = ListLoadBalancersResponse(varListLoadBalancersResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "loadBalancers") - delete(additionalProperties, "nextPageId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableListLoadBalancersResponse struct { - value *ListLoadBalancersResponse - isSet bool -} - -func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse { - return v.value -} - -func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListLoadBalancersResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListLoadBalancersResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse { - return &NullableListLoadBalancersResponse{value: val, isSet: true} -} - -func (v NullableListLoadBalancersResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_list_plans_response.go b/services/alb/v2beta2api/model_list_plans_response.go deleted file mode 100644 index f54fc89b2..000000000 --- a/services/alb/v2beta2api/model_list_plans_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListPlansResponse{} - -// ListPlansResponse struct for ListPlansResponse -type ListPlansResponse struct { - ValidPlans []PlanDetails `json:"validPlans,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ListPlansResponse ListPlansResponse - -// NewListPlansResponse instantiates a new ListPlansResponse 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 NewListPlansResponse() *ListPlansResponse { - this := ListPlansResponse{} - return &this -} - -// NewListPlansResponseWithDefaults instantiates a new ListPlansResponse 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 NewListPlansResponseWithDefaults() *ListPlansResponse { - this := ListPlansResponse{} - return &this -} - -// GetValidPlans returns the ValidPlans field value if set, zero value otherwise. -func (o *ListPlansResponse) GetValidPlans() []PlanDetails { - if o == nil || IsNil(o.ValidPlans) { - var ret []PlanDetails - return ret - } - return o.ValidPlans -} - -// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListPlansResponse) GetValidPlansOk() ([]PlanDetails, bool) { - if o == nil || IsNil(o.ValidPlans) { - return nil, false - } - return o.ValidPlans, true -} - -// HasValidPlans returns a boolean if a field has been set. -func (o *ListPlansResponse) HasValidPlans() bool { - if o != nil && !IsNil(o.ValidPlans) { - return true - } - - return false -} - -// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. -func (o *ListPlansResponse) SetValidPlans(v []PlanDetails) { - o.ValidPlans = v -} - -func (o ListPlansResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ValidPlans) { - toSerialize["validPlans"] = o.ValidPlans - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ListPlansResponse) UnmarshalJSON(data []byte) (err error) { - varListPlansResponse := _ListPlansResponse{} - - err = json.Unmarshal(data, &varListPlansResponse) - - if err != nil { - return err - } - - *o = ListPlansResponse(varListPlansResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "validPlans") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableListPlansResponse struct { - value *ListPlansResponse - isSet bool -} - -func (v NullableListPlansResponse) Get() *ListPlansResponse { - return v.value -} - -func (v *NullableListPlansResponse) Set(val *ListPlansResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListPlansResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListPlansResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse { - return &NullableListPlansResponse{value: val, isSet: true} -} - -func (v NullableListPlansResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListPlansResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_listener.go b/services/alb/v2beta2api/model_listener.go deleted file mode 100644 index c84ae5610..000000000 --- a/services/alb/v2beta2api/model_listener.go +++ /dev/null @@ -1,341 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Listener type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Listener{} - -// Listener struct for Listener -type Listener struct { - Http *ProtocolOptionsHTTP `json:"http,omitempty"` - Https *ProtocolOptionsHTTPS `json:"https,omitempty"` - // Unique, system-generated identifier for the listener. It is derived from the protocol and port. - Name *string `json:"name,omitempty"` - // Port number on which the listener receives incoming traffic. - Port *int32 `json:"port,omitempty"` - Protocol *ListenerProtocol `json:"protocol,omitempty"` - // Enable Web Application Firewall (WAF), referenced by name. See \"Application Load Balancer - Web Application Firewall API\" for more information. - WafConfigName *string `json:"wafConfigName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - AdditionalProperties map[string]interface{} -} - -type _Listener Listener - -// NewListener instantiates a new Listener 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 NewListener() *Listener { - this := Listener{} - return &this -} - -// NewListenerWithDefaults instantiates a new Listener 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 NewListenerWithDefaults() *Listener { - this := Listener{} - return &this -} - -// GetHttp returns the Http field value if set, zero value otherwise. -func (o *Listener) GetHttp() ProtocolOptionsHTTP { - if o == nil || IsNil(o.Http) { - var ret ProtocolOptionsHTTP - return ret - } - return *o.Http -} - -// GetHttpOk returns a tuple with the Http field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetHttpOk() (*ProtocolOptionsHTTP, bool) { - if o == nil || IsNil(o.Http) { - return nil, false - } - return o.Http, true -} - -// HasHttp returns a boolean if a field has been set. -func (o *Listener) HasHttp() bool { - if o != nil && !IsNil(o.Http) { - return true - } - - return false -} - -// SetHttp gets a reference to the given ProtocolOptionsHTTP and assigns it to the Http field. -func (o *Listener) SetHttp(v ProtocolOptionsHTTP) { - o.Http = &v -} - -// GetHttps returns the Https field value if set, zero value otherwise. -func (o *Listener) GetHttps() ProtocolOptionsHTTPS { - if o == nil || IsNil(o.Https) { - var ret ProtocolOptionsHTTPS - return ret - } - return *o.Https -} - -// GetHttpsOk returns a tuple with the Https field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetHttpsOk() (*ProtocolOptionsHTTPS, bool) { - if o == nil || IsNil(o.Https) { - return nil, false - } - return o.Https, true -} - -// HasHttps returns a boolean if a field has been set. -func (o *Listener) HasHttps() bool { - if o != nil && !IsNil(o.Https) { - return true - } - - return false -} - -// SetHttps gets a reference to the given ProtocolOptionsHTTPS and assigns it to the Https field. -func (o *Listener) SetHttps(v ProtocolOptionsHTTPS) { - o.Https = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Listener) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Listener) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Listener) SetName(v string) { - o.Name = &v -} - -// GetPort returns the Port field value if set, zero value otherwise. -func (o *Listener) GetPort() int32 { - if o == nil || IsNil(o.Port) { - var ret int32 - return ret - } - return *o.Port -} - -// GetPortOk returns a tuple with the Port field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetPortOk() (*int32, bool) { - if o == nil || IsNil(o.Port) { - return nil, false - } - return o.Port, true -} - -// HasPort returns a boolean if a field has been set. -func (o *Listener) HasPort() bool { - if o != nil && !IsNil(o.Port) { - return true - } - - return false -} - -// SetPort gets a reference to the given int32 and assigns it to the Port field. -func (o *Listener) SetPort(v int32) { - o.Port = &v -} - -// GetProtocol returns the Protocol field value if set, zero value otherwise. -func (o *Listener) GetProtocol() ListenerProtocol { - if o == nil || IsNil(o.Protocol) { - var ret ListenerProtocol - return ret - } - return *o.Protocol -} - -// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetProtocolOk() (*ListenerProtocol, bool) { - if o == nil || IsNil(o.Protocol) { - return nil, false - } - return o.Protocol, true -} - -// HasProtocol returns a boolean if a field has been set. -func (o *Listener) HasProtocol() bool { - if o != nil && !IsNil(o.Protocol) { - return true - } - - return false -} - -// SetProtocol gets a reference to the given ListenerProtocol and assigns it to the Protocol field. -func (o *Listener) SetProtocol(v ListenerProtocol) { - o.Protocol = &v -} - -// GetWafConfigName returns the WafConfigName field value if set, zero value otherwise. -func (o *Listener) GetWafConfigName() string { - if o == nil || IsNil(o.WafConfigName) { - var ret string - return ret - } - return *o.WafConfigName -} - -// GetWafConfigNameOk returns a tuple with the WafConfigName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Listener) GetWafConfigNameOk() (*string, bool) { - if o == nil || IsNil(o.WafConfigName) { - return nil, false - } - return o.WafConfigName, true -} - -// HasWafConfigName returns a boolean if a field has been set. -func (o *Listener) HasWafConfigName() bool { - if o != nil && !IsNil(o.WafConfigName) { - return true - } - - return false -} - -// SetWafConfigName gets a reference to the given string and assigns it to the WafConfigName field. -func (o *Listener) SetWafConfigName(v string) { - o.WafConfigName = &v -} - -func (o Listener) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Listener) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Http) { - toSerialize["http"] = o.Http - } - if !IsNil(o.Https) { - toSerialize["https"] = o.Https - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Port) { - toSerialize["port"] = o.Port - } - if !IsNil(o.Protocol) { - toSerialize["protocol"] = o.Protocol - } - if !IsNil(o.WafConfigName) { - toSerialize["wafConfigName"] = o.WafConfigName - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Listener) UnmarshalJSON(data []byte) (err error) { - varListener := _Listener{} - - err = json.Unmarshal(data, &varListener) - - if err != nil { - return err - } - - *o = Listener(varListener) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "http") - delete(additionalProperties, "https") - delete(additionalProperties, "name") - delete(additionalProperties, "port") - delete(additionalProperties, "protocol") - delete(additionalProperties, "wafConfigName") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableListener struct { - value *Listener - isSet bool -} - -func (v NullableListener) Get() *Listener { - return v.value -} - -func (v *NullableListener) Set(val *Listener) { - v.value = val - v.isSet = true -} - -func (v NullableListener) IsSet() bool { - return v.isSet -} - -func (v *NullableListener) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListener(val *Listener) *NullableListener { - return &NullableListener{value: val, isSet: true} -} - -func (v NullableListener) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListener) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_listener_protocol.go b/services/alb/v2beta2api/model_listener_protocol.go deleted file mode 100644 index fe7d391ee..000000000 --- a/services/alb/v2beta2api/model_listener_protocol.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// ListenerProtocol Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported. -type ListenerProtocol string - -// List of Listener_protocol -const ( - LISTENERPROTOCOL_PROTOCOL_UNSPECIFIED ListenerProtocol = "PROTOCOL_UNSPECIFIED" - LISTENERPROTOCOL_PROTOCOL_HTTP ListenerProtocol = "PROTOCOL_HTTP" - LISTENERPROTOCOL_PROTOCOL_HTTPS ListenerProtocol = "PROTOCOL_HTTPS" - LISTENERPROTOCOL_UNKNOWN_DEFAULT_OPEN_API ListenerProtocol = "unknown_default_open_api" -) - -// All allowed values of ListenerProtocol enum -var AllowedListenerProtocolEnumValues = []ListenerProtocol{ - "PROTOCOL_UNSPECIFIED", - "PROTOCOL_HTTP", - "PROTOCOL_HTTPS", - "unknown_default_open_api", -} - -func (v *ListenerProtocol) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ListenerProtocol(value) - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = LISTENERPROTOCOL_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewListenerProtocolFromValue returns a pointer to a valid ListenerProtocol -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewListenerProtocolFromValue(v string) (*ListenerProtocol, error) { - ev := ListenerProtocol(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ListenerProtocol: valid values are %v", v, AllowedListenerProtocolEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ListenerProtocol) IsValid() bool { - for _, existing := range AllowedListenerProtocolEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Listener_protocol value -func (v ListenerProtocol) Ptr() *ListenerProtocol { - return &v -} - -type NullableListenerProtocol struct { - value *ListenerProtocol - isSet bool -} - -func (v NullableListenerProtocol) Get() *ListenerProtocol { - return v.value -} - -func (v *NullableListenerProtocol) Set(val *ListenerProtocol) { - v.value = val - v.isSet = true -} - -func (v NullableListenerProtocol) IsSet() bool { - return v.isSet -} - -func (v *NullableListenerProtocol) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListenerProtocol(val *ListenerProtocol) *NullableListenerProtocol { - return &NullableListenerProtocol{value: val, isSet: true} -} - -func (v NullableListenerProtocol) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListenerProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_load_balancer.go b/services/alb/v2beta2api/model_load_balancer.go deleted file mode 100644 index 24a69a77b..000000000 --- a/services/alb/v2beta2api/model_load_balancer.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancer{} - -// LoadBalancer struct for LoadBalancer -type LoadBalancer struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a application load balancer has. - Errors []LoadBalancerError `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **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"` - // There is a maximum listener count of 20. - Listeners []Listener `json:"listeners,omitempty"` - // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks []Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - // Region of the LoadBalancer. - Region *string `json:"region,omitempty"` - Status *LoadBalancerStatus `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools []TargetPool `json:"targetPools,omitempty"` - // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - TargetSecurityGroup *SecurityGroup `json:"targetSecurityGroup,omitempty"` - // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadBalancer LoadBalancer - -// NewLoadBalancer instantiates a new LoadBalancer 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 NewLoadBalancer() *LoadBalancer { - this := LoadBalancer{} - return &this -} - -// NewLoadBalancerWithDefaults instantiates a new LoadBalancer 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 NewLoadBalancerWithDefaults() *LoadBalancer { - this := LoadBalancer{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() bool { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - var ret bool - return ret - } - return *o.DisableTargetSecurityGroupAssignment -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - return nil, false - } - return o.DisableTargetSecurityGroupAssignment, true -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool { - if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { - return true - } - - return false -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v bool) { - o.DisableTargetSecurityGroupAssignment = &v -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *LoadBalancer) GetErrors() []LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret []LoadBalancerError - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetErrorsOk() ([]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *LoadBalancer) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *LoadBalancer) SetErrors(v []LoadBalancerError) { - o.Errors = v -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetExternalAddress() string { - if o == nil || IsNil(o.ExternalAddress) { - var ret string - return ret - } - return *o.ExternalAddress -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true -} - -// HasExternalAddress returns a boolean if a field has been set. -func (o *LoadBalancer) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *LoadBalancer) SetExternalAddress(v string) { - o.ExternalAddress = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *LoadBalancer) GetLabels() map[string]string { - if o == nil || IsNil(o.Labels) { - var ret map[string]string - return ret - } - return *o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *LoadBalancer) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *LoadBalancer) SetLabels(v map[string]string) { - o.Labels = &v -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *LoadBalancer) GetListeners() []Listener { - if o == nil || IsNil(o.Listeners) { - var ret []Listener - return ret - } - return o.Listeners -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetListenersOk() ([]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true -} - -// HasListeners returns a boolean if a field has been set. -func (o *LoadBalancer) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *LoadBalancer) SetListeners(v []Listener) { - o.Listeners = v -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -func (o *LoadBalancer) GetLoadBalancerSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.LoadBalancerSecurityGroup -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - return nil, false - } - return o.LoadBalancerSecurityGroup, true -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -func (o *LoadBalancer) HasLoadBalancerSecurityGroup() bool { - if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { - return true - } - - return false -} - -// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -func (o *LoadBalancer) SetLoadBalancerSecurityGroup(v SecurityGroup) { - o.LoadBalancerSecurityGroup = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *LoadBalancer) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *LoadBalancer) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *LoadBalancer) SetName(v string) { - o.Name = &v -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *LoadBalancer) GetNetworks() []Network { - if o == nil || IsNil(o.Networks) { - var ret []Network - return ret - } - return o.Networks -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNetworksOk() ([]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true -} - -// HasNetworks returns a boolean if a field has been set. -func (o *LoadBalancer) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *LoadBalancer) SetNetworks(v []Network) { - o.Networks = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *LoadBalancer) GetOptions() LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret LoadBalancerOptions - return ret - } - return *o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *LoadBalancer) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *LoadBalancer) SetOptions(v LoadBalancerOptions) { - o.Options = &v -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *LoadBalancer) GetPlanId() string { - if o == nil || IsNil(o.PlanId) { - var ret string - return ret - } - return *o.PlanId -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true -} - -// HasPlanId returns a boolean if a field has been set. -func (o *LoadBalancer) HasPlanId() bool { - if o != nil && !IsNil(o.PlanId) { - return true - } - - return false -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -func (o *LoadBalancer) SetPlanId(v string) { - o.PlanId = &v -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetPrivateAddress() string { - if o == nil || IsNil(o.PrivateAddress) { - var ret string - return ret - } - return *o.PrivateAddress -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true -} - -// HasPrivateAddress returns a boolean if a field has been set. -func (o *LoadBalancer) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *LoadBalancer) SetPrivateAddress(v string) { - o.PrivateAddress = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) SetRegion(v string) { - o.Region = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *LoadBalancer) GetStatus() LoadBalancerStatus { - if o == nil || IsNil(o.Status) { - var ret LoadBalancerStatus - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetStatusOk() (*LoadBalancerStatus, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *LoadBalancer) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given LoadBalancerStatus and assigns it to the Status field. -func (o *LoadBalancer) SetStatus(v LoadBalancerStatus) { - o.Status = &v -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *LoadBalancer) GetTargetPools() []TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret []TargetPool - return ret - } - return o.TargetPools -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetTargetPoolsOk() ([]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true -} - -// HasTargetPools returns a boolean if a field has been set. -func (o *LoadBalancer) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *LoadBalancer) SetTargetPools(v []TargetPool) { - o.TargetPools = v -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -func (o *LoadBalancer) GetTargetSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.TargetSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.TargetSecurityGroup -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.TargetSecurityGroup) { - return nil, false - } - return o.TargetSecurityGroup, true -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -func (o *LoadBalancer) HasTargetSecurityGroup() bool { - if o != nil && !IsNil(o.TargetSecurityGroup) { - return true - } - - return false -} - -// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. -func (o *LoadBalancer) SetTargetSecurityGroup(v SecurityGroup) { - o.TargetSecurityGroup = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *LoadBalancer) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancer) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *LoadBalancer) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *LoadBalancer) SetVersion(v string) { - o.Version = &v -} - -func (o LoadBalancer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadBalancer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisableTargetSecurityGroupAssignment) { - toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment - } - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors - } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners - } - if !IsNil(o.LoadBalancerSecurityGroup) { - toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId - } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools - } - if !IsNil(o.TargetSecurityGroup) { - toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadBalancer) UnmarshalJSON(data []byte) (err error) { - varLoadBalancer := _LoadBalancer{} - - err = json.Unmarshal(data, &varLoadBalancer) - - if err != nil { - return err - } - - *o = LoadBalancer(varLoadBalancer) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "disableTargetSecurityGroupAssignment") - delete(additionalProperties, "errors") - delete(additionalProperties, "externalAddress") - delete(additionalProperties, "labels") - delete(additionalProperties, "listeners") - delete(additionalProperties, "loadBalancerSecurityGroup") - delete(additionalProperties, "name") - delete(additionalProperties, "networks") - delete(additionalProperties, "options") - delete(additionalProperties, "planId") - delete(additionalProperties, "privateAddress") - delete(additionalProperties, "region") - delete(additionalProperties, "status") - delete(additionalProperties, "targetPools") - delete(additionalProperties, "targetSecurityGroup") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadBalancer struct { - value *LoadBalancer - isSet bool -} - -func (v NullableLoadBalancer) Get() *LoadBalancer { - return v.value -} - -func (v *NullableLoadBalancer) Set(val *LoadBalancer) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancer) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { - return &NullableLoadBalancer{value: val, isSet: true} -} - -func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_load_balancer_error.go b/services/alb/v2beta2api/model_load_balancer_error.go deleted file mode 100644 index 88beb574d..000000000 --- a/services/alb/v2beta2api/model_load_balancer_error.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerError{} - -// LoadBalancerError struct for LoadBalancerError -type LoadBalancerError struct { - // The error description contains additional helpful user information to fix the error state of the application load balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found. - Description *string `json:"description,omitempty"` - Type *LoadBalancerErrorType `json:"type,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadBalancerError LoadBalancerError - -// NewLoadBalancerError instantiates a new LoadBalancerError 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 NewLoadBalancerError() *LoadBalancerError { - this := LoadBalancerError{} - return &this -} - -// NewLoadBalancerErrorWithDefaults instantiates a new LoadBalancerError 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 NewLoadBalancerErrorWithDefaults() *LoadBalancerError { - this := LoadBalancerError{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *LoadBalancerError) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *LoadBalancerError) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *LoadBalancerError) SetDescription(v string) { - o.Description = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *LoadBalancerError) GetType() LoadBalancerErrorType { - if o == nil || IsNil(o.Type) { - var ret LoadBalancerErrorType - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetTypeOk() (*LoadBalancerErrorType, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *LoadBalancerError) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given LoadBalancerErrorType and assigns it to the Type field. -func (o *LoadBalancerError) SetType(v LoadBalancerErrorType) { - o.Type = &v -} - -func (o LoadBalancerError) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadBalancerError) UnmarshalJSON(data []byte) (err error) { - varLoadBalancerError := _LoadBalancerError{} - - err = json.Unmarshal(data, &varLoadBalancerError) - - if err != nil { - return err - } - - *o = LoadBalancerError(varLoadBalancerError) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadBalancerError struct { - value *LoadBalancerError - isSet bool -} - -func (v NullableLoadBalancerError) Get() *LoadBalancerError { - return v.value -} - -func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerError) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError { - return &NullableLoadBalancerError{value: val, isSet: true} -} - -func (v NullableLoadBalancerError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_load_balancer_error_type.go b/services/alb/v2beta2api/model_load_balancer_error_type.go deleted file mode 100644 index d698b94c8..000000000 --- a/services/alb/v2beta2api/model_load_balancer_error_type.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// LoadBalancerErrorType The error type specifies which part of the application load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. -type LoadBalancerErrorType string - -// List of LoadBalancerError_type -const ( - LOADBALANCERERRORTYPE_TYPE_UNSPECIFIED LoadBalancerErrorType = "TYPE_UNSPECIFIED" - LOADBALANCERERRORTYPE_TYPE_INTERNAL LoadBalancerErrorType = "TYPE_INTERNAL" - LOADBALANCERERRORTYPE_TYPE_QUOTA_SECGROUP_EXCEEDED LoadBalancerErrorType = "TYPE_QUOTA_SECGROUP_EXCEEDED" - LOADBALANCERERRORTYPE_TYPE_QUOTA_SECGROUPRULE_EXCEEDED LoadBalancerErrorType = "TYPE_QUOTA_SECGROUPRULE_EXCEEDED" - LOADBALANCERERRORTYPE_TYPE_PORT_NOT_CONFIGURED LoadBalancerErrorType = "TYPE_PORT_NOT_CONFIGURED" - LOADBALANCERERRORTYPE_TYPE_FIP_NOT_CONFIGURED LoadBalancerErrorType = "TYPE_FIP_NOT_CONFIGURED" - LOADBALANCERERRORTYPE_TYPE_TARGET_NOT_ACTIVE LoadBalancerErrorType = "TYPE_TARGET_NOT_ACTIVE" - LOADBALANCERERRORTYPE_TYPE_METRICS_MISCONFIGURED LoadBalancerErrorType = "TYPE_METRICS_MISCONFIGURED" - LOADBALANCERERRORTYPE_TYPE_LOGS_MISCONFIGURED LoadBalancerErrorType = "TYPE_LOGS_MISCONFIGURED" - LOADBALANCERERRORTYPE_UNKNOWN_DEFAULT_OPEN_API LoadBalancerErrorType = "unknown_default_open_api" -) - -// All allowed values of LoadBalancerErrorType enum -var AllowedLoadBalancerErrorTypeEnumValues = []LoadBalancerErrorType{ - "TYPE_UNSPECIFIED", - "TYPE_INTERNAL", - "TYPE_QUOTA_SECGROUP_EXCEEDED", - "TYPE_QUOTA_SECGROUPRULE_EXCEEDED", - "TYPE_PORT_NOT_CONFIGURED", - "TYPE_FIP_NOT_CONFIGURED", - "TYPE_TARGET_NOT_ACTIVE", - "TYPE_METRICS_MISCONFIGURED", - "TYPE_LOGS_MISCONFIGURED", - "unknown_default_open_api", -} - -func (v *LoadBalancerErrorType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := LoadBalancerErrorType(value) - for _, existing := range AllowedLoadBalancerErrorTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = LOADBALANCERERRORTYPE_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewLoadBalancerErrorTypeFromValue returns a pointer to a valid LoadBalancerErrorType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewLoadBalancerErrorTypeFromValue(v string) (*LoadBalancerErrorType, error) { - ev := LoadBalancerErrorType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerErrorType: valid values are %v", v, AllowedLoadBalancerErrorTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v LoadBalancerErrorType) IsValid() bool { - for _, existing := range AllowedLoadBalancerErrorTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to LoadBalancerError_type value -func (v LoadBalancerErrorType) Ptr() *LoadBalancerErrorType { - return &v -} - -type NullableLoadBalancerErrorType struct { - value *LoadBalancerErrorType - isSet bool -} - -func (v NullableLoadBalancerErrorType) Get() *LoadBalancerErrorType { - return v.value -} - -func (v *NullableLoadBalancerErrorType) Set(val *LoadBalancerErrorType) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerErrorType) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerErrorType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerErrorType(val *LoadBalancerErrorType) *NullableLoadBalancerErrorType { - return &NullableLoadBalancerErrorType{value: val, isSet: true} -} - -func (v NullableLoadBalancerErrorType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerErrorType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_load_balancer_options.go b/services/alb/v2beta2api/model_load_balancer_options.go deleted file mode 100644 index c0165d968..000000000 --- a/services/alb/v2beta2api/model_load_balancer_options.go +++ /dev/null @@ -1,265 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadBalancerOptions{} - -// LoadBalancerOptions Defines any optional functionality you want to have enabled on your application load balancer. -type LoadBalancerOptions struct { - AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"` - EphemeralAddress *bool `json:"ephemeralAddress,omitempty"` - Observability *LoadbalancerOptionObservability `json:"observability,omitempty"` - // Application Load Balancer is accessible only via a private network ip address. Not changeable after creation. - PrivateNetworkOnly *bool `json:"privateNetworkOnly,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadBalancerOptions LoadBalancerOptions - -// NewLoadBalancerOptions instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptions() *LoadBalancerOptions { - this := LoadBalancerOptions{} - return &this -} - -// NewLoadBalancerOptionsWithDefaults instantiates a new LoadBalancerOptions 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 NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { - this := LoadBalancerOptions{} - return &this -} - -// GetAccessControl returns the AccessControl field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetAccessControl() LoadbalancerOptionAccessControl { - if o == nil || IsNil(o.AccessControl) { - var ret LoadbalancerOptionAccessControl - return ret - } - return *o.AccessControl -} - -// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetAccessControlOk() (*LoadbalancerOptionAccessControl, bool) { - if o == nil || IsNil(o.AccessControl) { - return nil, false - } - return o.AccessControl, true -} - -// HasAccessControl returns a boolean if a field has been set. -func (o *LoadBalancerOptions) HasAccessControl() bool { - if o != nil && !IsNil(o.AccessControl) { - return true - } - - return false -} - -// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. -func (o *LoadBalancerOptions) SetAccessControl(v LoadbalancerOptionAccessControl) { - o.AccessControl = &v -} - -// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetEphemeralAddress() bool { - if o == nil || IsNil(o.EphemeralAddress) { - var ret bool - return ret - } - return *o.EphemeralAddress -} - -// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetEphemeralAddressOk() (*bool, bool) { - if o == nil || IsNil(o.EphemeralAddress) { - return nil, false - } - return o.EphemeralAddress, true -} - -// HasEphemeralAddress returns a boolean if a field has been set. -func (o *LoadBalancerOptions) HasEphemeralAddress() bool { - if o != nil && !IsNil(o.EphemeralAddress) { - return true - } - - return false -} - -// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. -func (o *LoadBalancerOptions) SetEphemeralAddress(v bool) { - o.EphemeralAddress = &v -} - -// GetObservability returns the Observability field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetObservability() LoadbalancerOptionObservability { - if o == nil || IsNil(o.Observability) { - var ret LoadbalancerOptionObservability - return ret - } - return *o.Observability -} - -// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetObservabilityOk() (*LoadbalancerOptionObservability, bool) { - if o == nil || IsNil(o.Observability) { - return nil, false - } - return o.Observability, true -} - -// HasObservability returns a boolean if a field has been set. -func (o *LoadBalancerOptions) HasObservability() bool { - if o != nil && !IsNil(o.Observability) { - return true - } - - return false -} - -// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. -func (o *LoadBalancerOptions) SetObservability(v LoadbalancerOptionObservability) { - o.Observability = &v -} - -// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetPrivateNetworkOnly() bool { - if o == nil || IsNil(o.PrivateNetworkOnly) { - var ret bool - return ret - } - return *o.PrivateNetworkOnly -} - -// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (*bool, bool) { - if o == nil || IsNil(o.PrivateNetworkOnly) { - return nil, false - } - return o.PrivateNetworkOnly, true -} - -// HasPrivateNetworkOnly returns a boolean if a field has been set. -func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { - if o != nil && !IsNil(o.PrivateNetworkOnly) { - return true - } - - return false -} - -// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. -func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v bool) { - o.PrivateNetworkOnly = &v -} - -func (o LoadBalancerOptions) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AccessControl) { - toSerialize["accessControl"] = o.AccessControl - } - if !IsNil(o.EphemeralAddress) { - toSerialize["ephemeralAddress"] = o.EphemeralAddress - } - if !IsNil(o.Observability) { - toSerialize["observability"] = o.Observability - } - if !IsNil(o.PrivateNetworkOnly) { - toSerialize["privateNetworkOnly"] = o.PrivateNetworkOnly - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadBalancerOptions) UnmarshalJSON(data []byte) (err error) { - varLoadBalancerOptions := _LoadBalancerOptions{} - - err = json.Unmarshal(data, &varLoadBalancerOptions) - - if err != nil { - return err - } - - *o = LoadBalancerOptions(varLoadBalancerOptions) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "accessControl") - delete(additionalProperties, "ephemeralAddress") - delete(additionalProperties, "observability") - delete(additionalProperties, "privateNetworkOnly") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadBalancerOptions struct { - value *LoadBalancerOptions - isSet bool -} - -func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions { - return v.value -} - -func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions { - return &NullableLoadBalancerOptions{value: val, isSet: true} -} - -func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_load_balancer_status.go b/services/alb/v2beta2api/model_load_balancer_status.go deleted file mode 100644 index deae9fd98..000000000 --- a/services/alb/v2beta2api/model_load_balancer_status.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// LoadBalancerStatus the model 'LoadBalancerStatus' -type LoadBalancerStatus string - -// List of LoadBalancer_status -const ( - LOADBALANCERSTATUS_STATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED" - LOADBALANCERSTATUS_STATUS_PENDING LoadBalancerStatus = "STATUS_PENDING" - LOADBALANCERSTATUS_STATUS_READY LoadBalancerStatus = "STATUS_READY" - LOADBALANCERSTATUS_STATUS_ERROR LoadBalancerStatus = "STATUS_ERROR" - LOADBALANCERSTATUS_STATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING" - LOADBALANCERSTATUS_UNKNOWN_DEFAULT_OPEN_API LoadBalancerStatus = "unknown_default_open_api" -) - -// All allowed values of LoadBalancerStatus enum -var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", - "unknown_default_open_api", -} - -func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := LoadBalancerStatus(value) - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = LOADBALANCERSTATUS_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewLoadBalancerStatusFromValue returns a pointer to a valid LoadBalancerStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewLoadBalancerStatusFromValue(v string) (*LoadBalancerStatus, error) { - ev := LoadBalancerStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LoadBalancerStatus: valid values are %v", v, AllowedLoadBalancerStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v LoadBalancerStatus) IsValid() bool { - for _, existing := range AllowedLoadBalancerStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to LoadBalancer_status value -func (v LoadBalancerStatus) Ptr() *LoadBalancerStatus { - return &v -} - -type NullableLoadBalancerStatus struct { - value *LoadBalancerStatus - isSet bool -} - -func (v NullableLoadBalancerStatus) Get() *LoadBalancerStatus { - return v.value -} - -func (v *NullableLoadBalancerStatus) Set(val *LoadBalancerStatus) { - v.value = val - v.isSet = true -} - -func (v NullableLoadBalancerStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadBalancerStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadBalancerStatus(val *LoadBalancerStatus) *NullableLoadBalancerStatus { - return &NullableLoadBalancerStatus{value: val, isSet: true} -} - -func (v NullableLoadBalancerStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadBalancerStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_loadbalancer_option_access_control.go b/services/alb/v2beta2api/model_loadbalancer_option_access_control.go deleted file mode 100644 index eb56bbc69..000000000 --- a/services/alb/v2beta2api/model_loadbalancer_option_access_control.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionAccessControl{} - -// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the application load balancer. -type LoadbalancerOptionAccessControl struct { - // Application Load Balancer is accessible only from an IP address in this range - AllowedSourceRanges []string `json:"allowedSourceRanges,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadbalancerOptionAccessControl LoadbalancerOptionAccessControl - -// NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControl() *LoadbalancerOptionAccessControl { - this := LoadbalancerOptionAccessControl{} - return &this -} - -// NewLoadbalancerOptionAccessControlWithDefaults instantiates a new LoadbalancerOptionAccessControl 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 NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl { - this := LoadbalancerOptionAccessControl{} - return &this -} - -// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() []string { - if o == nil || IsNil(o.AllowedSourceRanges) { - var ret []string - return ret - } - return o.AllowedSourceRanges -} - -// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() ([]string, bool) { - if o == nil || IsNil(o.AllowedSourceRanges) { - return nil, false - } - return o.AllowedSourceRanges, true -} - -// HasAllowedSourceRanges returns a boolean if a field has been set. -func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { - if o != nil && !IsNil(o.AllowedSourceRanges) { - return true - } - - return false -} - -// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. -func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v []string) { - o.AllowedSourceRanges = v -} - -func (o LoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AllowedSourceRanges) { - toSerialize["allowedSourceRanges"] = o.AllowedSourceRanges - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadbalancerOptionAccessControl) UnmarshalJSON(data []byte) (err error) { - varLoadbalancerOptionAccessControl := _LoadbalancerOptionAccessControl{} - - err = json.Unmarshal(data, &varLoadbalancerOptionAccessControl) - - if err != nil { - return err - } - - *o = LoadbalancerOptionAccessControl(varLoadbalancerOptionAccessControl) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "allowedSourceRanges") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadbalancerOptionAccessControl struct { - value *LoadbalancerOptionAccessControl - isSet bool -} - -func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl { - return v.value -} - -func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) { - v.value = val - v.isSet = true -} - -func (v NullableLoadbalancerOptionAccessControl) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadbalancerOptionAccessControl) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl { - return &NullableLoadbalancerOptionAccessControl{value: val, isSet: true} -} - -func (v NullableLoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_loadbalancer_option_logs.go b/services/alb/v2beta2api/model_loadbalancer_option_logs.go deleted file mode 100644 index 67d387cb2..000000000 --- a/services/alb/v2beta2api/model_loadbalancer_option_logs.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionLogs{} - -// LoadbalancerOptionLogs struct for LoadbalancerOptionLogs -type LoadbalancerOptionLogs struct { - // Credentials reference for logging. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the logging solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` - // The Observability(Logs)/Loki remote write Push URL you want the logs to be shipped to. - PushUrl *string `json:"pushUrl,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadbalancerOptionLogs LoadbalancerOptionLogs - -// NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogs() *LoadbalancerOptionLogs { - this := LoadbalancerOptionLogs{} - return &this -} - -// NewLoadbalancerOptionLogsWithDefaults instantiates a new LoadbalancerOptionLogs 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 NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { - this := LoadbalancerOptionLogs{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *LoadbalancerOptionLogs) GetCredentialsRef() string { - if o == nil || IsNil(o.CredentialsRef) { - var ret string - return ret - } - return *o.CredentialsRef -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true -} - -// HasCredentialsRef returns a boolean if a field has been set. -func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *LoadbalancerOptionLogs) SetCredentialsRef(v string) { - o.CredentialsRef = &v -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionLogs) GetPushUrl() string { - if o == nil || IsNil(o.PushUrl) { - var ret string - return ret - } - return *o.PushUrl -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetPushUrlOk() (*string, bool) { - if o == nil || IsNil(o.PushUrl) { - return nil, false - } - return o.PushUrl, true -} - -// HasPushUrl returns a boolean if a field has been set. -func (o *LoadbalancerOptionLogs) HasPushUrl() bool { - if o != nil && !IsNil(o.PushUrl) { - return true - } - - return false -} - -// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -func (o *LoadbalancerOptionLogs) SetPushUrl(v string) { - o.PushUrl = &v -} - -func (o LoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef - } - if !IsNil(o.PushUrl) { - toSerialize["pushUrl"] = o.PushUrl - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadbalancerOptionLogs) UnmarshalJSON(data []byte) (err error) { - varLoadbalancerOptionLogs := _LoadbalancerOptionLogs{} - - err = json.Unmarshal(data, &varLoadbalancerOptionLogs) - - if err != nil { - return err - } - - *o = LoadbalancerOptionLogs(varLoadbalancerOptionLogs) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credentialsRef") - delete(additionalProperties, "pushUrl") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadbalancerOptionLogs struct { - value *LoadbalancerOptionLogs - isSet bool -} - -func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs { - return v.value -} - -func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) { - v.value = val - v.isSet = true -} - -func (v NullableLoadbalancerOptionLogs) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadbalancerOptionLogs) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs { - return &NullableLoadbalancerOptionLogs{value: val, isSet: true} -} - -func (v NullableLoadbalancerOptionLogs) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_loadbalancer_option_metrics.go b/services/alb/v2beta2api/model_loadbalancer_option_metrics.go deleted file mode 100644 index 6398a10a4..000000000 --- a/services/alb/v2beta2api/model_loadbalancer_option_metrics.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionMetrics{} - -// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics -type LoadbalancerOptionMetrics struct { - // Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` - // The Observability(Metrics)/Prometheus remote write push URL you want the metrics to be shipped to. - PushUrl *string `json:"pushUrl,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadbalancerOptionMetrics LoadbalancerOptionMetrics - -// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics { - this := LoadbalancerOptionMetrics{} - return &this -} - -// NewLoadbalancerOptionMetricsWithDefaults instantiates a new LoadbalancerOptionMetrics 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 NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { - this := LoadbalancerOptionMetrics{} - return &this -} - -// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *LoadbalancerOptionMetrics) GetCredentialsRef() string { - if o == nil || IsNil(o.CredentialsRef) { - var ret string - return ret - } - return *o.CredentialsRef -} - -// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true -} - -// HasCredentialsRef returns a boolean if a field has been set. -func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false -} - -// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v string) { - o.CredentialsRef = &v -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionMetrics) GetPushUrl() string { - if o == nil || IsNil(o.PushUrl) { - var ret string - return ret - } - return *o.PushUrl -} - -// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (*string, bool) { - if o == nil || IsNil(o.PushUrl) { - return nil, false - } - return o.PushUrl, true -} - -// HasPushUrl returns a boolean if a field has been set. -func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { - if o != nil && !IsNil(o.PushUrl) { - return true - } - - return false -} - -// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -func (o *LoadbalancerOptionMetrics) SetPushUrl(v string) { - o.PushUrl = &v -} - -func (o LoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef - } - if !IsNil(o.PushUrl) { - toSerialize["pushUrl"] = o.PushUrl - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadbalancerOptionMetrics) UnmarshalJSON(data []byte) (err error) { - varLoadbalancerOptionMetrics := _LoadbalancerOptionMetrics{} - - err = json.Unmarshal(data, &varLoadbalancerOptionMetrics) - - if err != nil { - return err - } - - *o = LoadbalancerOptionMetrics(varLoadbalancerOptionMetrics) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credentialsRef") - delete(additionalProperties, "pushUrl") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadbalancerOptionMetrics struct { - value *LoadbalancerOptionMetrics - isSet bool -} - -func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics { - return v.value -} - -func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) { - v.value = val - v.isSet = true -} - -func (v NullableLoadbalancerOptionMetrics) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadbalancerOptionMetrics) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics { - return &NullableLoadbalancerOptionMetrics{value: val, isSet: true} -} - -func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_loadbalancer_option_observability.go b/services/alb/v2beta2api/model_loadbalancer_option_observability.go deleted file mode 100644 index b9570a669..000000000 --- a/services/alb/v2beta2api/model_loadbalancer_option_observability.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LoadbalancerOptionObservability{} - -// LoadbalancerOptionObservability We offer Load Balancer observability via STACKIT Observability or external solutions. -type LoadbalancerOptionObservability struct { - Logs *LoadbalancerOptionLogs `json:"logs,omitempty"` - Metrics *LoadbalancerOptionMetrics `json:"metrics,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _LoadbalancerOptionObservability LoadbalancerOptionObservability - -// NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservability() *LoadbalancerOptionObservability { - this := LoadbalancerOptionObservability{} - return &this -} - -// NewLoadbalancerOptionObservabilityWithDefaults instantiates a new LoadbalancerOptionObservability 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 NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability { - this := LoadbalancerOptionObservability{} - return &this -} - -// GetLogs returns the Logs field value if set, zero value otherwise. -func (o *LoadbalancerOptionObservability) GetLogs() LoadbalancerOptionLogs { - if o == nil || IsNil(o.Logs) { - var ret LoadbalancerOptionLogs - return ret - } - return *o.Logs -} - -// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetLogsOk() (*LoadbalancerOptionLogs, bool) { - if o == nil || IsNil(o.Logs) { - return nil, false - } - return o.Logs, true -} - -// HasLogs returns a boolean if a field has been set. -func (o *LoadbalancerOptionObservability) HasLogs() bool { - if o != nil && !IsNil(o.Logs) { - return true - } - - return false -} - -// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. -func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionLogs) { - o.Logs = &v -} - -// GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *LoadbalancerOptionObservability) GetMetrics() LoadbalancerOptionMetrics { - if o == nil || IsNil(o.Metrics) { - var ret LoadbalancerOptionMetrics - return ret - } - return *o.Metrics -} - -// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetMetricsOk() (*LoadbalancerOptionMetrics, bool) { - if o == nil || IsNil(o.Metrics) { - return nil, false - } - return o.Metrics, true -} - -// HasMetrics returns a boolean if a field has been set. -func (o *LoadbalancerOptionObservability) HasMetrics() bool { - if o != nil && !IsNil(o.Metrics) { - return true - } - - return false -} - -// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. -func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionMetrics) { - o.Metrics = &v -} - -func (o LoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Logs) { - toSerialize["logs"] = o.Logs - } - if !IsNil(o.Metrics) { - toSerialize["metrics"] = o.Metrics - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *LoadbalancerOptionObservability) UnmarshalJSON(data []byte) (err error) { - varLoadbalancerOptionObservability := _LoadbalancerOptionObservability{} - - err = json.Unmarshal(data, &varLoadbalancerOptionObservability) - - if err != nil { - return err - } - - *o = LoadbalancerOptionObservability(varLoadbalancerOptionObservability) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "logs") - delete(additionalProperties, "metrics") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableLoadbalancerOptionObservability struct { - value *LoadbalancerOptionObservability - isSet bool -} - -func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability { - return v.value -} - -func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) { - v.value = val - v.isSet = true -} - -func (v NullableLoadbalancerOptionObservability) IsSet() bool { - return v.isSet -} - -func (v *NullableLoadbalancerOptionObservability) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability { - return &NullableLoadbalancerOptionObservability{value: val, isSet: true} -} - -func (v NullableLoadbalancerOptionObservability) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_network.go b/services/alb/v2beta2api/model_network.go deleted file mode 100644 index 55e6554a5..000000000 --- a/services/alb/v2beta2api/model_network.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Network type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Network{} - -// Network struct for Network -type Network struct { - // Openstack network ID - NetworkId *string `json:"networkId,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}$"` - Role *NetworkRole `json:"role,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Network Network - -// NewNetwork instantiates a new Network 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 NewNetwork() *Network { - this := Network{} - return &this -} - -// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { - this := Network{} - return &this -} - -// GetNetworkId returns the NetworkId field value if set, zero value otherwise. -func (o *Network) GetNetworkId() string { - if o == nil || IsNil(o.NetworkId) { - var ret string - return ret - } - return *o.NetworkId -} - -// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetNetworkIdOk() (*string, bool) { - if o == nil || IsNil(o.NetworkId) { - return nil, false - } - return o.NetworkId, true -} - -// HasNetworkId returns a boolean if a field has been set. -func (o *Network) HasNetworkId() bool { - if o != nil && !IsNil(o.NetworkId) { - return true - } - - return false -} - -// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. -func (o *Network) SetNetworkId(v string) { - o.NetworkId = &v -} - -// GetRole returns the Role field value if set, zero value otherwise. -func (o *Network) GetRole() NetworkRole { - if o == nil || IsNil(o.Role) { - var ret NetworkRole - return ret - } - return *o.Role -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Network) GetRoleOk() (*NetworkRole, bool) { - if o == nil || IsNil(o.Role) { - return nil, false - } - return o.Role, true -} - -// HasRole returns a boolean if a field has been set. -func (o *Network) HasRole() bool { - if o != nil && !IsNil(o.Role) { - return true - } - - return false -} - -// SetRole gets a reference to the given NetworkRole and assigns it to the Role field. -func (o *Network) SetRole(v NetworkRole) { - o.Role = &v -} - -func (o Network) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Network) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.NetworkId) { - toSerialize["networkId"] = o.NetworkId - } - if !IsNil(o.Role) { - toSerialize["role"] = o.Role - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Network) UnmarshalJSON(data []byte) (err error) { - varNetwork := _Network{} - - err = json.Unmarshal(data, &varNetwork) - - if err != nil { - return err - } - - *o = Network(varNetwork) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "networkId") - delete(additionalProperties, "role") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableNetwork struct { - value *Network - isSet bool -} - -func (v NullableNetwork) Get() *Network { - return v.value -} - -func (v *NullableNetwork) Set(val *Network) { - v.value = val - v.isSet = true -} - -func (v NullableNetwork) IsSet() bool { - return v.isSet -} - -func (v *NullableNetwork) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetwork(val *Network) *NullableNetwork { - return &NullableNetwork{value: val, isSet: true} -} - -func (v NullableNetwork) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_network_role.go b/services/alb/v2beta2api/model_network_role.go deleted file mode 100644 index 10d996ede..000000000 --- a/services/alb/v2beta2api/model_network_role.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// NetworkRole The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. -type NetworkRole string - -// List of Network_role -const ( - NETWORKROLE_ROLE_UNSPECIFIED NetworkRole = "ROLE_UNSPECIFIED" - NETWORKROLE_ROLE_LISTENERS_AND_TARGETS NetworkRole = "ROLE_LISTENERS_AND_TARGETS" - NETWORKROLE_ROLE_LISTENERS NetworkRole = "ROLE_LISTENERS" - NETWORKROLE_ROLE_TARGETS NetworkRole = "ROLE_TARGETS" - NETWORKROLE_UNKNOWN_DEFAULT_OPEN_API NetworkRole = "unknown_default_open_api" -) - -// All allowed values of NetworkRole enum -var AllowedNetworkRoleEnumValues = []NetworkRole{ - "ROLE_UNSPECIFIED", - "ROLE_LISTENERS_AND_TARGETS", - "ROLE_LISTENERS", - "ROLE_TARGETS", - "unknown_default_open_api", -} - -func (v *NetworkRole) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := NetworkRole(value) - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = NETWORKROLE_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewNetworkRoleFromValue returns a pointer to a valid NetworkRole -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewNetworkRoleFromValue(v string) (*NetworkRole, error) { - ev := NetworkRole(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for NetworkRole: valid values are %v", v, AllowedNetworkRoleEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v NetworkRole) IsValid() bool { - for _, existing := range AllowedNetworkRoleEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Network_role value -func (v NetworkRole) Ptr() *NetworkRole { - return &v -} - -type NullableNetworkRole struct { - value *NetworkRole - isSet bool -} - -func (v NullableNetworkRole) Get() *NetworkRole { - return v.value -} - -func (v *NullableNetworkRole) Set(val *NetworkRole) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkRole) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkRole) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkRole(val *NetworkRole) *NullableNetworkRole { - return &NullableNetworkRole{value: val, isSet: true} -} - -func (v NullableNetworkRole) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkRole) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_path.go b/services/alb/v2beta2api/model_path.go deleted file mode 100644 index 4fb42e5ae..000000000 --- a/services/alb/v2beta2api/model_path.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Path type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Path{} - -// Path struct for Path -type Path struct { - // Exact path match. Only a request path exactly equal to the value will match, e.g. '/foo' matches only '/foo', not '/foo/bar' or '/foobar'. - Exact *string `json:"exact,omitempty"` - // Prefix path match. Only matches on full segment boundaries, e.g. '/foo' matches '/foo' and '/foo/bar' but NOT '/foobar'. - Prefix *string `json:"prefix,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Path Path - -// NewPath instantiates a new Path 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 NewPath() *Path { - this := Path{} - return &this -} - -// NewPathWithDefaults instantiates a new Path 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 NewPathWithDefaults() *Path { - this := Path{} - return &this -} - -// GetExact returns the Exact field value if set, zero value otherwise. -func (o *Path) GetExact() string { - if o == nil || IsNil(o.Exact) { - var ret string - return ret - } - return *o.Exact -} - -// GetExactOk returns a tuple with the Exact field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Path) GetExactOk() (*string, bool) { - if o == nil || IsNil(o.Exact) { - return nil, false - } - return o.Exact, true -} - -// HasExact returns a boolean if a field has been set. -func (o *Path) HasExact() bool { - if o != nil && !IsNil(o.Exact) { - return true - } - - return false -} - -// SetExact gets a reference to the given string and assigns it to the Exact field. -func (o *Path) SetExact(v string) { - o.Exact = &v -} - -// GetPrefix returns the Prefix field value if set, zero value otherwise. -func (o *Path) GetPrefix() string { - if o == nil || IsNil(o.Prefix) { - var ret string - return ret - } - return *o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Path) GetPrefixOk() (*string, bool) { - if o == nil || IsNil(o.Prefix) { - return nil, false - } - return o.Prefix, true -} - -// HasPrefix returns a boolean if a field has been set. -func (o *Path) HasPrefix() bool { - if o != nil && !IsNil(o.Prefix) { - return true - } - - return false -} - -// SetPrefix gets a reference to the given string and assigns it to the Prefix field. -func (o *Path) SetPrefix(v string) { - o.Prefix = &v -} - -func (o Path) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Path) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Exact) { - toSerialize["exact"] = o.Exact - } - if !IsNil(o.Prefix) { - toSerialize["prefix"] = o.Prefix - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Path) UnmarshalJSON(data []byte) (err error) { - varPath := _Path{} - - err = json.Unmarshal(data, &varPath) - - if err != nil { - return err - } - - *o = Path(varPath) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "exact") - delete(additionalProperties, "prefix") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePath struct { - value *Path - isSet bool -} - -func (v NullablePath) Get() *Path { - return v.value -} - -func (v *NullablePath) Set(val *Path) { - v.value = val - v.isSet = true -} - -func (v NullablePath) IsSet() bool { - return v.isSet -} - -func (v *NullablePath) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePath(val *Path) *NullablePath { - return &NullablePath{value: val, isSet: true} -} - -func (v NullablePath) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePath) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_plan_details.go b/services/alb/v2beta2api/model_plan_details.go deleted file mode 100644 index bb60c7d5d..000000000 --- a/services/alb/v2beta2api/model_plan_details.go +++ /dev/null @@ -1,344 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the PlanDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PlanDetails{} - -// PlanDetails struct for PlanDetails -type PlanDetails struct { - // Description - Description *string `json:"description,omitempty"` - // Flavor Name - FlavorName *string `json:"flavorName,omitempty"` - // Maximum number of concurrent connections per application load balancer VM instance. - MaxConnections *int32 `json:"maxConnections,omitempty"` - // Service Plan Name - Name *string `json:"name,omitempty"` - // Service Plan Identifier - PlanId *string `json:"planId,omitempty"` - // Region this Plan is available in - Region *string `json:"region,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _PlanDetails PlanDetails - -// NewPlanDetails instantiates a new PlanDetails 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 NewPlanDetails() *PlanDetails { - this := PlanDetails{} - return &this -} - -// NewPlanDetailsWithDefaults instantiates a new PlanDetails 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 NewPlanDetailsWithDefaults() *PlanDetails { - this := PlanDetails{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PlanDetails) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PlanDetails) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PlanDetails) SetDescription(v string) { - o.Description = &v -} - -// GetFlavorName returns the FlavorName field value if set, zero value otherwise. -func (o *PlanDetails) GetFlavorName() string { - if o == nil || IsNil(o.FlavorName) { - var ret string - return ret - } - return *o.FlavorName -} - -// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetFlavorNameOk() (*string, bool) { - if o == nil || IsNil(o.FlavorName) { - return nil, false - } - return o.FlavorName, true -} - -// HasFlavorName returns a boolean if a field has been set. -func (o *PlanDetails) HasFlavorName() bool { - if o != nil && !IsNil(o.FlavorName) { - return true - } - - return false -} - -// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. -func (o *PlanDetails) SetFlavorName(v string) { - o.FlavorName = &v -} - -// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. -func (o *PlanDetails) GetMaxConnections() int32 { - if o == nil || IsNil(o.MaxConnections) { - var ret int32 - return ret - } - return *o.MaxConnections -} - -// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetMaxConnectionsOk() (*int32, bool) { - if o == nil || IsNil(o.MaxConnections) { - return nil, false - } - return o.MaxConnections, true -} - -// HasMaxConnections returns a boolean if a field has been set. -func (o *PlanDetails) HasMaxConnections() bool { - if o != nil && !IsNil(o.MaxConnections) { - return true - } - - return false -} - -// SetMaxConnections gets a reference to the given int32 and assigns it to the MaxConnections field. -func (o *PlanDetails) SetMaxConnections(v int32) { - o.MaxConnections = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PlanDetails) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PlanDetails) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PlanDetails) SetName(v string) { - o.Name = &v -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *PlanDetails) GetPlanId() string { - if o == nil || IsNil(o.PlanId) { - var ret string - return ret - } - return *o.PlanId -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlanDetails) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true -} - -// HasPlanId returns a boolean if a field has been set. -func (o *PlanDetails) HasPlanId() bool { - if o != nil && !IsNil(o.PlanId) { - return true - } - - return false -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -func (o *PlanDetails) SetPlanId(v string) { - o.PlanId = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *PlanDetails) 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 *PlanDetails) 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 *PlanDetails) 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 *PlanDetails) SetRegion(v string) { - o.Region = &v -} - -func (o PlanDetails) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PlanDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.FlavorName) { - toSerialize["flavorName"] = o.FlavorName - } - if !IsNil(o.MaxConnections) { - toSerialize["maxConnections"] = o.MaxConnections - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *PlanDetails) UnmarshalJSON(data []byte) (err error) { - varPlanDetails := _PlanDetails{} - - err = json.Unmarshal(data, &varPlanDetails) - - if err != nil { - return err - } - - *o = PlanDetails(varPlanDetails) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "description") - delete(additionalProperties, "flavorName") - delete(additionalProperties, "maxConnections") - delete(additionalProperties, "name") - delete(additionalProperties, "planId") - delete(additionalProperties, "region") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePlanDetails struct { - value *PlanDetails - isSet bool -} - -func (v NullablePlanDetails) Get() *PlanDetails { - return v.value -} - -func (v *NullablePlanDetails) Set(val *PlanDetails) { - v.value = val - v.isSet = true -} - -func (v NullablePlanDetails) IsSet() bool { - return v.isSet -} - -func (v *NullablePlanDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails { - return &NullablePlanDetails{value: val, isSet: true} -} - -func (v NullablePlanDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_protocol_options_http.go b/services/alb/v2beta2api/model_protocol_options_http.go deleted file mode 100644 index e25aa40f0..000000000 --- a/services/alb/v2beta2api/model_protocol_options_http.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ProtocolOptionsHTTP type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProtocolOptionsHTTP{} - -// ProtocolOptionsHTTP Configuration for handling HTTP traffic on this listener. -type ProtocolOptionsHTTP struct { - // Defines routing rules grouped by hostname. - Hosts []HostConfig `json:"hosts,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ProtocolOptionsHTTP ProtocolOptionsHTTP - -// NewProtocolOptionsHTTP instantiates a new ProtocolOptionsHTTP 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 NewProtocolOptionsHTTP() *ProtocolOptionsHTTP { - this := ProtocolOptionsHTTP{} - return &this -} - -// NewProtocolOptionsHTTPWithDefaults instantiates a new ProtocolOptionsHTTP 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 NewProtocolOptionsHTTPWithDefaults() *ProtocolOptionsHTTP { - this := ProtocolOptionsHTTP{} - return &this -} - -// GetHosts returns the Hosts field value if set, zero value otherwise. -func (o *ProtocolOptionsHTTP) GetHosts() []HostConfig { - if o == nil || IsNil(o.Hosts) { - var ret []HostConfig - return ret - } - return o.Hosts -} - -// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ProtocolOptionsHTTP) GetHostsOk() ([]HostConfig, bool) { - if o == nil || IsNil(o.Hosts) { - return nil, false - } - return o.Hosts, true -} - -// HasHosts returns a boolean if a field has been set. -func (o *ProtocolOptionsHTTP) HasHosts() bool { - if o != nil && !IsNil(o.Hosts) { - return true - } - - return false -} - -// SetHosts gets a reference to the given []HostConfig and assigns it to the Hosts field. -func (o *ProtocolOptionsHTTP) SetHosts(v []HostConfig) { - o.Hosts = v -} - -func (o ProtocolOptionsHTTP) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ProtocolOptionsHTTP) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Hosts) { - toSerialize["hosts"] = o.Hosts - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ProtocolOptionsHTTP) UnmarshalJSON(data []byte) (err error) { - varProtocolOptionsHTTP := _ProtocolOptionsHTTP{} - - err = json.Unmarshal(data, &varProtocolOptionsHTTP) - - if err != nil { - return err - } - - *o = ProtocolOptionsHTTP(varProtocolOptionsHTTP) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "hosts") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableProtocolOptionsHTTP struct { - value *ProtocolOptionsHTTP - isSet bool -} - -func (v NullableProtocolOptionsHTTP) Get() *ProtocolOptionsHTTP { - return v.value -} - -func (v *NullableProtocolOptionsHTTP) Set(val *ProtocolOptionsHTTP) { - v.value = val - v.isSet = true -} - -func (v NullableProtocolOptionsHTTP) IsSet() bool { - return v.isSet -} - -func (v *NullableProtocolOptionsHTTP) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProtocolOptionsHTTP(val *ProtocolOptionsHTTP) *NullableProtocolOptionsHTTP { - return &NullableProtocolOptionsHTTP{value: val, isSet: true} -} - -func (v NullableProtocolOptionsHTTP) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProtocolOptionsHTTP) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_protocol_options_https.go b/services/alb/v2beta2api/model_protocol_options_https.go deleted file mode 100644 index 659cf1ef6..000000000 --- a/services/alb/v2beta2api/model_protocol_options_https.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the ProtocolOptionsHTTPS type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProtocolOptionsHTTPS{} - -// ProtocolOptionsHTTPS Configuration for handling HTTPS traffic on this listener. -type ProtocolOptionsHTTPS struct { - CertificateConfig *CertificateConfig `json:"certificateConfig,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ProtocolOptionsHTTPS ProtocolOptionsHTTPS - -// NewProtocolOptionsHTTPS instantiates a new ProtocolOptionsHTTPS 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 NewProtocolOptionsHTTPS() *ProtocolOptionsHTTPS { - this := ProtocolOptionsHTTPS{} - return &this -} - -// NewProtocolOptionsHTTPSWithDefaults instantiates a new ProtocolOptionsHTTPS 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 NewProtocolOptionsHTTPSWithDefaults() *ProtocolOptionsHTTPS { - this := ProtocolOptionsHTTPS{} - return &this -} - -// GetCertificateConfig returns the CertificateConfig field value if set, zero value otherwise. -func (o *ProtocolOptionsHTTPS) GetCertificateConfig() CertificateConfig { - if o == nil || IsNil(o.CertificateConfig) { - var ret CertificateConfig - return ret - } - return *o.CertificateConfig -} - -// GetCertificateConfigOk returns a tuple with the CertificateConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ProtocolOptionsHTTPS) GetCertificateConfigOk() (*CertificateConfig, bool) { - if o == nil || IsNil(o.CertificateConfig) { - return nil, false - } - return o.CertificateConfig, true -} - -// HasCertificateConfig returns a boolean if a field has been set. -func (o *ProtocolOptionsHTTPS) HasCertificateConfig() bool { - if o != nil && !IsNil(o.CertificateConfig) { - return true - } - - return false -} - -// SetCertificateConfig gets a reference to the given CertificateConfig and assigns it to the CertificateConfig field. -func (o *ProtocolOptionsHTTPS) SetCertificateConfig(v CertificateConfig) { - o.CertificateConfig = &v -} - -func (o ProtocolOptionsHTTPS) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ProtocolOptionsHTTPS) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CertificateConfig) { - toSerialize["certificateConfig"] = o.CertificateConfig - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ProtocolOptionsHTTPS) UnmarshalJSON(data []byte) (err error) { - varProtocolOptionsHTTPS := _ProtocolOptionsHTTPS{} - - err = json.Unmarshal(data, &varProtocolOptionsHTTPS) - - if err != nil { - return err - } - - *o = ProtocolOptionsHTTPS(varProtocolOptionsHTTPS) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "certificateConfig") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableProtocolOptionsHTTPS struct { - value *ProtocolOptionsHTTPS - isSet bool -} - -func (v NullableProtocolOptionsHTTPS) Get() *ProtocolOptionsHTTPS { - return v.value -} - -func (v *NullableProtocolOptionsHTTPS) Set(val *ProtocolOptionsHTTPS) { - v.value = val - v.isSet = true -} - -func (v NullableProtocolOptionsHTTPS) IsSet() bool { - return v.isSet -} - -func (v *NullableProtocolOptionsHTTPS) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProtocolOptionsHTTPS(val *ProtocolOptionsHTTPS) *NullableProtocolOptionsHTTPS { - return &NullableProtocolOptionsHTTPS{value: val, isSet: true} -} - -func (v NullableProtocolOptionsHTTPS) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProtocolOptionsHTTPS) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_query_parameter.go b/services/alb/v2beta2api/model_query_parameter.go deleted file mode 100644 index 677a1d6c8..000000000 --- a/services/alb/v2beta2api/model_query_parameter.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the QueryParameter type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryParameter{} - -// QueryParameter struct for QueryParameter -type QueryParameter struct { - // Exact match for the parameter value. - ExactMatch *string `json:"exactMatch,omitempty"` - // Parameter name. - Name *string `json:"name,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _QueryParameter QueryParameter - -// NewQueryParameter instantiates a new QueryParameter 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 NewQueryParameter() *QueryParameter { - this := QueryParameter{} - return &this -} - -// NewQueryParameterWithDefaults instantiates a new QueryParameter 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 NewQueryParameterWithDefaults() *QueryParameter { - this := QueryParameter{} - return &this -} - -// GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *QueryParameter) GetExactMatch() string { - if o == nil || IsNil(o.ExactMatch) { - var ret string - return ret - } - return *o.ExactMatch -} - -// GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryParameter) GetExactMatchOk() (*string, bool) { - if o == nil || IsNil(o.ExactMatch) { - return nil, false - } - return o.ExactMatch, true -} - -// HasExactMatch returns a boolean if a field has been set. -func (o *QueryParameter) HasExactMatch() bool { - if o != nil && !IsNil(o.ExactMatch) { - return true - } - - return false -} - -// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *QueryParameter) SetExactMatch(v string) { - o.ExactMatch = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *QueryParameter) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryParameter) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *QueryParameter) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *QueryParameter) SetName(v string) { - o.Name = &v -} - -func (o QueryParameter) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryParameter) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ExactMatch) { - toSerialize["exactMatch"] = o.ExactMatch - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *QueryParameter) UnmarshalJSON(data []byte) (err error) { - varQueryParameter := _QueryParameter{} - - err = json.Unmarshal(data, &varQueryParameter) - - if err != nil { - return err - } - - *o = QueryParameter(varQueryParameter) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "exactMatch") - delete(additionalProperties, "name") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableQueryParameter struct { - value *QueryParameter - isSet bool -} - -func (v NullableQueryParameter) Get() *QueryParameter { - return v.value -} - -func (v *NullableQueryParameter) Set(val *QueryParameter) { - v.value = val - v.isSet = true -} - -func (v NullableQueryParameter) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryParameter) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryParameter(val *QueryParameter) *NullableQueryParameter { - return &NullableQueryParameter{value: val, isSet: true} -} - -func (v NullableQueryParameter) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryParameter) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_rule.go b/services/alb/v2beta2api/model_rule.go deleted file mode 100644 index e0baece2c..000000000 --- a/services/alb/v2beta2api/model_rule.go +++ /dev/null @@ -1,380 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Rule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Rule{} - -// Rule struct for Rule -type Rule struct { - CookiePersistence *CookiePersistence `json:"cookiePersistence,omitempty"` - // Headers for the rule. - Headers []HttpHeader `json:"headers,omitempty"` - Path *Path `json:"path,omitempty"` - // Legacy path prefix match. Optional. If not set, defaults to root path '/'. Cannot be set if 'path' is used. Prefer using 'path.prefix' instead. Only matches on full segment boundaries, e.g. '/foo' matches '/foo' and '/foo/bar' but NOT '/foobar'. - PathPrefix *string `json:"pathPrefix,omitempty"` - // Query Parameters for the rule. - QueryParameters []QueryParameter `json:"queryParameters,omitempty"` - // Reference target pool by target pool name. - TargetPool *string `json:"targetPool,omitempty"` - // If enabled, when client sends an HTTP request with and Upgrade header, indicating the desire to establish a Websocket connection, if backend server supports WebSocket, it responds with HTTP 101 status code, switching protocols from HTTP to WebSocket. Hence the client and the server can exchange data in real-time using one long-lived TCP connection. - WebSocket *bool `json:"webSocket,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Rule Rule - -// NewRule instantiates a new Rule 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 NewRule() *Rule { - this := Rule{} - return &this -} - -// NewRuleWithDefaults instantiates a new Rule 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 NewRuleWithDefaults() *Rule { - this := Rule{} - return &this -} - -// GetCookiePersistence returns the CookiePersistence field value if set, zero value otherwise. -func (o *Rule) GetCookiePersistence() CookiePersistence { - if o == nil || IsNil(o.CookiePersistence) { - var ret CookiePersistence - return ret - } - return *o.CookiePersistence -} - -// GetCookiePersistenceOk returns a tuple with the CookiePersistence field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetCookiePersistenceOk() (*CookiePersistence, bool) { - if o == nil || IsNil(o.CookiePersistence) { - return nil, false - } - return o.CookiePersistence, true -} - -// HasCookiePersistence returns a boolean if a field has been set. -func (o *Rule) HasCookiePersistence() bool { - if o != nil && !IsNil(o.CookiePersistence) { - return true - } - - return false -} - -// SetCookiePersistence gets a reference to the given CookiePersistence and assigns it to the CookiePersistence field. -func (o *Rule) SetCookiePersistence(v CookiePersistence) { - o.CookiePersistence = &v -} - -// GetHeaders returns the Headers field value if set, zero value otherwise. -func (o *Rule) GetHeaders() []HttpHeader { - if o == nil || IsNil(o.Headers) { - var ret []HttpHeader - return ret - } - return o.Headers -} - -// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetHeadersOk() ([]HttpHeader, bool) { - if o == nil || IsNil(o.Headers) { - return nil, false - } - return o.Headers, true -} - -// HasHeaders returns a boolean if a field has been set. -func (o *Rule) HasHeaders() bool { - if o != nil && !IsNil(o.Headers) { - return true - } - - return false -} - -// SetHeaders gets a reference to the given []HttpHeader and assigns it to the Headers field. -func (o *Rule) SetHeaders(v []HttpHeader) { - o.Headers = v -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *Rule) GetPath() Path { - if o == nil || IsNil(o.Path) { - var ret Path - return ret - } - return *o.Path -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetPathOk() (*Path, bool) { - if o == nil || IsNil(o.Path) { - return nil, false - } - return o.Path, true -} - -// HasPath returns a boolean if a field has been set. -func (o *Rule) HasPath() bool { - if o != nil && !IsNil(o.Path) { - return true - } - - return false -} - -// SetPath gets a reference to the given Path and assigns it to the Path field. -func (o *Rule) SetPath(v Path) { - o.Path = &v -} - -// GetPathPrefix returns the PathPrefix field value if set, zero value otherwise. -func (o *Rule) GetPathPrefix() string { - if o == nil || IsNil(o.PathPrefix) { - var ret string - return ret - } - return *o.PathPrefix -} - -// GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetPathPrefixOk() (*string, bool) { - if o == nil || IsNil(o.PathPrefix) { - return nil, false - } - return o.PathPrefix, true -} - -// HasPathPrefix returns a boolean if a field has been set. -func (o *Rule) HasPathPrefix() bool { - if o != nil && !IsNil(o.PathPrefix) { - return true - } - - return false -} - -// SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field. -func (o *Rule) SetPathPrefix(v string) { - o.PathPrefix = &v -} - -// GetQueryParameters returns the QueryParameters field value if set, zero value otherwise. -func (o *Rule) GetQueryParameters() []QueryParameter { - if o == nil || IsNil(o.QueryParameters) { - var ret []QueryParameter - return ret - } - return o.QueryParameters -} - -// GetQueryParametersOk returns a tuple with the QueryParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetQueryParametersOk() ([]QueryParameter, bool) { - if o == nil || IsNil(o.QueryParameters) { - return nil, false - } - return o.QueryParameters, true -} - -// HasQueryParameters returns a boolean if a field has been set. -func (o *Rule) HasQueryParameters() bool { - if o != nil && !IsNil(o.QueryParameters) { - return true - } - - return false -} - -// SetQueryParameters gets a reference to the given []QueryParameter and assigns it to the QueryParameters field. -func (o *Rule) SetQueryParameters(v []QueryParameter) { - o.QueryParameters = v -} - -// GetTargetPool returns the TargetPool field value if set, zero value otherwise. -func (o *Rule) GetTargetPool() string { - if o == nil || IsNil(o.TargetPool) { - var ret string - return ret - } - return *o.TargetPool -} - -// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetTargetPoolOk() (*string, bool) { - if o == nil || IsNil(o.TargetPool) { - return nil, false - } - return o.TargetPool, true -} - -// HasTargetPool returns a boolean if a field has been set. -func (o *Rule) HasTargetPool() bool { - if o != nil && !IsNil(o.TargetPool) { - return true - } - - return false -} - -// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. -func (o *Rule) SetTargetPool(v string) { - o.TargetPool = &v -} - -// GetWebSocket returns the WebSocket field value if set, zero value otherwise. -func (o *Rule) GetWebSocket() bool { - if o == nil || IsNil(o.WebSocket) { - var ret bool - return ret - } - return *o.WebSocket -} - -// GetWebSocketOk returns a tuple with the WebSocket field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Rule) GetWebSocketOk() (*bool, bool) { - if o == nil || IsNil(o.WebSocket) { - return nil, false - } - return o.WebSocket, true -} - -// HasWebSocket returns a boolean if a field has been set. -func (o *Rule) HasWebSocket() bool { - if o != nil && !IsNil(o.WebSocket) { - return true - } - - return false -} - -// SetWebSocket gets a reference to the given bool and assigns it to the WebSocket field. -func (o *Rule) SetWebSocket(v bool) { - o.WebSocket = &v -} - -func (o Rule) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Rule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CookiePersistence) { - toSerialize["cookiePersistence"] = o.CookiePersistence - } - if !IsNil(o.Headers) { - toSerialize["headers"] = o.Headers - } - if !IsNil(o.Path) { - toSerialize["path"] = o.Path - } - if !IsNil(o.PathPrefix) { - toSerialize["pathPrefix"] = o.PathPrefix - } - if !IsNil(o.QueryParameters) { - toSerialize["queryParameters"] = o.QueryParameters - } - if !IsNil(o.TargetPool) { - toSerialize["targetPool"] = o.TargetPool - } - if !IsNil(o.WebSocket) { - toSerialize["webSocket"] = o.WebSocket - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Rule) UnmarshalJSON(data []byte) (err error) { - varRule := _Rule{} - - err = json.Unmarshal(data, &varRule) - - if err != nil { - return err - } - - *o = Rule(varRule) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "cookiePersistence") - delete(additionalProperties, "headers") - delete(additionalProperties, "path") - delete(additionalProperties, "pathPrefix") - delete(additionalProperties, "queryParameters") - delete(additionalProperties, "targetPool") - delete(additionalProperties, "webSocket") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRule struct { - value *Rule - isSet bool -} - -func (v NullableRule) Get() *Rule { - return v.value -} - -func (v *NullableRule) Set(val *Rule) { - v.value = val - v.isSet = true -} - -func (v NullableRule) IsSet() bool { - return v.isSet -} - -func (v *NullableRule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRule(val *Rule) *NullableRule { - return &NullableRule{value: val, isSet: true} -} - -func (v NullableRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_security_group.go b/services/alb/v2beta2api/model_security_group.go deleted file mode 100644 index 52b3f8bad..000000000 --- a/services/alb/v2beta2api/model_security_group.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the SecurityGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecurityGroup{} - -// SecurityGroup struct for SecurityGroup -type SecurityGroup struct { - // ID of the security Group - Id *string `json:"id,omitempty"` - // Name of the security Group - Name *string `json:"name,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _SecurityGroup SecurityGroup - -// NewSecurityGroup instantiates a new SecurityGroup 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 NewSecurityGroup() *SecurityGroup { - this := SecurityGroup{} - return &this -} - -// NewSecurityGroupWithDefaults instantiates a new SecurityGroup 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 NewSecurityGroupWithDefaults() *SecurityGroup { - this := SecurityGroup{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SecurityGroup) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecurityGroup) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SecurityGroup) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *SecurityGroup) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *SecurityGroup) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecurityGroup) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *SecurityGroup) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *SecurityGroup) SetName(v string) { - o.Name = &v -} - -func (o SecurityGroup) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecurityGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *SecurityGroup) UnmarshalJSON(data []byte) (err error) { - varSecurityGroup := _SecurityGroup{} - - err = json.Unmarshal(data, &varSecurityGroup) - - if err != nil { - return err - } - - *o = SecurityGroup(varSecurityGroup) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "name") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableSecurityGroup struct { - value *SecurityGroup - isSet bool -} - -func (v NullableSecurityGroup) Get() *SecurityGroup { - return v.value -} - -func (v *NullableSecurityGroup) Set(val *SecurityGroup) { - v.value = val - v.isSet = true -} - -func (v NullableSecurityGroup) IsSet() bool { - return v.isSet -} - -func (v *NullableSecurityGroup) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecurityGroup(val *SecurityGroup) *NullableSecurityGroup { - return &NullableSecurityGroup{value: val, isSet: true} -} - -func (v NullableSecurityGroup) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecurityGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_status.go b/services/alb/v2beta2api/model_status.go deleted file mode 100644 index c96dbc30b..000000000 --- a/services/alb/v2beta2api/model_status.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Status type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Status{} - -// Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). -type Status struct { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - Code *int32 `json:"code,omitempty"` - // A list of messages that carry the error details. There is a common set of message types for APIs to use. - Details []GoogleProtobufAny `json:"details,omitempty"` - // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - Message *string `json:"message,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Status Status - -// NewStatus instantiates a new Status 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 NewStatus() *Status { - this := Status{} - return &this -} - -// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status { - this := Status{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *Status) GetCode() int32 { - if o == nil || IsNil(o.Code) { - var ret int32 - return ret - } - return *o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetCodeOk() (*int32, bool) { - if o == nil || IsNil(o.Code) { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *Status) HasCode() bool { - if o != nil && !IsNil(o.Code) { - return true - } - - return false -} - -// SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *Status) SetCode(v int32) { - o.Code = &v -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *Status) GetDetails() []GoogleProtobufAny { - if o == nil || IsNil(o.Details) { - var ret []GoogleProtobufAny - return ret - } - return o.Details -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetDetailsOk() ([]GoogleProtobufAny, bool) { - if o == nil || IsNil(o.Details) { - return nil, false - } - return o.Details, true -} - -// HasDetails returns a boolean if a field has been set. -func (o *Status) HasDetails() bool { - if o != nil && !IsNil(o.Details) { - return true - } - - return false -} - -// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. -func (o *Status) SetDetails(v []GoogleProtobufAny) { - o.Details = v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Status) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Status) SetMessage(v string) { - o.Message = &v -} - -func (o Status) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Status) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Code) { - toSerialize["code"] = o.Code - } - if !IsNil(o.Details) { - toSerialize["details"] = o.Details - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Status) UnmarshalJSON(data []byte) (err error) { - varStatus := _Status{} - - err = json.Unmarshal(data, &varStatus) - - if err != nil { - return err - } - - *o = Status(varStatus) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "details") - delete(additionalProperties, "message") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableStatus struct { - value *Status - isSet bool -} - -func (v NullableStatus) Get() *Status { - return v.value -} - -func (v *NullableStatus) Set(val *Status) { - v.value = val - v.isSet = true -} - -func (v NullableStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatus(val *Status) *NullableStatus { - return &NullableStatus{value: val, isSet: true} -} - -func (v NullableStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_target.go b/services/alb/v2beta2api/model_target.go deleted file mode 100644 index 86756eb49..000000000 --- a/services/alb/v2beta2api/model_target.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the Target type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Target{} - -// Target struct for Target -type Target struct { - // Target name - DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-zA-Z](?:(?:[0-9a-zA-Z]|-){0,61}[0-9a-zA-Z])?$"` - // Target IP. Must by unique within a target pool. - Ip *string `json:"ip,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Target Target - -// NewTarget instantiates a new Target 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 NewTarget() *Target { - this := Target{} - return &this -} - -// NewTargetWithDefaults instantiates a new Target 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 NewTargetWithDefaults() *Target { - this := Target{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *Target) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Target) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *Target) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *Target) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetIp returns the Ip field value if set, zero value otherwise. -func (o *Target) GetIp() string { - if o == nil || IsNil(o.Ip) { - var ret string - return ret - } - return *o.Ip -} - -// GetIpOk returns a tuple with the Ip field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Target) GetIpOk() (*string, bool) { - if o == nil || IsNil(o.Ip) { - return nil, false - } - return o.Ip, true -} - -// HasIp returns a boolean if a field has been set. -func (o *Target) HasIp() bool { - if o != nil && !IsNil(o.Ip) { - return true - } - - return false -} - -// SetIp gets a reference to the given string and assigns it to the Ip field. -func (o *Target) SetIp(v string) { - o.Ip = &v -} - -func (o Target) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Target) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName - } - if !IsNil(o.Ip) { - toSerialize["ip"] = o.Ip - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Target) UnmarshalJSON(data []byte) (err error) { - varTarget := _Target{} - - err = json.Unmarshal(data, &varTarget) - - if err != nil { - return err - } - - *o = Target(varTarget) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "displayName") - delete(additionalProperties, "ip") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableTarget struct { - value *Target - isSet bool -} - -func (v NullableTarget) Get() *Target { - return v.value -} - -func (v *NullableTarget) Set(val *Target) { - v.value = val - v.isSet = true -} - -func (v NullableTarget) IsSet() bool { - return v.isSet -} - -func (v *NullableTarget) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTarget(val *Target) *NullableTarget { - return &NullableTarget{value: val, isSet: true} -} - -func (v NullableTarget) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTarget) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_target_pool.go b/services/alb/v2beta2api/model_target_pool.go deleted file mode 100644 index 3aba9eb1e..000000000 --- a/services/alb/v2beta2api/model_target_pool.go +++ /dev/null @@ -1,304 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the TargetPool type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TargetPool{} - -// TargetPool struct for TargetPool -type TargetPool struct { - ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` - // Target pool name - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // The number identifying the port where each target listens for traffic. - TargetPort *int32 `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets []Target `json:"targets,omitempty"` - TlsConfig *TargetPoolTlsConfig `json:"tlsConfig,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _TargetPool TargetPool - -// NewTargetPool instantiates a new TargetPool 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 NewTargetPool() *TargetPool { - this := TargetPool{} - return &this -} - -// NewTargetPoolWithDefaults instantiates a new TargetPool 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 NewTargetPoolWithDefaults() *TargetPool { - this := TargetPool{} - return &this -} - -// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -func (o *TargetPool) GetActiveHealthCheck() ActiveHealthCheck { - if o == nil || IsNil(o.ActiveHealthCheck) { - var ret ActiveHealthCheck - return ret - } - return *o.ActiveHealthCheck -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { - if o == nil || IsNil(o.ActiveHealthCheck) { - return nil, false - } - return o.ActiveHealthCheck, true -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -func (o *TargetPool) HasActiveHealthCheck() bool { - if o != nil && !IsNil(o.ActiveHealthCheck) { - return true - } - - return false -} - -// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -func (o *TargetPool) SetActiveHealthCheck(v ActiveHealthCheck) { - o.ActiveHealthCheck = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *TargetPool) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *TargetPool) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *TargetPool) SetName(v string) { - o.Name = &v -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *TargetPool) GetTargetPort() int32 { - if o == nil || IsNil(o.TargetPort) { - var ret int32 - return ret - } - return *o.TargetPort -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetPortOk() (*int32, bool) { - if o == nil || IsNil(o.TargetPort) { - return nil, false - } - return o.TargetPort, true -} - -// HasTargetPort returns a boolean if a field has been set. -func (o *TargetPool) HasTargetPort() bool { - if o != nil && !IsNil(o.TargetPort) { - return true - } - - return false -} - -// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. -func (o *TargetPool) SetTargetPort(v int32) { - o.TargetPort = &v -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -func (o *TargetPool) GetTargets() []Target { - if o == nil || IsNil(o.Targets) { - var ret []Target - return ret - } - return o.Targets -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetsOk() ([]Target, bool) { - if o == nil || IsNil(o.Targets) { - return nil, false - } - return o.Targets, true -} - -// HasTargets returns a boolean if a field has been set. -func (o *TargetPool) HasTargets() bool { - if o != nil && !IsNil(o.Targets) { - return true - } - - return false -} - -// SetTargets gets a reference to the given []Target and assigns it to the Targets field. -func (o *TargetPool) SetTargets(v []Target) { - o.Targets = v -} - -// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. -func (o *TargetPool) GetTlsConfig() TargetPoolTlsConfig { - if o == nil || IsNil(o.TlsConfig) { - var ret TargetPoolTlsConfig - return ret - } - return *o.TlsConfig -} - -// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPool) GetTlsConfigOk() (*TargetPoolTlsConfig, bool) { - if o == nil || IsNil(o.TlsConfig) { - return nil, false - } - return o.TlsConfig, true -} - -// HasTlsConfig returns a boolean if a field has been set. -func (o *TargetPool) HasTlsConfig() bool { - if o != nil && !IsNil(o.TlsConfig) { - return true - } - - return false -} - -// SetTlsConfig gets a reference to the given TargetPoolTlsConfig and assigns it to the TlsConfig field. -func (o *TargetPool) SetTlsConfig(v TargetPoolTlsConfig) { - o.TlsConfig = &v -} - -func (o TargetPool) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TargetPool) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ActiveHealthCheck) { - toSerialize["activeHealthCheck"] = o.ActiveHealthCheck - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.TargetPort) { - toSerialize["targetPort"] = o.TargetPort - } - if !IsNil(o.Targets) { - toSerialize["targets"] = o.Targets - } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *TargetPool) UnmarshalJSON(data []byte) (err error) { - varTargetPool := _TargetPool{} - - err = json.Unmarshal(data, &varTargetPool) - - if err != nil { - return err - } - - *o = TargetPool(varTargetPool) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "activeHealthCheck") - delete(additionalProperties, "name") - delete(additionalProperties, "targetPort") - delete(additionalProperties, "targets") - delete(additionalProperties, "tlsConfig") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableTargetPool struct { - value *TargetPool - isSet bool -} - -func (v NullableTargetPool) Get() *TargetPool { - return v.value -} - -func (v *NullableTargetPool) Set(val *TargetPool) { - v.value = val - v.isSet = true -} - -func (v NullableTargetPool) IsSet() bool { - return v.isSet -} - -func (v *NullableTargetPool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTargetPool(val *TargetPool) *NullableTargetPool { - return &NullableTargetPool{value: val, isSet: true} -} - -func (v NullableTargetPool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTargetPool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_target_pool_tls_config.go b/services/alb/v2beta2api/model_target_pool_tls_config.go deleted file mode 100644 index 6c7b7bc64..000000000 --- a/services/alb/v2beta2api/model_target_pool_tls_config.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the TargetPoolTlsConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TargetPoolTlsConfig{} - -// TargetPoolTlsConfig struct for TargetPoolTlsConfig -type TargetPoolTlsConfig struct { - // Specifies a custom Certificate Authority (CA). When provided, the target pool will trust certificates signed by this CA, in addition to any system-trusted CAs. This is useful for scenarios where the target pool needs to communicate with servers using self-signed or internally-issued certificates. - CustomCa *string `json:"customCa,omitempty"` - // Enable or disable TLS (Transport Layer Security) for connections to the target pool. When enabled, the load balancer will establish secure connections using TLS to the target pool. - Enabled *bool `json:"enabled,omitempty"` - // Bypass certificate validation for TLS connections to the target pool. This option is insecure. - SkipCertificateValidation *bool `json:"skipCertificateValidation,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _TargetPoolTlsConfig TargetPoolTlsConfig - -// NewTargetPoolTlsConfig instantiates a new TargetPoolTlsConfig 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 NewTargetPoolTlsConfig() *TargetPoolTlsConfig { - this := TargetPoolTlsConfig{} - return &this -} - -// NewTargetPoolTlsConfigWithDefaults instantiates a new TargetPoolTlsConfig 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 NewTargetPoolTlsConfigWithDefaults() *TargetPoolTlsConfig { - this := TargetPoolTlsConfig{} - return &this -} - -// GetCustomCa returns the CustomCa field value if set, zero value otherwise. -func (o *TargetPoolTlsConfig) GetCustomCa() string { - if o == nil || IsNil(o.CustomCa) { - var ret string - return ret - } - return *o.CustomCa -} - -// GetCustomCaOk returns a tuple with the CustomCa field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPoolTlsConfig) GetCustomCaOk() (*string, bool) { - if o == nil || IsNil(o.CustomCa) { - return nil, false - } - return o.CustomCa, true -} - -// HasCustomCa returns a boolean if a field has been set. -func (o *TargetPoolTlsConfig) HasCustomCa() bool { - if o != nil && !IsNil(o.CustomCa) { - return true - } - - return false -} - -// SetCustomCa gets a reference to the given string and assigns it to the CustomCa field. -func (o *TargetPoolTlsConfig) SetCustomCa(v string) { - o.CustomCa = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *TargetPoolTlsConfig) GetEnabled() bool { - if o == nil || IsNil(o.Enabled) { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPoolTlsConfig) GetEnabledOk() (*bool, bool) { - if o == nil || IsNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *TargetPoolTlsConfig) HasEnabled() bool { - if o != nil && !IsNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *TargetPoolTlsConfig) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetSkipCertificateValidation returns the SkipCertificateValidation field value if set, zero value otherwise. -func (o *TargetPoolTlsConfig) GetSkipCertificateValidation() bool { - if o == nil || IsNil(o.SkipCertificateValidation) { - var ret bool - return ret - } - return *o.SkipCertificateValidation -} - -// GetSkipCertificateValidationOk returns a tuple with the SkipCertificateValidation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TargetPoolTlsConfig) GetSkipCertificateValidationOk() (*bool, bool) { - if o == nil || IsNil(o.SkipCertificateValidation) { - return nil, false - } - return o.SkipCertificateValidation, true -} - -// HasSkipCertificateValidation returns a boolean if a field has been set. -func (o *TargetPoolTlsConfig) HasSkipCertificateValidation() bool { - if o != nil && !IsNil(o.SkipCertificateValidation) { - return true - } - - return false -} - -// SetSkipCertificateValidation gets a reference to the given bool and assigns it to the SkipCertificateValidation field. -func (o *TargetPoolTlsConfig) SetSkipCertificateValidation(v bool) { - o.SkipCertificateValidation = &v -} - -func (o TargetPoolTlsConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TargetPoolTlsConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomCa) { - toSerialize["customCa"] = o.CustomCa - } - if !IsNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !IsNil(o.SkipCertificateValidation) { - toSerialize["skipCertificateValidation"] = o.SkipCertificateValidation - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *TargetPoolTlsConfig) UnmarshalJSON(data []byte) (err error) { - varTargetPoolTlsConfig := _TargetPoolTlsConfig{} - - err = json.Unmarshal(data, &varTargetPoolTlsConfig) - - if err != nil { - return err - } - - *o = TargetPoolTlsConfig(varTargetPoolTlsConfig) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "customCa") - delete(additionalProperties, "enabled") - delete(additionalProperties, "skipCertificateValidation") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableTargetPoolTlsConfig struct { - value *TargetPoolTlsConfig - isSet bool -} - -func (v NullableTargetPoolTlsConfig) Get() *TargetPoolTlsConfig { - return v.value -} - -func (v *NullableTargetPoolTlsConfig) Set(val *TargetPoolTlsConfig) { - v.value = val - v.isSet = true -} - -func (v NullableTargetPoolTlsConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableTargetPoolTlsConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTargetPoolTlsConfig(val *TargetPoolTlsConfig) *NullableTargetPoolTlsConfig { - return &NullableTargetPoolTlsConfig{value: val, isSet: true} -} - -func (v NullableTargetPoolTlsConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTargetPoolTlsConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_update_credentials_payload.go b/services/alb/v2beta2api/model_update_credentials_payload.go deleted file mode 100644 index 0efad222d..000000000 --- a/services/alb/v2beta2api/model_update_credentials_payload.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsPayload{} - -// UpdateCredentialsPayload struct for UpdateCredentialsPayload -type UpdateCredentialsPayload struct { - // Credential name - DisplayName *string `json:"displayName,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,251}[0-9a-z])?$"` - // A valid password used for an existing STACKIT Observability instance, which is used during basic auth. - Password *string `json:"password,omitempty"` - // A valid username used for an existing STACKIT Observability instance, which is used during basic auth. - Username *string `json:"username,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateCredentialsPayload UpdateCredentialsPayload - -// NewUpdateCredentialsPayload instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayload() *UpdateCredentialsPayload { - this := UpdateCredentialsPayload{} - return &this -} - -// NewUpdateCredentialsPayloadWithDefaults instantiates a new UpdateCredentialsPayload 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 NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { - this := UpdateCredentialsPayload{} - return &this -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *UpdateCredentialsPayload) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *UpdateCredentialsPayload) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetPassword() string { - if o == nil || IsNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *UpdateCredentialsPayload) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *UpdateCredentialsPayload) SetPassword(v string) { - o.Password = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *UpdateCredentialsPayload) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *UpdateCredentialsPayload) SetUsername(v string) { - o.Username = &v -} - -func (o UpdateCredentialsPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName - } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateCredentialsPayload) UnmarshalJSON(data []byte) (err error) { - varUpdateCredentialsPayload := _UpdateCredentialsPayload{} - - err = json.Unmarshal(data, &varUpdateCredentialsPayload) - - if err != nil { - return err - } - - *o = UpdateCredentialsPayload(varUpdateCredentialsPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "displayName") - delete(additionalProperties, "password") - delete(additionalProperties, "username") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateCredentialsPayload struct { - value *UpdateCredentialsPayload - isSet bool -} - -func (v NullableUpdateCredentialsPayload) Get() *UpdateCredentialsPayload { - return v.value -} - -func (v *NullableUpdateCredentialsPayload) Set(val *UpdateCredentialsPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateCredentialsPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateCredentialsPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateCredentialsPayload(val *UpdateCredentialsPayload) *NullableUpdateCredentialsPayload { - return &NullableUpdateCredentialsPayload{value: val, isSet: true} -} - -func (v NullableUpdateCredentialsPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateCredentialsPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_update_credentials_response.go b/services/alb/v2beta2api/model_update_credentials_response.go deleted file mode 100644 index 823a56def..000000000 --- a/services/alb/v2beta2api/model_update_credentials_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateCredentialsResponse{} - -// UpdateCredentialsResponse struct for UpdateCredentialsResponse -type UpdateCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateCredentialsResponse UpdateCredentialsResponse - -// NewUpdateCredentialsResponse instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponse() *UpdateCredentialsResponse { - this := UpdateCredentialsResponse{} - return &this -} - -// NewUpdateCredentialsResponseWithDefaults instantiates a new UpdateCredentialsResponse 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 NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { - this := UpdateCredentialsResponse{} - return &this -} - -// GetCredential returns the Credential field value if set, zero value otherwise. -func (o *UpdateCredentialsResponse) GetCredential() CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret CredentialsResponse - return ret - } - return *o.Credential -} - -// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true -} - -// HasCredential returns a boolean if a field has been set. -func (o *UpdateCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false -} - -// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *UpdateCredentialsResponse) SetCredential(v CredentialsResponse) { - o.Credential = &v -} - -func (o UpdateCredentialsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateCredentialsResponse) UnmarshalJSON(data []byte) (err error) { - varUpdateCredentialsResponse := _UpdateCredentialsResponse{} - - err = json.Unmarshal(data, &varUpdateCredentialsResponse) - - if err != nil { - return err - } - - *o = UpdateCredentialsResponse(varUpdateCredentialsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "credential") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateCredentialsResponse struct { - value *UpdateCredentialsResponse - isSet bool -} - -func (v NullableUpdateCredentialsResponse) Get() *UpdateCredentialsResponse { - return v.value -} - -func (v *NullableUpdateCredentialsResponse) Set(val *UpdateCredentialsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateCredentialsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateCredentialsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateCredentialsResponse(val *UpdateCredentialsResponse) *NullableUpdateCredentialsResponse { - return &NullableUpdateCredentialsResponse{value: val, isSet: true} -} - -func (v NullableUpdateCredentialsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateCredentialsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_update_load_balancer_payload.go b/services/alb/v2beta2api/model_update_load_balancer_payload.go deleted file mode 100644 index 724b6ac8f..000000000 --- a/services/alb/v2beta2api/model_update_load_balancer_payload.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateLoadBalancerPayload{} - -// UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload -type UpdateLoadBalancerPayload struct { - // Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation. - DisableTargetSecurityGroupAssignment *bool `json:"disableTargetSecurityGroupAssignment,omitempty"` - // Reports all errors a application load balancer has. - Errors []LoadBalancerError `json:"errors,omitempty"` - // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` - // Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **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"` - // There is a maximum listener count of 20. - Listeners []Listener `json:"listeners,omitempty"` - // Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - LoadBalancerSecurityGroup *SecurityGroup `json:"loadBalancerSecurityGroup,omitempty"` - // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks []Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` - // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` - // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - // Region of the LoadBalancer. - Region *string `json:"region,omitempty"` - Status *UpdateLoadBalancerPayloadStatus `json:"status,omitempty"` - // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools []TargetPool `json:"targetPools,omitempty"` - // Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets. - TargetSecurityGroup *SecurityGroup `json:"targetSecurityGroup,omitempty"` - // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateLoadBalancerPayload UpdateLoadBalancerPayload - -// NewUpdateLoadBalancerPayload instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayload() *UpdateLoadBalancerPayload { - this := UpdateLoadBalancerPayload{} - return &this -} - -// NewUpdateLoadBalancerPayloadWithDefaults instantiates a new UpdateLoadBalancerPayload 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 NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload { - this := UpdateLoadBalancerPayload{} - return &this -} - -// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() bool { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - var ret bool - return ret - } - return *o.DisableTargetSecurityGroupAssignment -} - -// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (*bool, bool) { - if o == nil || IsNil(o.DisableTargetSecurityGroupAssignment) { - return nil, false - } - return o.DisableTargetSecurityGroupAssignment, true -} - -// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool { - if o != nil && !IsNil(o.DisableTargetSecurityGroupAssignment) { - return true - } - - return false -} - -// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field. -func (o *UpdateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v bool) { - o.DisableTargetSecurityGroupAssignment = &v -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetErrors() []LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret []LoadBalancerError - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetErrorsOk() ([]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *UpdateLoadBalancerPayload) SetErrors(v []LoadBalancerError) { - o.Errors = v -} - -// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetExternalAddress() string { - if o == nil || IsNil(o.ExternalAddress) { - var ret string - return ret - } - return *o.ExternalAddress -} - -// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true -} - -// HasExternalAddress returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false -} - -// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *UpdateLoadBalancerPayload) SetExternalAddress(v string) { - o.ExternalAddress = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetLabels() map[string]string { - if o == nil || IsNil(o.Labels) { - var ret map[string]string - return ret - } - return *o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *UpdateLoadBalancerPayload) SetLabels(v map[string]string) { - o.Labels = &v -} - -// GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetListeners() []Listener { - if o == nil || IsNil(o.Listeners) { - var ret []Listener - return ret - } - return o.Listeners -} - -// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetListenersOk() ([]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true -} - -// HasListeners returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false -} - -// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *UpdateLoadBalancerPayload) SetListeners(v []Listener) { - o.Listeners = v -} - -// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.LoadBalancerSecurityGroup -} - -// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.LoadBalancerSecurityGroup) { - return nil, false - } - return o.LoadBalancerSecurityGroup, true -} - -// HasLoadBalancerSecurityGroup returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool { - if o != nil && !IsNil(o.LoadBalancerSecurityGroup) { - return true - } - - return false -} - -// SetLoadBalancerSecurityGroup gets a reference to the given SecurityGroup and assigns it to the LoadBalancerSecurityGroup field. -func (o *UpdateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v SecurityGroup) { - o.LoadBalancerSecurityGroup = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateLoadBalancerPayload) SetName(v string) { - o.Name = &v -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetNetworks() []Network { - if o == nil || IsNil(o.Networks) { - var ret []Network - return ret - } - return o.Networks -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNetworksOk() ([]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true -} - -// HasNetworks returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false -} - -// SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *UpdateLoadBalancerPayload) SetNetworks(v []Network) { - o.Networks = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetOptions() LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret LoadBalancerOptions - return ret - } - return *o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *UpdateLoadBalancerPayload) SetOptions(v LoadBalancerOptions) { - o.Options = &v -} - -// GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPlanId() string { - if o == nil || IsNil(o.PlanId) { - var ret string - return ret - } - return *o.PlanId -} - -// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true -} - -// HasPlanId returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasPlanId() bool { - if o != nil && !IsNil(o.PlanId) { - return true - } - - return false -} - -// SetPlanId gets a reference to the given string and assigns it to the PlanId field. -func (o *UpdateLoadBalancerPayload) SetPlanId(v string) { - o.PlanId = &v -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPrivateAddress() string { - if o == nil || IsNil(o.PrivateAddress) { - var ret string - return ret - } - return *o.PrivateAddress -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true -} - -// HasPrivateAddress returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false -} - -// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v string) { - o.PrivateAddress = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetRegion(v string) { - o.Region = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetStatus() UpdateLoadBalancerPayloadStatus { - if o == nil || IsNil(o.Status) { - var ret UpdateLoadBalancerPayloadStatus - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetStatusOk() (*UpdateLoadBalancerPayloadStatus, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given UpdateLoadBalancerPayloadStatus and assigns it to the Status field. -func (o *UpdateLoadBalancerPayload) SetStatus(v UpdateLoadBalancerPayloadStatus) { - o.Status = &v -} - -// GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetTargetPools() []TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret []TargetPool - return ret - } - return o.TargetPools -} - -// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() ([]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true -} - -// HasTargetPools returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false -} - -// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *UpdateLoadBalancerPayload) SetTargetPools(v []TargetPool) { - o.TargetPools = v -} - -// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroup() SecurityGroup { - if o == nil || IsNil(o.TargetSecurityGroup) { - var ret SecurityGroup - return ret - } - return *o.TargetSecurityGroup -} - -// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetTargetSecurityGroupOk() (*SecurityGroup, bool) { - if o == nil || IsNil(o.TargetSecurityGroup) { - return nil, false - } - return o.TargetSecurityGroup, true -} - -// HasTargetSecurityGroup returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasTargetSecurityGroup() bool { - if o != nil && !IsNil(o.TargetSecurityGroup) { - return true - } - - return false -} - -// SetTargetSecurityGroup gets a reference to the given SecurityGroup and assigns it to the TargetSecurityGroup field. -func (o *UpdateLoadBalancerPayload) SetTargetSecurityGroup(v SecurityGroup) { - o.TargetSecurityGroup = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *UpdateLoadBalancerPayload) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *UpdateLoadBalancerPayload) SetVersion(v string) { - o.Version = &v -} - -func (o UpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DisableTargetSecurityGroupAssignment) { - toSerialize["disableTargetSecurityGroupAssignment"] = o.DisableTargetSecurityGroupAssignment - } - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors - } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners - } - if !IsNil(o.LoadBalancerSecurityGroup) { - toSerialize["loadBalancerSecurityGroup"] = o.LoadBalancerSecurityGroup - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId - } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools - } - if !IsNil(o.TargetSecurityGroup) { - toSerialize["targetSecurityGroup"] = o.TargetSecurityGroup - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateLoadBalancerPayload) UnmarshalJSON(data []byte) (err error) { - varUpdateLoadBalancerPayload := _UpdateLoadBalancerPayload{} - - err = json.Unmarshal(data, &varUpdateLoadBalancerPayload) - - if err != nil { - return err - } - - *o = UpdateLoadBalancerPayload(varUpdateLoadBalancerPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "disableTargetSecurityGroupAssignment") - delete(additionalProperties, "errors") - delete(additionalProperties, "externalAddress") - delete(additionalProperties, "labels") - delete(additionalProperties, "listeners") - delete(additionalProperties, "loadBalancerSecurityGroup") - delete(additionalProperties, "name") - delete(additionalProperties, "networks") - delete(additionalProperties, "options") - delete(additionalProperties, "planId") - delete(additionalProperties, "privateAddress") - delete(additionalProperties, "region") - delete(additionalProperties, "status") - delete(additionalProperties, "targetPools") - delete(additionalProperties, "targetSecurityGroup") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateLoadBalancerPayload struct { - value *UpdateLoadBalancerPayload - isSet bool -} - -func (v NullableUpdateLoadBalancerPayload) Get() *UpdateLoadBalancerPayload { - return v.value -} - -func (v *NullableUpdateLoadBalancerPayload) Set(val *UpdateLoadBalancerPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateLoadBalancerPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateLoadBalancerPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateLoadBalancerPayload(val *UpdateLoadBalancerPayload) *NullableUpdateLoadBalancerPayload { - return &NullableUpdateLoadBalancerPayload{value: val, isSet: true} -} - -func (v NullableUpdateLoadBalancerPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateLoadBalancerPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_update_load_balancer_payload_status.go b/services/alb/v2beta2api/model_update_load_balancer_payload_status.go deleted file mode 100644 index a2a64b43c..000000000 --- a/services/alb/v2beta2api/model_update_load_balancer_payload_status.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" - "fmt" -) - -// UpdateLoadBalancerPayloadStatus the model 'UpdateLoadBalancerPayloadStatus' -type UpdateLoadBalancerPayloadStatus string - -// List of UpdateLoadBalancerPayload_status -const ( - UPDATELOADBALANCERPAYLOADSTATUS_STATUS_UNSPECIFIED UpdateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED" - UPDATELOADBALANCERPAYLOADSTATUS_STATUS_PENDING UpdateLoadBalancerPayloadStatus = "STATUS_PENDING" - UPDATELOADBALANCERPAYLOADSTATUS_STATUS_READY UpdateLoadBalancerPayloadStatus = "STATUS_READY" - UPDATELOADBALANCERPAYLOADSTATUS_STATUS_ERROR UpdateLoadBalancerPayloadStatus = "STATUS_ERROR" - UPDATELOADBALANCERPAYLOADSTATUS_STATUS_TERMINATING UpdateLoadBalancerPayloadStatus = "STATUS_TERMINATING" - UPDATELOADBALANCERPAYLOADSTATUS_UNKNOWN_DEFAULT_OPEN_API UpdateLoadBalancerPayloadStatus = "unknown_default_open_api" -) - -// All allowed values of UpdateLoadBalancerPayloadStatus enum -var AllowedUpdateLoadBalancerPayloadStatusEnumValues = []UpdateLoadBalancerPayloadStatus{ - "STATUS_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_READY", - "STATUS_ERROR", - "STATUS_TERMINATING", - "unknown_default_open_api", -} - -func (v *UpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := UpdateLoadBalancerPayloadStatus(value) - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = UPDATELOADBALANCERPAYLOADSTATUS_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewUpdateLoadBalancerPayloadStatusFromValue returns a pointer to a valid UpdateLoadBalancerPayloadStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewUpdateLoadBalancerPayloadStatusFromValue(v string) (*UpdateLoadBalancerPayloadStatus, error) { - ev := UpdateLoadBalancerPayloadStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for UpdateLoadBalancerPayloadStatus: valid values are %v", v, AllowedUpdateLoadBalancerPayloadStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v UpdateLoadBalancerPayloadStatus) IsValid() bool { - for _, existing := range AllowedUpdateLoadBalancerPayloadStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to UpdateLoadBalancerPayload_status value -func (v UpdateLoadBalancerPayloadStatus) Ptr() *UpdateLoadBalancerPayloadStatus { - return &v -} - -type NullableUpdateLoadBalancerPayloadStatus struct { - value *UpdateLoadBalancerPayloadStatus - isSet bool -} - -func (v NullableUpdateLoadBalancerPayloadStatus) Get() *UpdateLoadBalancerPayloadStatus { - return v.value -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) Set(val *UpdateLoadBalancerPayloadStatus) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateLoadBalancerPayloadStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateLoadBalancerPayloadStatus(val *UpdateLoadBalancerPayloadStatus) *NullableUpdateLoadBalancerPayloadStatus { - return &NullableUpdateLoadBalancerPayloadStatus{value: val, isSet: true} -} - -func (v NullableUpdateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/model_update_target_pool_payload.go b/services/alb/v2beta2api/model_update_target_pool_payload.go deleted file mode 100644 index 7758763cc..000000000 --- a/services/alb/v2beta2api/model_update_target_pool_payload.go +++ /dev/null @@ -1,304 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "encoding/json" -) - -// checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateTargetPoolPayload{} - -// UpdateTargetPoolPayload struct for UpdateTargetPoolPayload -type UpdateTargetPoolPayload struct { - ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` - // Target pool name - Name *string `json:"name,omitempty" validate:"regexp=^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$"` - // The number identifying the port where each target listens for traffic. - TargetPort *int32 `json:"targetPort,omitempty"` - // List of all targets which will be used in the pool. Limited to 250. - Targets []Target `json:"targets,omitempty"` - TlsConfig *TargetPoolTlsConfig `json:"tlsConfig,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateTargetPoolPayload UpdateTargetPoolPayload - -// NewUpdateTargetPoolPayload instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayload() *UpdateTargetPoolPayload { - this := UpdateTargetPoolPayload{} - return &this -} - -// NewUpdateTargetPoolPayloadWithDefaults instantiates a new UpdateTargetPoolPayload 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 NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { - this := UpdateTargetPoolPayload{} - return &this -} - -// GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() ActiveHealthCheck { - if o == nil || IsNil(o.ActiveHealthCheck) { - var ret ActiveHealthCheck - return ret - } - return *o.ActiveHealthCheck -} - -// GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { - if o == nil || IsNil(o.ActiveHealthCheck) { - return nil, false - } - return o.ActiveHealthCheck, true -} - -// HasActiveHealthCheck returns a boolean if a field has been set. -func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { - if o != nil && !IsNil(o.ActiveHealthCheck) { - return true - } - - return false -} - -// SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v ActiveHealthCheck) { - o.ActiveHealthCheck = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateTargetPoolPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateTargetPoolPayload) SetName(v string) { - o.Name = &v -} - -// GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargetPort() int32 { - if o == nil || IsNil(o.TargetPort) { - var ret int32 - return ret - } - return *o.TargetPort -} - -// GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int32, bool) { - if o == nil || IsNil(o.TargetPort) { - return nil, false - } - return o.TargetPort, true -} - -// HasTargetPort returns a boolean if a field has been set. -func (o *UpdateTargetPoolPayload) HasTargetPort() bool { - if o != nil && !IsNil(o.TargetPort) { - return true - } - - return false -} - -// SetTargetPort gets a reference to the given int32 and assigns it to the TargetPort field. -func (o *UpdateTargetPoolPayload) SetTargetPort(v int32) { - o.TargetPort = &v -} - -// GetTargets returns the Targets field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargets() []Target { - if o == nil || IsNil(o.Targets) { - var ret []Target - return ret - } - return o.Targets -} - -// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetsOk() ([]Target, bool) { - if o == nil || IsNil(o.Targets) { - return nil, false - } - return o.Targets, true -} - -// HasTargets returns a boolean if a field has been set. -func (o *UpdateTargetPoolPayload) HasTargets() bool { - if o != nil && !IsNil(o.Targets) { - return true - } - - return false -} - -// SetTargets gets a reference to the given []Target and assigns it to the Targets field. -func (o *UpdateTargetPoolPayload) SetTargets(v []Target) { - o.Targets = v -} - -// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTlsConfig() TargetPoolTlsConfig { - if o == nil || IsNil(o.TlsConfig) { - var ret TargetPoolTlsConfig - return ret - } - return *o.TlsConfig -} - -// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTlsConfigOk() (*TargetPoolTlsConfig, bool) { - if o == nil || IsNil(o.TlsConfig) { - return nil, false - } - return o.TlsConfig, true -} - -// HasTlsConfig returns a boolean if a field has been set. -func (o *UpdateTargetPoolPayload) HasTlsConfig() bool { - if o != nil && !IsNil(o.TlsConfig) { - return true - } - - return false -} - -// SetTlsConfig gets a reference to the given TargetPoolTlsConfig and assigns it to the TlsConfig field. -func (o *UpdateTargetPoolPayload) SetTlsConfig(v TargetPoolTlsConfig) { - o.TlsConfig = &v -} - -func (o UpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ActiveHealthCheck) { - toSerialize["activeHealthCheck"] = o.ActiveHealthCheck - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.TargetPort) { - toSerialize["targetPort"] = o.TargetPort - } - if !IsNil(o.Targets) { - toSerialize["targets"] = o.Targets - } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *UpdateTargetPoolPayload) UnmarshalJSON(data []byte) (err error) { - varUpdateTargetPoolPayload := _UpdateTargetPoolPayload{} - - err = json.Unmarshal(data, &varUpdateTargetPoolPayload) - - if err != nil { - return err - } - - *o = UpdateTargetPoolPayload(varUpdateTargetPoolPayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "activeHealthCheck") - delete(additionalProperties, "name") - delete(additionalProperties, "targetPort") - delete(additionalProperties, "targets") - delete(additionalProperties, "tlsConfig") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateTargetPoolPayload struct { - value *UpdateTargetPoolPayload - isSet bool -} - -func (v NullableUpdateTargetPoolPayload) Get() *UpdateTargetPoolPayload { - return v.value -} - -func (v *NullableUpdateTargetPoolPayload) Set(val *UpdateTargetPoolPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateTargetPoolPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateTargetPoolPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateTargetPoolPayload(val *UpdateTargetPoolPayload) *NullableUpdateTargetPoolPayload { - return &NullableUpdateTargetPoolPayload{value: val, isSet: true} -} - -func (v NullableUpdateTargetPoolPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateTargetPoolPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/alb/v2beta2api/response.go b/services/alb/v2beta2api/response.go deleted file mode 100644 index 7fc7f2675..000000000 --- a/services/alb/v2beta2api/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/services/alb/v2beta2api/utils.go b/services/alb/v2beta2api/utils.go deleted file mode 100644 index ef60f1430..000000000 --- a/services/alb/v2beta2api/utils.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -STACKIT Application Load Balancer API - -### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee. - -API version: 2beta2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta2api - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -}