From 9679f31d51a76199311616e83fe377921b296f70 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 17 Jun 2025 13:40:33 +0000 Subject: [PATCH 1/2] Generate git --- services/git/api_default.go | 334 +++++++++++++--- services/git/api_default_test.go | 52 +++ services/git/client.go | 6 +- services/git/configuration.go | 4 +- services/git/model_create_instance_payload.go | 107 ++++- .../git/model_create_instance_payload_test.go | 4 +- services/git/model_flavor.go | 370 ++++++++++++++++++ services/git/model_flavor_test.go | 72 ++++ services/git/model_generic_error_response.go | 173 ++++++++ .../git/model_generic_error_response_test.go | 11 + services/git/model_instance.go | 213 +++++++++- services/git/model_instance_test.go | 4 +- .../model_internal_server_error_response.go | 4 +- ...del_internal_server_error_response_test.go | 4 +- services/git/model_list_flavors.go | 125 ++++++ services/git/model_list_flavors_test.go | 11 + services/git/model_list_instances.go | 8 +- services/git/model_list_instances_test.go | 4 +- services/git/model_unauthorized_response.go | 4 +- .../git/model_unauthorized_response_test.go | 4 +- services/git/utils.go | 4 +- 21 files changed, 1418 insertions(+), 100 deletions(-) create mode 100644 services/git/model_flavor.go create mode 100644 services/git/model_flavor_test.go create mode 100644 services/git/model_generic_error_response.go create mode 100644 services/git/model_generic_error_response_test.go create mode 100644 services/git/model_list_flavors.go create mode 100644 services/git/model_list_flavors_test.go diff --git a/services/git/api_default.go b/services/git/api_default.go index d0df023d4..e8a844ad5 100644 --- a/services/git/api_default.go +++ b/services/git/api_default.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -25,14 +25,12 @@ import ( type DefaultApi interface { /* - CreateInstance Creates a new STACKIT Git instance within the project. - Users with write-access to a project may create a new STACKIT Git instance by posting - the instance creation request to this endpoint, which will schedule the creation of a - new STACKIT Git instance within that project. + CreateInstance Create an Instance. + Creates a new STACKIT Git instance as a project resource. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @param projectId Project identifier. @return ApiCreateInstanceRequest */ CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest @@ -40,21 +38,19 @@ type DefaultApi interface { CreateInstanceExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @param projectId Project identifier. @return Instance */ CreateInstanceExecute(ctx context.Context, projectId string) (*Instance, error) /* - DeleteInstance Deletes the given STACKIT Git instance. - Allows a user with write-access to a project to schedule the deletion of a STACKIT Git - instance, which will soon eliminate all repositories & user metadata associated with - that instance. This is a destructive operation. + DeleteInstance Delete Instance. + Deletes a STACKIT Git instance and destroys all associated data. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. - @param instanceId The STACKIT Git instance UUID. + @param projectId Project identifier. + @param instanceId Instance identifier. @return ApiDeleteInstanceRequest */ DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest @@ -64,14 +60,12 @@ type DefaultApi interface { */ DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error /* - GetInstance Returns the details for the given STACKIT Git instance. - Provides detailed information about the state of an instance within the specified - project including information about how to access the instance for further use. - + GetInstance Get Instance information. + Retrieves information about a STACKIT Git instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. - @param instanceId The STACKIT Git instance UUID. + @param projectId Project identifier. + @param instanceId Instance identifier. @return ApiGetInstanceRequest */ GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest @@ -79,21 +73,38 @@ type DefaultApi interface { GetInstanceExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. - @param instanceId The STACKIT Git instance UUID. + @param projectId Project identifier. + @param instanceId Instance identifier. @return Instance */ GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*Instance, error) /* - ListInstances Returns a list of all STACKIT Git instances within the project. - STACKIT Git instances exist within a project, and a project may have zero or more instances. - This endpoint allows a user with read-access to a project to list all instances that exist - within the specified project. + ListFlavors Returns the details for the given STACKIT Git flavors. + Provides detailed information about possible Git Flavors. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @return ApiListFlavorsRequest + */ + ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest + /* + ListFlavorsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @return ListFlavors + + */ + ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavors, error) + /* + ListInstances List Instances. + Lists all STACKIT Git instances within a project. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Project identifier. @return ApiListInstancesRequest */ ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest @@ -101,7 +112,7 @@ type DefaultApi interface { ListInstancesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @param projectId Project identifier. @return ListInstances */ @@ -109,7 +120,7 @@ type DefaultApi interface { } type ApiCreateInstanceRequest interface { - // Provides the options to use when creating the instance. + // Instance configuration options. CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest Execute() (*Instance, error) } @@ -122,6 +133,10 @@ type ApiGetInstanceRequest interface { Execute() (*Instance, error) } +type ApiListFlavorsRequest interface { + Execute() (*ListFlavors, error) +} + type ApiListInstancesRequest interface { Execute() (*ListInstances, error) } @@ -136,7 +151,7 @@ type CreateInstanceRequest struct { createInstancePayload *CreateInstancePayload } -// Provides the options to use when creating the instance. +// Instance configuration options. func (r CreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { r.createInstancePayload = &createInstancePayload @@ -166,6 +181,9 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } if strlen(r.projectId) > 36 { return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") } @@ -224,6 +242,17 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 401 { var v UnauthorizedResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -235,8 +264,19 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 409 { + var v GenericErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse + var v GenericErrorResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -262,14 +302,12 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { } /* -CreateInstance: Creates a new STACKIT Git instance within the project. +CreateInstance: Create an Instance. -Users with write-access to a project may create a new STACKIT Git instance by posting -the instance creation request to this endpoint, which will schedule the creation of a -new STACKIT Git instance within that project. +Creates a new STACKIT Git instance as a project resource. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @param projectId Project identifier. @return ApiCreateInstanceRequest */ func (a *APIClient) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { @@ -319,9 +357,15 @@ func (r DeleteInstanceRequest) Execute() error { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return fmt.Errorf("projectId must have at least 36 elements") + } if strlen(r.projectId) > 36 { return fmt.Errorf("projectId must have less than 36 elements") } + if strlen(r.instanceId) < 36 { + return fmt.Errorf("instanceId must have at least 36 elements") + } if strlen(r.instanceId) > 36 { return fmt.Errorf("instanceId must have less than 36 elements") } @@ -375,6 +419,17 @@ func (r DeleteInstanceRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 401 { var v UnauthorizedResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -387,7 +442,7 @@ func (r DeleteInstanceRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse + var v GenericErrorResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -403,15 +458,13 @@ func (r DeleteInstanceRequest) Execute() error { } /* -DeleteInstance: Deletes the given STACKIT Git instance. +DeleteInstance: Delete Instance. -Allows a user with write-access to a project to schedule the deletion of a STACKIT Git -instance, which will soon eliminate all repositories & user metadata associated with -that instance. This is a destructive operation. +Deletes a STACKIT Git instance and destroys all associated data. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. - @param instanceId The STACKIT Git instance UUID. + @param projectId Project identifier. + @param instanceId Instance identifier. @return ApiDeleteInstanceRequest */ func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { @@ -464,9 +517,15 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } if strlen(r.projectId) > 36 { return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") } + if strlen(r.instanceId) < 36 { + return localVarReturnValue, fmt.Errorf("instanceId must have at least 36 elements") + } if strlen(r.instanceId) > 36 { return localVarReturnValue, fmt.Errorf("instanceId must have less than 36 elements") } @@ -520,6 +579,17 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 401 { var v UnauthorizedResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -532,7 +602,7 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse + var v GenericErrorResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -558,14 +628,13 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { } /* -GetInstance: Returns the details for the given STACKIT Git instance. +GetInstance: Get Instance information. -Provides detailed information about the state of an instance within the specified -project including information about how to access the instance for further use. +Retrieves information about a STACKIT Git instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. - @param instanceId The STACKIT Git instance UUID. + @param projectId Project identifier. + @param instanceId Instance identifier. @return ApiGetInstanceRequest */ func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { @@ -587,6 +656,151 @@ func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, in return r.Execute() } +type ListFlavorsRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string +} + +func (r ListFlavorsRequest) Execute() (*ListFlavors, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListFlavors + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlavors") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/flavors" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.projectId) > 36 { + return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") + } + + // 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 := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v InternalServerErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +ListFlavors: Returns the details for the given STACKIT Git flavors. + +Provides detailed information about possible Git Flavors. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @return ApiListFlavorsRequest +*/ +func (a *APIClient) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { + return ListFlavorsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + } +} + +func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavors, error) { + r := ListFlavorsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + } + return r.Execute() +} + type ListInstancesRequest struct { ctx context.Context apiService *DefaultApiService @@ -616,6 +830,9 @@ func (r ListInstancesRequest) Execute() (*ListInstances, error) { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } if strlen(r.projectId) > 36 { return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") } @@ -669,6 +886,17 @@ func (r ListInstancesRequest) Execute() (*ListInstances, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericErrorResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 401 { var v UnauthorizedResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -681,7 +909,7 @@ func (r ListInstancesRequest) Execute() (*ListInstances, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InternalServerErrorResponse + var v GenericErrorResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -707,14 +935,12 @@ func (r ListInstancesRequest) Execute() (*ListInstances, error) { } /* -ListInstances: Returns a list of all STACKIT Git instances within the project. +ListInstances: List Instances. -STACKIT Git instances exist within a project, and a project may have zero or more instances. -This endpoint allows a user with read-access to a project to list all instances that exist -within the specified project. +Lists all STACKIT Git instances within a project. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The STACKIT portal project UUID the STACKIT Git instance is part of. + @param projectId Project identifier. @return ApiListInstancesRequest */ func (a *APIClient) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { diff --git a/services/git/api_default_test.go b/services/git/api_default_test.go index 9aeaf8854..879d2386d 100644 --- a/services/git/api_default_test.go +++ b/services/git/api_default_test.go @@ -180,6 +180,58 @@ func Test_git_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService ListFlavors", func(t *testing.T) { + _apiUrlPath := "/v1beta/projects/{projectId}/flavors" + projectIdValue := randString(36) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListFlavors{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for git_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := projectIdValue + + resp, reqErr := apiClient.ListFlavors(context.Background(), projectId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService ListInstances", func(t *testing.T) { _apiUrlPath := "/v1beta/projects/{projectId}/instances" projectIdValue := randString(36) diff --git a/services/git/client.go b/services/git/client.go index 86e668096..0f0b765b2 100644 --- a/services/git/client.go +++ b/services/git/client.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the STACKIT Git API API v1beta.0.3 +// APIClient manages communication with the STACKIT Git API API v1beta.0.4 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/git/configuration.go b/services/git/configuration.go index 062ec3402..e8ffc3ea7 100644 --- a/services/git/configuration.go +++ b/services/git/configuration.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_create_instance_payload.go b/services/git/model_create_instance_payload.go index 238a21b1c..a65a9fa8d 100644 --- a/services/git/model_create_instance_payload.go +++ b/services/git/model_create_instance_payload.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,6 +17,47 @@ import ( // checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstancePayload{} +/* + types and functions for acl +*/ + +// isArray +type CreateInstancePayloadGetAclAttributeType = *[]string +type CreateInstancePayloadGetAclArgType = []string +type CreateInstancePayloadGetAclRetType = []string + +func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetAclAttributeType) (ret CreateInstancePayloadGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetAclAttributeType(arg *CreateInstancePayloadGetAclAttributeType, val CreateInstancePayloadGetAclRetType) { + *arg = &val +} + +/* + types and functions for flavor +*/ + +// isNotNullableString +type CreateInstancePayloadGetFlavorAttributeType = *string + +func getCreateInstancePayloadGetFlavorAttributeTypeOk(arg CreateInstancePayloadGetFlavorAttributeType) (ret CreateInstancePayloadGetFlavorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetFlavorAttributeType(arg *CreateInstancePayloadGetFlavorAttributeType, val CreateInstancePayloadGetFlavorRetType) { + *arg = &val +} + +type CreateInstancePayloadGetFlavorArgType = string +type CreateInstancePayloadGetFlavorRetType = string + /* types and functions for name */ @@ -38,11 +79,15 @@ func setCreateInstancePayloadGetNameAttributeType(arg *CreateInstancePayloadGetN type CreateInstancePayloadGetNameArgType = string type CreateInstancePayloadGetNameRetType = string -// CreateInstancePayload Request a STACKIT Git instance to be created with these properties. +// CreateInstancePayload Instance creation configuration options. type CreateInstancePayload struct { + // Restricted ACL for instance access. + Acl CreateInstancePayloadGetAclAttributeType `json:"acl,omitempty"` + // Instance flavor. Defaults to git-100 if not specified. + Flavor CreateInstancePayloadGetFlavorAttributeType `json:"flavor,omitempty"` // A user chosen name to distinguish multiple STACKIT Git instances. // REQUIRED - Name CreateInstancePayloadGetNameAttributeType `json:"name"` + Name CreateInstancePayloadGetNameAttributeType `json:"name" required:"true"` } type _CreateInstancePayload CreateInstancePayload @@ -62,9 +107,57 @@ func NewCreateInstancePayload(name CreateInstancePayloadGetNameArgType) *CreateI // but it doesn't guarantee that properties required by API are set func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} + var flavor string = "git-100" + this.Flavor = &flavor return &this } +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetAcl() (res CreateInstancePayloadGetAclRetType) { + res, _ = o.GetAclOk() + return +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetAclOk() (ret CreateInstancePayloadGetAclRetType, ok bool) { + return getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl) +} + +// HasAcl returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasAcl() bool { + _, ok := o.GetAclOk() + return ok +} + +// SetAcl gets a reference to the given []string and assigns it to the Acl field. +func (o *CreateInstancePayload) SetAcl(v CreateInstancePayloadGetAclRetType) { + setCreateInstancePayloadGetAclAttributeType(&o.Acl, v) +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetFlavor() (res CreateInstancePayloadGetFlavorRetType) { + res, _ = o.GetFlavorOk() + return +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorOk() (ret CreateInstancePayloadGetFlavorRetType, ok bool) { + return getCreateInstancePayloadGetFlavorAttributeTypeOk(o.Flavor) +} + +// HasFlavor returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasFlavor() bool { + _, ok := o.GetFlavorOk() + return ok +} + +// SetFlavor gets a reference to the given string and assigns it to the Flavor field. +func (o *CreateInstancePayload) SetFlavor(v CreateInstancePayloadGetFlavorRetType) { + setCreateInstancePayloadGetFlavorAttributeType(&o.Flavor, v) +} + // GetName returns the Name field value func (o *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetType) { ret, _ = o.GetNameOk() @@ -84,6 +177,12 @@ func (o *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getCreateInstancePayloadGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } if val, ok := getCreateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } diff --git a/services/git/model_create_instance_payload_test.go b/services/git/model_create_instance_payload_test.go index 2e78c0102..e39c866ed 100644 --- a/services/git/model_create_instance_payload_test.go +++ b/services/git/model_create_instance_payload_test.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_flavor.go b/services/git/model_flavor.go new file mode 100644 index 000000000..99e0298e9 --- /dev/null +++ b/services/git/model_flavor.go @@ -0,0 +1,370 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git + +import ( + "encoding/json" + "fmt" +) + +// checks if the Flavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flavor{} + +/* + types and functions for availability +*/ + +// isEnum + +// FlavorAvailability Defines the flavor availability. +// value type for enums +type FlavorAvailability string + +// List of Availability +const ( + FLAVORAVAILABILITY_AVAILABLE FlavorAvailability = "available" + FLAVORAVAILABILITY_UNAVAILABLE FlavorAvailability = "unavailable" + FLAVORAVAILABILITY_INTERNAL FlavorAvailability = "internal" + FLAVORAVAILABILITY_DEPRECATED FlavorAvailability = "deprecated" +) + +// All allowed values of Flavor enum +var AllowedFlavorAvailabilityEnumValues = []FlavorAvailability{ + "available", + "unavailable", + "internal", + "deprecated", +} + +func (v *FlavorAvailability) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson FlavorAvailability + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := FlavorAvailability(value) + for _, existing := range AllowedFlavorAvailabilityEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Flavor", value) +} + +// NewFlavorAvailabilityFromValue returns a pointer to a valid FlavorAvailability +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewFlavorAvailabilityFromValue(v FlavorAvailability) (*FlavorAvailability, error) { + ev := FlavorAvailability(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for FlavorAvailability: valid values are %v", v, AllowedFlavorAvailabilityEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v FlavorAvailability) IsValid() bool { + for _, existing := range AllowedFlavorAvailabilityEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to AvailabilityAvailability value +func (v FlavorAvailability) Ptr() *FlavorAvailability { + return &v +} + +type NullableFlavorAvailability struct { + value *FlavorAvailability + isSet bool +} + +func (v NullableFlavorAvailability) Get() *FlavorAvailability { + return v.value +} + +func (v *NullableFlavorAvailability) Set(val *FlavorAvailability) { + v.value = val + v.isSet = true +} + +func (v NullableFlavorAvailability) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavorAvailability) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavorAvailability(val *FlavorAvailability) *NullableFlavorAvailability { + return &NullableFlavorAvailability{value: val, isSet: true} +} + +func (v NullableFlavorAvailability) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavorAvailability) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type FlavorGetAvailabilityAttributeType = *FlavorAvailability +type FlavorGetAvailabilityArgType = FlavorAvailability +type FlavorGetAvailabilityRetType = FlavorAvailability + +func getFlavorGetAvailabilityAttributeTypeOk(arg FlavorGetAvailabilityAttributeType) (ret FlavorGetAvailabilityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFlavorGetAvailabilityAttributeType(arg *FlavorGetAvailabilityAttributeType, val FlavorGetAvailabilityRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type FlavorGetDescriptionAttributeType = *string + +func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeType) (ret FlavorGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFlavorGetDescriptionAttributeType(arg *FlavorGetDescriptionAttributeType, val FlavorGetDescriptionRetType) { + *arg = &val +} + +type FlavorGetDescriptionArgType = string +type FlavorGetDescriptionRetType = string + +/* + types and functions for display_name +*/ + +// isNotNullableString +type FlavorGetDisplayNameAttributeType = *string + +func getFlavorGetDisplayNameAttributeTypeOk(arg FlavorGetDisplayNameAttributeType) (ret FlavorGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFlavorGetDisplayNameAttributeType(arg *FlavorGetDisplayNameAttributeType, val FlavorGetDisplayNameRetType) { + *arg = &val +} + +type FlavorGetDisplayNameArgType = string +type FlavorGetDisplayNameRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +type FlavorGetIdAttributeType = *string + +func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFlavorGetIdAttributeType(arg *FlavorGetIdAttributeType, val FlavorGetIdRetType) { + *arg = &val +} + +type FlavorGetIdArgType = string +type FlavorGetIdRetType = string + +// Flavor Describes a STACKIT Git Flavor. +type Flavor struct { + // Defines the flavor availability. + // REQUIRED + Availability FlavorGetAvailabilityAttributeType `json:"availability" required:"true"` + // Flavor description. + // REQUIRED + Description FlavorGetDescriptionAttributeType `json:"description" required:"true"` + // The display name that will be shown in the Portal. + // REQUIRED + DisplayName FlavorGetDisplayNameAttributeType `json:"display_name" required:"true"` + // Flavor id. + // REQUIRED + Id FlavorGetIdAttributeType `json:"id" required:"true"` +} + +type _Flavor Flavor + +// NewFlavor instantiates a new Flavor 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 NewFlavor(availability FlavorGetAvailabilityArgType, description FlavorGetDescriptionArgType, displayName FlavorGetDisplayNameArgType, id FlavorGetIdArgType) *Flavor { + this := Flavor{} + setFlavorGetAvailabilityAttributeType(&this.Availability, availability) + setFlavorGetDescriptionAttributeType(&this.Description, description) + setFlavorGetDisplayNameAttributeType(&this.DisplayName, displayName) + setFlavorGetIdAttributeType(&this.Id, id) + return &this +} + +// NewFlavorWithDefaults instantiates a new Flavor 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 NewFlavorWithDefaults() *Flavor { + this := Flavor{} + return &this +} + +// GetAvailability returns the Availability field value +func (o *Flavor) GetAvailability() (ret FlavorGetAvailabilityRetType) { + ret, _ = o.GetAvailabilityOk() + return ret +} + +// GetAvailabilityOk returns a tuple with the Availability field value +// and a boolean to check if the value has been set. +func (o *Flavor) GetAvailabilityOk() (ret FlavorGetAvailabilityRetType, ok bool) { + return getFlavorGetAvailabilityAttributeTypeOk(o.Availability) +} + +// SetAvailability sets field value +func (o *Flavor) SetAvailability(v FlavorGetAvailabilityRetType) { + setFlavorGetAvailabilityAttributeType(&o.Availability, v) +} + +// GetDescription returns the Description field value +func (o *Flavor) GetDescription() (ret FlavorGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Flavor) GetDescriptionOk() (ret FlavorGetDescriptionRetType, ok bool) { + return getFlavorGetDescriptionAttributeTypeOk(o.Description) +} + +// SetDescription sets field value +func (o *Flavor) SetDescription(v FlavorGetDescriptionRetType) { + setFlavorGetDescriptionAttributeType(&o.Description, v) +} + +// GetDisplayName returns the DisplayName field value +func (o *Flavor) GetDisplayName() (ret FlavorGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *Flavor) GetDisplayNameOk() (ret FlavorGetDisplayNameRetType, ok bool) { + return getFlavorGetDisplayNameAttributeTypeOk(o.DisplayName) +} + +// SetDisplayName sets field value +func (o *Flavor) SetDisplayName(v FlavorGetDisplayNameRetType) { + setFlavorGetDisplayNameAttributeType(&o.DisplayName, v) +} + +// GetId returns the Id field value +func (o *Flavor) GetId() (ret FlavorGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Flavor) GetIdOk() (ret FlavorGetIdRetType, ok bool) { + return getFlavorGetIdAttributeTypeOk(o.Id) +} + +// SetId sets field value +func (o *Flavor) SetId(v FlavorGetIdRetType) { + setFlavorGetIdAttributeType(&o.Id, v) +} + +func (o Flavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getFlavorGetAvailabilityAttributeTypeOk(o.Availability); ok { + toSerialize["Availability"] = val + } + if val, ok := getFlavorGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getFlavorGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getFlavorGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + return toSerialize, nil +} + +type NullableFlavor struct { + value *Flavor + isSet bool +} + +func (v NullableFlavor) Get() *Flavor { + return v.value +} + +func (v *NullableFlavor) Set(val *Flavor) { + v.value = val + v.isSet = true +} + +func (v NullableFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavor(val *Flavor) *NullableFlavor { + return &NullableFlavor{value: val, isSet: true} +} + +func (v NullableFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/model_flavor_test.go b/services/git/model_flavor_test.go new file mode 100644 index 000000000..34b708ac2 --- /dev/null +++ b/services/git/model_flavor_test.go @@ -0,0 +1,72 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git + +import ( + "testing" +) + +// isEnum + +func TestFlavorAvailability_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"available"`), + }, + wantErr: false, + }, + { + name: `success - possible enum value no. 2`, + args: args{ + src: []byte(`"unavailable"`), + }, + wantErr: false, + }, + { + name: `success - possible enum value no. 3`, + args: args{ + src: []byte(`"internal"`), + }, + wantErr: false, + }, + { + name: `success - possible enum value no. 4`, + args: args{ + src: []byte(`"deprecated"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := FlavorAvailability("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/git/model_generic_error_response.go b/services/git/model_generic_error_response.go new file mode 100644 index 000000000..49166a93a --- /dev/null +++ b/services/git/model_generic_error_response.go @@ -0,0 +1,173 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git + +import ( + "encoding/json" +) + +// checks if the GenericErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericErrorResponse{} + +/* + types and functions for details +*/ + +// isArray +type GenericErrorResponseGetDetailsAttributeType = *[]string +type GenericErrorResponseGetDetailsArgType = []string +type GenericErrorResponseGetDetailsRetType = []string + +func getGenericErrorResponseGetDetailsAttributeTypeOk(arg GenericErrorResponseGetDetailsAttributeType) (ret GenericErrorResponseGetDetailsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGenericErrorResponseGetDetailsAttributeType(arg *GenericErrorResponseGetDetailsAttributeType, val GenericErrorResponseGetDetailsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type GenericErrorResponseGetMessageAttributeType = *string + +func getGenericErrorResponseGetMessageAttributeTypeOk(arg GenericErrorResponseGetMessageAttributeType) (ret GenericErrorResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGenericErrorResponseGetMessageAttributeType(arg *GenericErrorResponseGetMessageAttributeType, val GenericErrorResponseGetMessageRetType) { + *arg = &val +} + +type GenericErrorResponseGetMessageArgType = string +type GenericErrorResponseGetMessageRetType = string + +// GenericErrorResponse Generic Error Response. +type GenericErrorResponse struct { + Details GenericErrorResponseGetDetailsAttributeType `json:"details,omitempty"` + // REQUIRED + Message GenericErrorResponseGetMessageAttributeType `json:"message" required:"true"` +} + +type _GenericErrorResponse GenericErrorResponse + +// NewGenericErrorResponse instantiates a new GenericErrorResponse 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 NewGenericErrorResponse(message GenericErrorResponseGetMessageArgType) *GenericErrorResponse { + this := GenericErrorResponse{} + setGenericErrorResponseGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewGenericErrorResponseWithDefaults instantiates a new GenericErrorResponse 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 NewGenericErrorResponseWithDefaults() *GenericErrorResponse { + this := GenericErrorResponse{} + return &this +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *GenericErrorResponse) GetDetails() (res GenericErrorResponseGetDetailsRetType) { + res, _ = o.GetDetailsOk() + return +} + +// 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 *GenericErrorResponse) GetDetailsOk() (ret GenericErrorResponseGetDetailsRetType, ok bool) { + return getGenericErrorResponseGetDetailsAttributeTypeOk(o.Details) +} + +// HasDetails returns a boolean if a field has been set. +func (o *GenericErrorResponse) HasDetails() bool { + _, ok := o.GetDetailsOk() + return ok +} + +// SetDetails gets a reference to the given []string and assigns it to the Details field. +func (o *GenericErrorResponse) SetDetails(v GenericErrorResponseGetDetailsRetType) { + setGenericErrorResponseGetDetailsAttributeType(&o.Details, v) +} + +// GetMessage returns the Message field value +func (o *GenericErrorResponse) GetMessage() (ret GenericErrorResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GenericErrorResponse) GetMessageOk() (ret GenericErrorResponseGetMessageRetType, ok bool) { + return getGenericErrorResponseGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *GenericErrorResponse) SetMessage(v GenericErrorResponseGetMessageRetType) { + setGenericErrorResponseGetMessageAttributeType(&o.Message, v) +} + +func (o GenericErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGenericErrorResponseGetDetailsAttributeTypeOk(o.Details); ok { + toSerialize["Details"] = val + } + if val, ok := getGenericErrorResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableGenericErrorResponse struct { + value *GenericErrorResponse + isSet bool +} + +func (v NullableGenericErrorResponse) Get() *GenericErrorResponse { + return v.value +} + +func (v *NullableGenericErrorResponse) Set(val *GenericErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGenericErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGenericErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenericErrorResponse(val *GenericErrorResponse) *NullableGenericErrorResponse { + return &NullableGenericErrorResponse{value: val, isSet: true} +} + +func (v NullableGenericErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenericErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/model_generic_error_response_test.go b/services/git/model_generic_error_response_test.go new file mode 100644 index 000000000..e39c866ed --- /dev/null +++ b/services/git/model_generic_error_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git diff --git a/services/git/model_instance.go b/services/git/model_instance.go index 7fe9a930f..77387b97e 100644 --- a/services/git/model_instance.go +++ b/services/git/model_instance.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,6 +19,68 @@ import ( // checks if the Instance type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Instance{} +/* + types and functions for acl +*/ + +// isArray +type InstanceGetAclAttributeType = *[]string +type InstanceGetAclArgType = []string +type InstanceGetAclRetType = []string + +func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret InstanceGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val InstanceGetAclRetType) { + *arg = &val +} + +/* + types and functions for consumed_disk +*/ + +// isNotNullableString +type InstanceGetConsumedDiskAttributeType = *string + +func getInstanceGetConsumedDiskAttributeTypeOk(arg InstanceGetConsumedDiskAttributeType) (ret InstanceGetConsumedDiskRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetConsumedDiskAttributeType(arg *InstanceGetConsumedDiskAttributeType, val InstanceGetConsumedDiskRetType) { + *arg = &val +} + +type InstanceGetConsumedDiskArgType = string +type InstanceGetConsumedDiskRetType = string + +/* + types and functions for consumed_object_storage +*/ + +// isNotNullableString +type InstanceGetConsumedObjectStorageAttributeType = *string + +func getInstanceGetConsumedObjectStorageAttributeTypeOk(arg InstanceGetConsumedObjectStorageAttributeType) (ret InstanceGetConsumedObjectStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetConsumedObjectStorageAttributeType(arg *InstanceGetConsumedObjectStorageAttributeType, val InstanceGetConsumedObjectStorageRetType) { + *arg = &val +} + +type InstanceGetConsumedObjectStorageArgType = string +type InstanceGetConsumedObjectStorageRetType = string + /* types and functions for created */ @@ -39,6 +101,27 @@ func setInstanceGetCreatedAttributeType(arg *InstanceGetCreatedAttributeType, va *arg = &val } +/* + types and functions for flavor +*/ + +// isNotNullableString +type InstanceGetFlavorAttributeType = *string + +func getInstanceGetFlavorAttributeTypeOk(arg InstanceGetFlavorAttributeType) (ret InstanceGetFlavorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetFlavorAttributeType(arg *InstanceGetFlavorAttributeType, val InstanceGetFlavorRetType) { + *arg = &val +} + +type InstanceGetFlavorArgType = string +type InstanceGetFlavorRetType = string + /* types and functions for id */ @@ -87,7 +170,7 @@ type InstanceGetNameRetType = string // isEnum -// InstanceState The current state of the STACKIT Git instance. +// InstanceState Indicate the readiness state of the instance. // value type for enums type InstanceState string @@ -255,26 +338,38 @@ func setInstanceGetVersionAttributeType(arg *InstanceGetVersionAttributeType, va type InstanceGetVersionArgType = string type InstanceGetVersionRetType = string -// Instance Describes a STACKIT Git instance. +// Instance Information about an Instance. type Instance struct { - // The date and time the creation of the STACKIT Git instance was triggered. + // Restricted ACL for instance access. + // REQUIRED + Acl InstanceGetAclAttributeType `json:"acl" required:"true"` + // How many bytes of disk space is consumed. Read Only. + // REQUIRED + ConsumedDisk InstanceGetConsumedDiskAttributeType `json:"consumed_disk" required:"true"` + // How many bytes of Object Storage is consumed. Read Only. + // REQUIRED + ConsumedObjectStorage InstanceGetConsumedObjectStorageAttributeType `json:"consumed_object_storage" required:"true"` + // Instance creation timestamp in RFC3339 format. + // REQUIRED + Created InstanceGetCreatedAttributeType `json:"created" required:"true"` + // Instance flavor. // REQUIRED - Created InstanceGetCreatedAttributeType `json:"created"` - // A auto generated unique id which identifies the STACKIT Git instances. + Flavor InstanceGetFlavorAttributeType `json:"flavor" required:"true"` + // Instance identifier. // REQUIRED - Id InstanceGetIdAttributeType `json:"id"` - // A user chosen name to distinguish multiple STACKIT Git instances. + Id InstanceGetIdAttributeType `json:"id" required:"true"` + // Instance name. // REQUIRED - Name InstanceGetNameAttributeType `json:"name"` - // The current state of the STACKIT Git instance. + Name InstanceGetNameAttributeType `json:"name" required:"true"` + // Indicate the readiness state of the instance. // REQUIRED - State InstanceGetStateAttributeType `json:"state"` - // The URL for reaching the STACKIT Git instance. + State InstanceGetStateAttributeType `json:"state" required:"true"` + // Instance url. // REQUIRED - Url InstanceGetUrlAttributeType `json:"url"` - // The current version of STACKIT Git deployed to the instance. + Url InstanceGetUrlAttributeType `json:"url" required:"true"` + // STACKIT Git version indicator. // REQUIRED - Version InstanceGetVersionAttributeType `json:"version"` + Version InstanceGetVersionAttributeType `json:"version" required:"true"` } type _Instance Instance @@ -283,9 +378,13 @@ type _Instance Instance // 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 NewInstance(created InstanceGetCreatedArgType, id InstanceGetIdArgType, name InstanceGetNameArgType, state InstanceGetStateArgType, url InstanceGetUrlArgType, version InstanceGetVersionArgType) *Instance { +func NewInstance(acl InstanceGetAclArgType, consumedDisk InstanceGetConsumedDiskArgType, consumedObjectStorage InstanceGetConsumedObjectStorageArgType, created InstanceGetCreatedArgType, flavor InstanceGetFlavorArgType, id InstanceGetIdArgType, name InstanceGetNameArgType, state InstanceGetStateArgType, url InstanceGetUrlArgType, version InstanceGetVersionArgType) *Instance { this := Instance{} + setInstanceGetAclAttributeType(&this.Acl, acl) + setInstanceGetConsumedDiskAttributeType(&this.ConsumedDisk, consumedDisk) + setInstanceGetConsumedObjectStorageAttributeType(&this.ConsumedObjectStorage, consumedObjectStorage) setInstanceGetCreatedAttributeType(&this.Created, created) + setInstanceGetFlavorAttributeType(&this.Flavor, flavor) setInstanceGetIdAttributeType(&this.Id, id) setInstanceGetNameAttributeType(&this.Name, name) setInstanceGetStateAttributeType(&this.State, state) @@ -302,6 +401,57 @@ func NewInstanceWithDefaults() *Instance { return &this } +// GetAcl returns the Acl field value +func (o *Instance) GetAcl() (ret InstanceGetAclRetType) { + ret, _ = o.GetAclOk() + return ret +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (ret InstanceGetAclRetType, ok bool) { + return getInstanceGetAclAttributeTypeOk(o.Acl) +} + +// SetAcl sets field value +func (o *Instance) SetAcl(v InstanceGetAclRetType) { + setInstanceGetAclAttributeType(&o.Acl, v) +} + +// GetConsumedDisk returns the ConsumedDisk field value +func (o *Instance) GetConsumedDisk() (ret InstanceGetConsumedDiskRetType) { + ret, _ = o.GetConsumedDiskOk() + return ret +} + +// GetConsumedDiskOk returns a tuple with the ConsumedDisk field value +// and a boolean to check if the value has been set. +func (o *Instance) GetConsumedDiskOk() (ret InstanceGetConsumedDiskRetType, ok bool) { + return getInstanceGetConsumedDiskAttributeTypeOk(o.ConsumedDisk) +} + +// SetConsumedDisk sets field value +func (o *Instance) SetConsumedDisk(v InstanceGetConsumedDiskRetType) { + setInstanceGetConsumedDiskAttributeType(&o.ConsumedDisk, v) +} + +// GetConsumedObjectStorage returns the ConsumedObjectStorage field value +func (o *Instance) GetConsumedObjectStorage() (ret InstanceGetConsumedObjectStorageRetType) { + ret, _ = o.GetConsumedObjectStorageOk() + return ret +} + +// GetConsumedObjectStorageOk returns a tuple with the ConsumedObjectStorage field value +// and a boolean to check if the value has been set. +func (o *Instance) GetConsumedObjectStorageOk() (ret InstanceGetConsumedObjectStorageRetType, ok bool) { + return getInstanceGetConsumedObjectStorageAttributeTypeOk(o.ConsumedObjectStorage) +} + +// SetConsumedObjectStorage sets field value +func (o *Instance) SetConsumedObjectStorage(v InstanceGetConsumedObjectStorageRetType) { + setInstanceGetConsumedObjectStorageAttributeType(&o.ConsumedObjectStorage, v) +} + // GetCreated returns the Created field value func (o *Instance) GetCreated() (ret InstanceGetCreatedRetType) { ret, _ = o.GetCreatedOk() @@ -319,6 +469,23 @@ func (o *Instance) SetCreated(v InstanceGetCreatedRetType) { setInstanceGetCreatedAttributeType(&o.Created, v) } +// GetFlavor returns the Flavor field value +func (o *Instance) GetFlavor() (ret InstanceGetFlavorRetType) { + ret, _ = o.GetFlavorOk() + return ret +} + +// GetFlavorOk returns a tuple with the Flavor field value +// and a boolean to check if the value has been set. +func (o *Instance) GetFlavorOk() (ret InstanceGetFlavorRetType, ok bool) { + return getInstanceGetFlavorAttributeTypeOk(o.Flavor) +} + +// SetFlavor sets field value +func (o *Instance) SetFlavor(v InstanceGetFlavorRetType) { + setInstanceGetFlavorAttributeType(&o.Flavor, v) +} + // GetId returns the Id field value func (o *Instance) GetId() (ret InstanceGetIdRetType) { ret, _ = o.GetIdOk() @@ -406,9 +573,21 @@ func (o *Instance) SetVersion(v InstanceGetVersionRetType) { func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getInstanceGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getInstanceGetConsumedDiskAttributeTypeOk(o.ConsumedDisk); ok { + toSerialize["ConsumedDisk"] = val + } + if val, ok := getInstanceGetConsumedObjectStorageAttributeTypeOk(o.ConsumedObjectStorage); ok { + toSerialize["ConsumedObjectStorage"] = val + } if val, ok := getInstanceGetCreatedAttributeTypeOk(o.Created); ok { toSerialize["Created"] = val } + if val, ok := getInstanceGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } if val, ok := getInstanceGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } diff --git a/services/git/model_instance_test.go b/services/git/model_instance_test.go index 97428d02e..1dfc7e2c6 100644 --- a/services/git/model_instance_test.go +++ b/services/git/model_instance_test.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_internal_server_error_response.go b/services/git/model_internal_server_error_response.go index c2424ab1a..cbccba460 100644 --- a/services/git/model_internal_server_error_response.go +++ b/services/git/model_internal_server_error_response.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_internal_server_error_response_test.go b/services/git/model_internal_server_error_response_test.go index 2e78c0102..e39c866ed 100644 --- a/services/git/model_internal_server_error_response_test.go +++ b/services/git/model_internal_server_error_response_test.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_list_flavors.go b/services/git/model_list_flavors.go new file mode 100644 index 000000000..6c3e5a276 --- /dev/null +++ b/services/git/model_list_flavors.go @@ -0,0 +1,125 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git + +import ( + "encoding/json" +) + +// checks if the ListFlavors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavors{} + +/* + types and functions for flavors +*/ + +// isArray +type ListFlavorsGetFlavorsAttributeType = *[]Flavor +type ListFlavorsGetFlavorsArgType = []Flavor +type ListFlavorsGetFlavorsRetType = []Flavor + +func getListFlavorsGetFlavorsAttributeTypeOk(arg ListFlavorsGetFlavorsAttributeType) (ret ListFlavorsGetFlavorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListFlavorsGetFlavorsAttributeType(arg *ListFlavorsGetFlavorsAttributeType, val ListFlavorsGetFlavorsRetType) { + *arg = &val +} + +// ListFlavors A list of STACKIT Git flavors. +type ListFlavors struct { + // REQUIRED + Flavors ListFlavorsGetFlavorsAttributeType `json:"flavors" required:"true"` +} + +type _ListFlavors ListFlavors + +// NewListFlavors instantiates a new ListFlavors 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 NewListFlavors(flavors ListFlavorsGetFlavorsArgType) *ListFlavors { + this := ListFlavors{} + setListFlavorsGetFlavorsAttributeType(&this.Flavors, flavors) + return &this +} + +// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewListFlavorsWithDefaults() *ListFlavors { + this := ListFlavors{} + return &this +} + +// GetFlavors returns the Flavors field value +func (o *ListFlavors) GetFlavors() (ret ListFlavorsGetFlavorsRetType) { + ret, _ = o.GetFlavorsOk() + return ret +} + +// GetFlavorsOk returns a tuple with the Flavors field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetFlavorsOk() (ret ListFlavorsGetFlavorsRetType, ok bool) { + return getListFlavorsGetFlavorsAttributeTypeOk(o.Flavors) +} + +// SetFlavors sets field value +func (o *ListFlavors) SetFlavors(v ListFlavorsGetFlavorsRetType) { + setListFlavorsGetFlavorsAttributeType(&o.Flavors, v) +} + +func (o ListFlavors) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListFlavorsGetFlavorsAttributeTypeOk(o.Flavors); ok { + toSerialize["Flavors"] = val + } + return toSerialize, nil +} + +type NullableListFlavors struct { + value *ListFlavors + isSet bool +} + +func (v NullableListFlavors) Get() *ListFlavors { + return v.value +} + +func (v *NullableListFlavors) Set(val *ListFlavors) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavors) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavors(val *ListFlavors) *NullableListFlavors { + return &NullableListFlavors{value: val, isSet: true} +} + +func (v NullableListFlavors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/git/model_list_flavors_test.go b/services/git/model_list_flavors_test.go new file mode 100644 index 000000000..e39c866ed --- /dev/null +++ b/services/git/model_list_flavors_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Git API + +STACKIT Git management API. + +API version: 1beta.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package git diff --git a/services/git/model_list_instances.go b/services/git/model_list_instances.go index 3bd03e062..031b90bb8 100644 --- a/services/git/model_list_instances.go +++ b/services/git/model_list_instances.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -37,10 +37,10 @@ func setListInstancesGetInstancesAttributeType(arg *ListInstancesGetInstancesAtt *arg = &val } -// ListInstances A list of STACKIT Git instances. +// ListInstances List of Instances. type ListInstances struct { // REQUIRED - Instances ListInstancesGetInstancesAttributeType `json:"instances"` + Instances ListInstancesGetInstancesAttributeType `json:"instances" required:"true"` } type _ListInstances ListInstances diff --git a/services/git/model_list_instances_test.go b/services/git/model_list_instances_test.go index 2e78c0102..e39c866ed 100644 --- a/services/git/model_list_instances_test.go +++ b/services/git/model_list_instances_test.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_unauthorized_response.go b/services/git/model_unauthorized_response.go index cec5d349d..853468a95 100644 --- a/services/git/model_unauthorized_response.go +++ b/services/git/model_unauthorized_response.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/model_unauthorized_response_test.go b/services/git/model_unauthorized_response_test.go index 2e78c0102..e39c866ed 100644 --- a/services/git/model_unauthorized_response_test.go +++ b/services/git/model_unauthorized_response_test.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/git/utils.go b/services/git/utils.go index 3b5e5e959..46c89fe2a 100644 --- a/services/git/utils.go +++ b/services/git/utils.go @@ -1,9 +1,9 @@ /* STACKIT Git API -Manage STACKIT Git instances. +STACKIT Git management API. -API version: 1beta.0.3 +API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. From 38c0d75db2b14c99500b6c1989fa63d2cd770b02 Mon Sep 17 00:00:00 2001 From: Ruben Hoenle Date: Wed, 18 Jun 2025 16:50:53 +0200 Subject: [PATCH 2/2] add changelog entries --- CHANGELOG.md | 5 +++++ services/git/CHANGELOG.md | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acd64e54..d5cbf335d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ## Release (2025-XX-XX) - `ske`: [v0.26.0](services/ske/CHANGELOG.md#v0260) - Add `required:"true"` tags to model structs +- `git`: [v0.6.0](services/git/CHANGELOG.md#v060) + - **Feature:** Add support for `Flavors` for STACKIT git instance + - **Feature:** Add support for `Acl` for STACKIT git instance + - `projectId` and `instanceId` strings must have a length of 36 characters now (previously was only limited to a maximum of 36 characters) + - Add `required:"true"` tags to model structs ## Release (2025-06-16) - `iaas`: diff --git a/services/git/CHANGELOG.md b/services/git/CHANGELOG.md index f1afa4e79..a36111759 100644 --- a/services/git/CHANGELOG.md +++ b/services/git/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.6.0 +- **Feature:** Add support for `Flavors` for STACKIT git instance +- **Feature:** Add support for `Acl` for STACKIT git instance +- `projectId` and `instanceId` strings must have a length of 36 characters now (previously was only limited to a maximum of 36 characters) +- Add `required:"true"` tags to model structs + ## v0.5.1 (2025-06-04) - **Bugfix:** Adjusted `UnmarshalJSON` function to use enum types and added tests for enums