diff --git a/services/resourcemanager/api_default.go b/services/resourcemanager/api_default.go index 4fe5e103c..67e29a57b 100644 --- a/services/resourcemanager/api_default.go +++ b/services/resourcemanager/api_default.go @@ -27,343 +27,6 @@ import ( // DefaultApiService DefaultApi service type DefaultApiService service -type ApiBffGetContainersOfAFolderRequest struct { - ctx context.Context - apiService *DefaultApiService - id string - limit *float32 - cursor *string -} - -// The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used. - -func (r ApiBffGetContainersOfAFolderRequest) Limit(limit float32) ApiBffGetContainersOfAFolderRequest { - r.limit = &limit - return r -} - -// A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started. - -func (r ApiBffGetContainersOfAFolderRequest) Cursor(cursor string) ApiBffGetContainersOfAFolderRequest { - r.cursor = &cursor - return r -} - -func (r ApiBffGetContainersOfAFolderRequest) Execute() (*ListOrganizationContainersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListOrganizationContainersResponse - ) - a := r.apiService - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BffGetContainersOfAFolder") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/bff/folders/{id}/containers" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(ParameterValueToString(r.id, "id")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - 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 - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - 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 -} - -/* -BffGetContainersOfAFolder: Get Containers Of A Folder - -Returns all direct resource container under this folder including their metadata. -- Response items will contain all folders first, followed by all projects -- If a folder does not have any containers, an empty items list will be returned - -**Note:** Recursion is not supported - meaning only the next level in hierarchy tree is considered! - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Folder identifier - UUID identifier is preferred; containerId is also supported. - @return ApiBffGetContainersOfAFolderRequest -*/ -func (a *APIClient) BffGetContainersOfAFolder(ctx context.Context, id string) ApiBffGetContainersOfAFolderRequest { - return ApiBffGetContainersOfAFolderRequest{ - apiService: a.defaultApi, - ctx: ctx, - id: id, - } -} - -func (a *APIClient) BffGetContainersOfAFolderExecute(ctx context.Context, id string) (*ListOrganizationContainersResponse, error) { - r := ApiBffGetContainersOfAFolderRequest{ - apiService: a.defaultApi, - ctx: ctx, - id: id, - } - return r.Execute() -} - -type ApiBffGetContainersOfAnOrganizationRequest struct { - ctx context.Context - apiService *DefaultApiService - id string - limit *float32 - cursor *string -} - -// The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used. - -func (r ApiBffGetContainersOfAnOrganizationRequest) Limit(limit float32) ApiBffGetContainersOfAnOrganizationRequest { - r.limit = &limit - return r -} - -// A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started. - -func (r ApiBffGetContainersOfAnOrganizationRequest) Cursor(cursor string) ApiBffGetContainersOfAnOrganizationRequest { - r.cursor = &cursor - return r -} - -func (r ApiBffGetContainersOfAnOrganizationRequest) Execute() (*ListOrganizationContainersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListOrganizationContainersResponse - ) - a := r.apiService - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BffGetContainersOfAnOrganization") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/bff/organizations/{id}/containers" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(ParameterValueToString(r.id, "id")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // 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{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - 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 - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - 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 - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - 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 -} - -/* -BffGetContainersOfAnOrganization: Get Containers Of An Organization - -Returns all direct resource container under this organization including their metadata. -- Response items will contain all folders first, followed by all projects -- If organization does not have any containers, an empty items list will be returned - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Organization identifier - UUID identifier is preferred; containerId is also supported. - @return ApiBffGetContainersOfAnOrganizationRequest -*/ -func (a *APIClient) BffGetContainersOfAnOrganization(ctx context.Context, id string) ApiBffGetContainersOfAnOrganizationRequest { - return ApiBffGetContainersOfAnOrganizationRequest{ - apiService: a.defaultApi, - ctx: ctx, - id: id, - } -} - -func (a *APIClient) BffGetContainersOfAnOrganizationExecute(ctx context.Context, id string) (*ListOrganizationContainersResponse, error) { - r := ApiBffGetContainersOfAnOrganizationRequest{ - apiService: a.defaultApi, - ctx: ctx, - id: id, - } - return r.Execute() -} - type ApiCreateProjectRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/resourcemanager/api_default_test.go b/services/resourcemanager/api_default_test.go index 9e73b199b..108e289dd 100644 --- a/services/resourcemanager/api_default_test.go +++ b/services/resourcemanager/api_default_test.go @@ -23,110 +23,6 @@ import ( func Test_resourcemanager_DefaultApiService(t *testing.T) { - t.Run("Test DefaultApiService BffGetContainersOfAFolder", func(t *testing.T) { - path := "/bff/folders/{id}/containers" - idValue := "id" - path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(ParameterValueToString(idValue, "id")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { - data := ListOrganizationContainersResponse{} - 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 resourcemanager_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) - } - - id := "id" - - resp, reqErr := apiClient.BffGetContainersOfAFolder(context.Background(), id).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if resp == nil { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService BffGetContainersOfAnOrganization", func(t *testing.T) { - path := "/bff/organizations/{id}/containers" - idValue := "id" - path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(ParameterValueToString(idValue, "id")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { - data := ListOrganizationContainersResponse{} - 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 resourcemanager_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) - } - - id := "id" - - resp, reqErr := apiClient.BffGetContainersOfAnOrganization(context.Background(), id).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if resp == nil { - t.Fatalf("response not present") - } - }) - t.Run("Test DefaultApiService CreateProject", func(t *testing.T) { path := "/v2/projects" diff --git a/services/resourcemanager/model_folder_response.go b/services/resourcemanager/model_folder_response.go deleted file mode 100644 index dff1bbdec..000000000 --- a/services/resourcemanager/model_folder_response.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -Resource Manager API - -API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "encoding/json" - "time" -) - -// checks if the FolderResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderResponse{} - -// FolderResponse struct for FolderResponse -type FolderResponse struct { - // Globally unique, user-friendly identifier. - // REQUIRED - ContainerId *string `json:"containerId"` - // Timestamp at which the folder was created. - // REQUIRED - CreationTime *time.Time `json:"creationTime"` - // Globally unique folder identifier. - // REQUIRED - FolderId *string `json:"folderId"` - // Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - Labels *map[string]string `json:"labels,omitempty"` - // Folder name. - // REQUIRED - Name *string `json:"name"` - // REQUIRED - Parent *Parent `json:"parent"` - // Timestamp at which the folder was last modified. - // REQUIRED - UpdateTime *time.Time `json:"updateTime"` -} - -type _FolderResponse FolderResponse - -// NewFolderResponse instantiates a new FolderResponse 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 NewFolderResponse(containerId *string, creationTime *time.Time, folderId *string, name *string, parent *Parent, updateTime *time.Time) *FolderResponse { - this := FolderResponse{} - this.ContainerId = containerId - this.CreationTime = creationTime - this.FolderId = folderId - this.Name = name - this.Parent = parent - this.UpdateTime = updateTime - return &this -} - -// NewFolderResponseWithDefaults instantiates a new FolderResponse 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 NewFolderResponseWithDefaults() *FolderResponse { - this := FolderResponse{} - return &this -} - -// GetContainerId returns the ContainerId field value -func (o *FolderResponse) GetContainerId() *string { - if o == nil || IsNil(o.ContainerId) { - var ret *string - return ret - } - - return o.ContainerId -} - -// GetContainerIdOk returns a tuple with the ContainerId field value -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetContainerIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContainerId, true -} - -// SetContainerId sets field value -func (o *FolderResponse) SetContainerId(v *string) { - o.ContainerId = v -} - -// GetCreationTime returns the CreationTime field value -func (o *FolderResponse) GetCreationTime() *time.Time { - if o == nil || IsNil(o.CreationTime) { - var ret *time.Time - return ret - } - - return o.CreationTime -} - -// GetCreationTimeOk returns a tuple with the CreationTime field value -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetCreationTimeOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreationTime, true -} - -// SetCreationTime sets field value -func (o *FolderResponse) SetCreationTime(v *time.Time) { - o.CreationTime = v -} - -// GetFolderId returns the FolderId field value -func (o *FolderResponse) GetFolderId() *string { - if o == nil || IsNil(o.FolderId) { - var ret *string - return ret - } - - return o.FolderId -} - -// GetFolderIdOk returns a tuple with the FolderId field value -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetFolderIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FolderId, true -} - -// SetFolderId sets field value -func (o *FolderResponse) SetFolderId(v *string) { - o.FolderId = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *FolderResponse) 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 *FolderResponse) 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 *FolderResponse) 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 *FolderResponse) SetLabels(v *map[string]string) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *FolderResponse) 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 -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *FolderResponse) SetName(v *string) { - o.Name = v -} - -// GetParent returns the Parent field value -func (o *FolderResponse) GetParent() *Parent { - if o == nil || IsNil(o.Parent) { - var ret *Parent - return ret - } - - return o.Parent -} - -// GetParentOk returns a tuple with the Parent field value -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetParentOk() (*Parent, bool) { - if o == nil { - return nil, false - } - return o.Parent, true -} - -// SetParent sets field value -func (o *FolderResponse) SetParent(v *Parent) { - o.Parent = v -} - -// GetUpdateTime returns the UpdateTime field value -func (o *FolderResponse) GetUpdateTime() *time.Time { - if o == nil || IsNil(o.UpdateTime) { - var ret *time.Time - return ret - } - - return o.UpdateTime -} - -// GetUpdateTimeOk returns a tuple with the UpdateTime field value -// and a boolean to check if the value has been set. -func (o *FolderResponse) GetUpdateTimeOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.UpdateTime, true -} - -// SetUpdateTime sets field value -func (o *FolderResponse) SetUpdateTime(v *time.Time) { - o.UpdateTime = v -} - -func (o FolderResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["containerId"] = o.ContainerId - toSerialize["creationTime"] = o.CreationTime - toSerialize["folderId"] = o.FolderId - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - toSerialize["parent"] = o.Parent - toSerialize["updateTime"] = o.UpdateTime - return toSerialize, nil -} - -type NullableFolderResponse struct { - value *FolderResponse - isSet bool -} - -func (v NullableFolderResponse) Get() *FolderResponse { - return v.value -} - -func (v *NullableFolderResponse) Set(val *FolderResponse) { - v.value = val - v.isSet = true -} - -func (v NullableFolderResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderResponse(val *FolderResponse) *NullableFolderResponse { - return &NullableFolderResponse{value: val, isSet: true} -} - -func (v NullableFolderResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/model_list_organization_containers_response.go b/services/resourcemanager/model_list_organization_containers_response.go deleted file mode 100644 index 26a97a475..000000000 --- a/services/resourcemanager/model_list_organization_containers_response.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -Resource Manager API - -API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "encoding/json" -) - -// checks if the ListOrganizationContainersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListOrganizationContainersResponse{} - -// ListOrganizationContainersResponse struct for ListOrganizationContainersResponse -type ListOrganizationContainersResponse struct { - // A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started. - // REQUIRED - Cursor *string `json:"cursor"` - // REQUIRED - Items *[]ListOrganizationContainersResponseItemsInner `json:"items"` - // The maximum number of projects to return in the response. If not present, an appropriate default will be used. - // REQUIRED - Limit *float64 `json:"limit"` -} - -type _ListOrganizationContainersResponse ListOrganizationContainersResponse - -// NewListOrganizationContainersResponse instantiates a new ListOrganizationContainersResponse 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 NewListOrganizationContainersResponse(cursor *string, items *[]ListOrganizationContainersResponseItemsInner, limit *float64) *ListOrganizationContainersResponse { - this := ListOrganizationContainersResponse{} - this.Cursor = cursor - this.Items = items - this.Limit = limit - return &this -} - -// NewListOrganizationContainersResponseWithDefaults instantiates a new ListOrganizationContainersResponse 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 NewListOrganizationContainersResponseWithDefaults() *ListOrganizationContainersResponse { - this := ListOrganizationContainersResponse{} - var limit float64 = 50 - this.Limit = &limit - return &this -} - -// GetCursor returns the Cursor field value -func (o *ListOrganizationContainersResponse) GetCursor() *string { - if o == nil || IsNil(o.Cursor) { - var ret *string - return ret - } - - return o.Cursor -} - -// GetCursorOk returns a tuple with the Cursor field value -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponse) GetCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cursor, true -} - -// SetCursor sets field value -func (o *ListOrganizationContainersResponse) SetCursor(v *string) { - o.Cursor = v -} - -// GetItems returns the Items field value -func (o *ListOrganizationContainersResponse) GetItems() *[]ListOrganizationContainersResponseItemsInner { - if o == nil || IsNil(o.Items) { - var ret *[]ListOrganizationContainersResponseItemsInner - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponse) GetItemsOk() (*[]ListOrganizationContainersResponseItemsInner, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *ListOrganizationContainersResponse) SetItems(v *[]ListOrganizationContainersResponseItemsInner) { - o.Items = v -} - -// GetLimit returns the Limit field value -func (o *ListOrganizationContainersResponse) GetLimit() *float64 { - if o == nil || IsNil(o.Limit) { - var ret *float64 - return ret - } - - return o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponse) GetLimitOk() (*float64, bool) { - if o == nil { - return nil, false - } - return o.Limit, true -} - -// SetLimit sets field value -func (o *ListOrganizationContainersResponse) SetLimit(v *float64) { - o.Limit = v -} - -func (o ListOrganizationContainersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cursor"] = o.Cursor - toSerialize["items"] = o.Items - toSerialize["limit"] = o.Limit - return toSerialize, nil -} - -type NullableListOrganizationContainersResponse struct { - value *ListOrganizationContainersResponse - isSet bool -} - -func (v NullableListOrganizationContainersResponse) Get() *ListOrganizationContainersResponse { - return v.value -} - -func (v *NullableListOrganizationContainersResponse) Set(val *ListOrganizationContainersResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListOrganizationContainersResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListOrganizationContainersResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListOrganizationContainersResponse(val *ListOrganizationContainersResponse) *NullableListOrganizationContainersResponse { - return &NullableListOrganizationContainersResponse{value: val, isSet: true} -} - -func (v NullableListOrganizationContainersResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListOrganizationContainersResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/model_list_organization_containers_response_items_inner.go b/services/resourcemanager/model_list_organization_containers_response_items_inner.go deleted file mode 100644 index 45a117720..000000000 --- a/services/resourcemanager/model_list_organization_containers_response_items_inner.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Resource Manager API - -API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "encoding/json" - "fmt" -) - -// ListOrganizationContainersResponseItemsInner struct for ListOrganizationContainersResponseItemsInner -type ListOrganizationContainersResponseItemsInner struct { - ListOrganizationContainersResponseItemsInnerAnyOf *ListOrganizationContainersResponseItemsInnerAnyOf - ListOrganizationContainersResponseItemsInnerAnyOf1 *ListOrganizationContainersResponseItemsInnerAnyOf1 -} - -// Unmarshal JSON data into any of the pointers in the struct -func (dst *ListOrganizationContainersResponseItemsInner) UnmarshalJSON(data []byte) error { - var err error - // try to unmarshal JSON data into ListOrganizationContainersResponseItemsInnerAnyOf - err = json.Unmarshal(data, &dst.ListOrganizationContainersResponseItemsInnerAnyOf) - if err == nil { - jsonListOrganizationContainersResponseItemsInnerAnyOf, _ := json.Marshal(dst.ListOrganizationContainersResponseItemsInnerAnyOf) - if string(jsonListOrganizationContainersResponseItemsInnerAnyOf) == "{}" { // empty struct - dst.ListOrganizationContainersResponseItemsInnerAnyOf = nil - } else { - return nil // data stored in dst.ListOrganizationContainersResponseItemsInnerAnyOf, return on the first match - } - } else { - dst.ListOrganizationContainersResponseItemsInnerAnyOf = nil - } - - // try to unmarshal JSON data into ListOrganizationContainersResponseItemsInnerAnyOf1 - err = json.Unmarshal(data, &dst.ListOrganizationContainersResponseItemsInnerAnyOf1) - if err == nil { - jsonListOrganizationContainersResponseItemsInnerAnyOf1, _ := json.Marshal(dst.ListOrganizationContainersResponseItemsInnerAnyOf1) - if string(jsonListOrganizationContainersResponseItemsInnerAnyOf1) == "{}" { // empty struct - dst.ListOrganizationContainersResponseItemsInnerAnyOf1 = nil - } else { - return nil // data stored in dst.ListOrganizationContainersResponseItemsInnerAnyOf1, return on the first match - } - } else { - dst.ListOrganizationContainersResponseItemsInnerAnyOf1 = nil - } - - return fmt.Errorf("data failed to match schemas in anyOf(ListOrganizationContainersResponseItemsInner)") -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src *ListOrganizationContainersResponseItemsInner) MarshalJSON() ([]byte, error) { - if src.ListOrganizationContainersResponseItemsInnerAnyOf != nil { - return json.Marshal(&src.ListOrganizationContainersResponseItemsInnerAnyOf) - } - - if src.ListOrganizationContainersResponseItemsInnerAnyOf1 != nil { - return json.Marshal(&src.ListOrganizationContainersResponseItemsInnerAnyOf1) - } - - return nil, nil // no data in anyOf schemas -} - -type NullableListOrganizationContainersResponseItemsInner struct { - value *ListOrganizationContainersResponseItemsInner - isSet bool -} - -func (v NullableListOrganizationContainersResponseItemsInner) Get() *ListOrganizationContainersResponseItemsInner { - return v.value -} - -func (v *NullableListOrganizationContainersResponseItemsInner) Set(val *ListOrganizationContainersResponseItemsInner) { - v.value = val - v.isSet = true -} - -func (v NullableListOrganizationContainersResponseItemsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListOrganizationContainersResponseItemsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListOrganizationContainersResponseItemsInner(val *ListOrganizationContainersResponseItemsInner) *NullableListOrganizationContainersResponseItemsInner { - return &NullableListOrganizationContainersResponseItemsInner{value: val, isSet: true} -} - -func (v NullableListOrganizationContainersResponseItemsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListOrganizationContainersResponseItemsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of.go b/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of.go deleted file mode 100644 index 41dab3a83..000000000 --- a/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Resource Manager API - -API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "encoding/json" -) - -// checks if the ListOrganizationContainersResponseItemsInnerAnyOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListOrganizationContainersResponseItemsInnerAnyOf{} - -// ListOrganizationContainersResponseItemsInnerAnyOf struct for ListOrganizationContainersResponseItemsInnerAnyOf -type ListOrganizationContainersResponseItemsInnerAnyOf struct { - // REQUIRED - Item *FolderResponse `json:"item"` - // Resource container type. - // REQUIRED - Type *string `json:"type"` -} - -type _ListOrganizationContainersResponseItemsInnerAnyOf ListOrganizationContainersResponseItemsInnerAnyOf - -// NewListOrganizationContainersResponseItemsInnerAnyOf instantiates a new ListOrganizationContainersResponseItemsInnerAnyOf 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 NewListOrganizationContainersResponseItemsInnerAnyOf(item *FolderResponse, type_ *string) *ListOrganizationContainersResponseItemsInnerAnyOf { - this := ListOrganizationContainersResponseItemsInnerAnyOf{} - this.Item = item - this.Type = type_ - return &this -} - -// NewListOrganizationContainersResponseItemsInnerAnyOfWithDefaults instantiates a new ListOrganizationContainersResponseItemsInnerAnyOf 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 NewListOrganizationContainersResponseItemsInnerAnyOfWithDefaults() *ListOrganizationContainersResponseItemsInnerAnyOf { - this := ListOrganizationContainersResponseItemsInnerAnyOf{} - return &this -} - -// GetItem returns the Item field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) GetItem() *FolderResponse { - if o == nil || IsNil(o.Item) { - var ret *FolderResponse - return ret - } - - return o.Item -} - -// GetItemOk returns a tuple with the Item field value -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) GetItemOk() (*FolderResponse, bool) { - if o == nil { - return nil, false - } - return o.Item, true -} - -// SetItem sets field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) SetItem(v *FolderResponse) { - o.Item = v -} - -// GetType returns the Type field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) 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 -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true -} - -// SetType sets field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf) SetType(v *string) { - o.Type = v -} - -func (o ListOrganizationContainersResponseItemsInnerAnyOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["item"] = o.Item - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableListOrganizationContainersResponseItemsInnerAnyOf struct { - value *ListOrganizationContainersResponseItemsInnerAnyOf - isSet bool -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf) Get() *ListOrganizationContainersResponseItemsInnerAnyOf { - return v.value -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf) Set(val *ListOrganizationContainersResponseItemsInnerAnyOf) { - v.value = val - v.isSet = true -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf) IsSet() bool { - return v.isSet -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListOrganizationContainersResponseItemsInnerAnyOf(val *ListOrganizationContainersResponseItemsInnerAnyOf) *NullableListOrganizationContainersResponseItemsInnerAnyOf { - return &NullableListOrganizationContainersResponseItemsInnerAnyOf{value: val, isSet: true} -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of_1.go b/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of_1.go deleted file mode 100644 index 864e0f690..000000000 --- a/services/resourcemanager/model_list_organization_containers_response_items_inner_any_of_1.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Resource Manager API - -API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "encoding/json" -) - -// checks if the ListOrganizationContainersResponseItemsInnerAnyOf1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListOrganizationContainersResponseItemsInnerAnyOf1{} - -// ListOrganizationContainersResponseItemsInnerAnyOf1 struct for ListOrganizationContainersResponseItemsInnerAnyOf1 -type ListOrganizationContainersResponseItemsInnerAnyOf1 struct { - // REQUIRED - Item *Project `json:"item"` - // Resource container type. - // REQUIRED - Type *string `json:"type"` -} - -type _ListOrganizationContainersResponseItemsInnerAnyOf1 ListOrganizationContainersResponseItemsInnerAnyOf1 - -// NewListOrganizationContainersResponseItemsInnerAnyOf1 instantiates a new ListOrganizationContainersResponseItemsInnerAnyOf1 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 NewListOrganizationContainersResponseItemsInnerAnyOf1(item *Project, type_ *string) *ListOrganizationContainersResponseItemsInnerAnyOf1 { - this := ListOrganizationContainersResponseItemsInnerAnyOf1{} - this.Item = item - this.Type = type_ - return &this -} - -// NewListOrganizationContainersResponseItemsInnerAnyOf1WithDefaults instantiates a new ListOrganizationContainersResponseItemsInnerAnyOf1 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 NewListOrganizationContainersResponseItemsInnerAnyOf1WithDefaults() *ListOrganizationContainersResponseItemsInnerAnyOf1 { - this := ListOrganizationContainersResponseItemsInnerAnyOf1{} - return &this -} - -// GetItem returns the Item field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) GetItem() *Project { - if o == nil || IsNil(o.Item) { - var ret *Project - return ret - } - - return o.Item -} - -// GetItemOk returns a tuple with the Item field value -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) GetItemOk() (*Project, bool) { - if o == nil { - return nil, false - } - return o.Item, true -} - -// SetItem sets field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) SetItem(v *Project) { - o.Item = v -} - -// GetType returns the Type field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) 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 -// and a boolean to check if the value has been set. -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true -} - -// SetType sets field value -func (o *ListOrganizationContainersResponseItemsInnerAnyOf1) SetType(v *string) { - o.Type = v -} - -func (o ListOrganizationContainersResponseItemsInnerAnyOf1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["item"] = o.Item - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableListOrganizationContainersResponseItemsInnerAnyOf1 struct { - value *ListOrganizationContainersResponseItemsInnerAnyOf1 - isSet bool -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf1) Get() *ListOrganizationContainersResponseItemsInnerAnyOf1 { - return v.value -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf1) Set(val *ListOrganizationContainersResponseItemsInnerAnyOf1) { - v.value = val - v.isSet = true -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf1) IsSet() bool { - return v.isSet -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListOrganizationContainersResponseItemsInnerAnyOf1(val *ListOrganizationContainersResponseItemsInnerAnyOf1) *NullableListOrganizationContainersResponseItemsInnerAnyOf1 { - return &NullableListOrganizationContainersResponseItemsInnerAnyOf1{value: val, isSet: true} -} - -func (v NullableListOrganizationContainersResponseItemsInnerAnyOf1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListOrganizationContainersResponseItemsInnerAnyOf1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -}