From 1963b81fce5126cd6dd3db7a37b73f8d3fe0f440 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 28 Jul 2025 12:29:56 +0000 Subject: [PATCH 1/2] Generate scf --- go.work | 1 + services/scf/.openapi-generator/VERSION | 1 + services/scf/api_default.go | 5122 +++++++++++++++++ services/scf/api_default_test.go | 1377 +++++ services/scf/client.go | 631 ++ services/scf/configuration.go | 38 + services/scf/go.mod | 10 + services/scf/go.sum | 8 + .../model_apply_organization_quota_payload.go | 126 + ...l_apply_organization_quota_payload_test.go | 11 + services/scf/model_create_org_role_payload.go | 221 + .../scf/model_create_org_role_payload_test.go | 11 + .../scf/model_create_organization_payload.go | 174 + .../model_create_organization_payload_test.go | 11 + services/scf/model_create_space_payload.go | 127 + .../scf/model_create_space_payload_test.go | 11 + .../scf/model_create_space_role_payload.go | 221 + .../model_create_space_role_payload_test.go | 11 + services/scf/model_error_response.go | 170 + services/scf/model_error_response_test.go | 11 + services/scf/model_org_manager.go | 389 ++ .../scf/model_org_manager_delete_response.go | 126 + .../model_org_manager_delete_response_test.go | 11 + services/scf/model_org_manager_response.go | 477 ++ .../scf/model_org_manager_response_test.go | 11 + services/scf/model_org_manager_test.go | 11 + .../scf/model_org_role_create_bff_request.go | 125 + .../model_org_role_create_bff_request_test.go | 11 + services/scf/model_org_role_response.go | 345 ++ services/scf/model_org_role_response_test.go | 11 + services/scf/model_org_role_type.go | 119 + services/scf/model_org_role_type_test.go | 11 + services/scf/model_organization.go | 521 ++ .../scf/model_organization_create_response.go | 258 + ...model_organization_create_response_test.go | 11 + .../scf/model_organization_delete_response.go | 258 + ...model_organization_delete_response_test.go | 11 + services/scf/model_organization_quota.go | 302 + services/scf/model_organization_quota_test.go | 11 + services/scf/model_organization_test.go | 11 + .../scf/model_organization_usage_summary.go | 301 + .../model_organization_usage_summary_test.go | 11 + services/scf/model_organizations_list.go | 168 + services/scf/model_organizations_list_item.go | 541 ++ .../scf/model_organizations_list_item_test.go | 11 + services/scf/model_organizations_list_test.go | 11 + services/scf/model_pagination.go | 174 + services/scf/model_pagination_test.go | 11 + services/scf/model_platform_list.go | 168 + services/scf/model_platform_list_test.go | 11 + services/scf/model_platforms.go | 350 ++ services/scf/model_platforms_test.go | 11 + services/scf/model_quota.go | 609 ++ services/scf/model_quota_apps.go | 312 + services/scf/model_quota_apps_test.go | 11 + services/scf/model_quota_domains.go | 128 + services/scf/model_quota_domains_test.go | 11 + services/scf/model_quota_routes.go | 174 + services/scf/model_quota_routes_test.go | 11 + services/scf/model_quota_services.go | 217 + services/scf/model_quota_services_test.go | 11 + services/scf/model_quota_test.go | 11 + services/scf/model_space.go | 433 ++ services/scf/model_space_delete_response.go | 126 + .../scf/model_space_delete_response_test.go | 11 + .../model_space_role_create_bff_request.go | 125 + ...odel_space_role_create_bff_request_test.go | 11 + .../model_space_role_create_bff_response.go | 172 + ...del_space_role_create_bff_response_test.go | 11 + .../scf/model_space_role_create_response.go | 389 ++ .../model_space_role_create_response_test.go | 11 + services/scf/model_space_role_type.go | 119 + services/scf/model_space_role_type_test.go | 11 + services/scf/model_space_test.go | 11 + services/scf/model_spaces_list.go | 168 + services/scf/model_spaces_list_test.go | 11 + .../scf/model_update_organization_payload.go | 176 + .../model_update_organization_payload_test.go | 11 + services/scf/model_update_space_payload.go | 127 + .../scf/model_update_space_payload_test.go | 11 + services/scf/model_usage_summary.go | 426 ++ services/scf/model_usage_summary_test.go | 11 + services/scf/utils.go | 385 ++ 83 files changed, 17342 insertions(+) create mode 100644 services/scf/.openapi-generator/VERSION create mode 100644 services/scf/api_default.go create mode 100644 services/scf/api_default_test.go create mode 100644 services/scf/client.go create mode 100644 services/scf/configuration.go create mode 100644 services/scf/go.mod create mode 100644 services/scf/go.sum create mode 100644 services/scf/model_apply_organization_quota_payload.go create mode 100644 services/scf/model_apply_organization_quota_payload_test.go create mode 100644 services/scf/model_create_org_role_payload.go create mode 100644 services/scf/model_create_org_role_payload_test.go create mode 100644 services/scf/model_create_organization_payload.go create mode 100644 services/scf/model_create_organization_payload_test.go create mode 100644 services/scf/model_create_space_payload.go create mode 100644 services/scf/model_create_space_payload_test.go create mode 100644 services/scf/model_create_space_role_payload.go create mode 100644 services/scf/model_create_space_role_payload_test.go create mode 100644 services/scf/model_error_response.go create mode 100644 services/scf/model_error_response_test.go create mode 100644 services/scf/model_org_manager.go create mode 100644 services/scf/model_org_manager_delete_response.go create mode 100644 services/scf/model_org_manager_delete_response_test.go create mode 100644 services/scf/model_org_manager_response.go create mode 100644 services/scf/model_org_manager_response_test.go create mode 100644 services/scf/model_org_manager_test.go create mode 100644 services/scf/model_org_role_create_bff_request.go create mode 100644 services/scf/model_org_role_create_bff_request_test.go create mode 100644 services/scf/model_org_role_response.go create mode 100644 services/scf/model_org_role_response_test.go create mode 100644 services/scf/model_org_role_type.go create mode 100644 services/scf/model_org_role_type_test.go create mode 100644 services/scf/model_organization.go create mode 100644 services/scf/model_organization_create_response.go create mode 100644 services/scf/model_organization_create_response_test.go create mode 100644 services/scf/model_organization_delete_response.go create mode 100644 services/scf/model_organization_delete_response_test.go create mode 100644 services/scf/model_organization_quota.go create mode 100644 services/scf/model_organization_quota_test.go create mode 100644 services/scf/model_organization_test.go create mode 100644 services/scf/model_organization_usage_summary.go create mode 100644 services/scf/model_organization_usage_summary_test.go create mode 100644 services/scf/model_organizations_list.go create mode 100644 services/scf/model_organizations_list_item.go create mode 100644 services/scf/model_organizations_list_item_test.go create mode 100644 services/scf/model_organizations_list_test.go create mode 100644 services/scf/model_pagination.go create mode 100644 services/scf/model_pagination_test.go create mode 100644 services/scf/model_platform_list.go create mode 100644 services/scf/model_platform_list_test.go create mode 100644 services/scf/model_platforms.go create mode 100644 services/scf/model_platforms_test.go create mode 100644 services/scf/model_quota.go create mode 100644 services/scf/model_quota_apps.go create mode 100644 services/scf/model_quota_apps_test.go create mode 100644 services/scf/model_quota_domains.go create mode 100644 services/scf/model_quota_domains_test.go create mode 100644 services/scf/model_quota_routes.go create mode 100644 services/scf/model_quota_routes_test.go create mode 100644 services/scf/model_quota_services.go create mode 100644 services/scf/model_quota_services_test.go create mode 100644 services/scf/model_quota_test.go create mode 100644 services/scf/model_space.go create mode 100644 services/scf/model_space_delete_response.go create mode 100644 services/scf/model_space_delete_response_test.go create mode 100644 services/scf/model_space_role_create_bff_request.go create mode 100644 services/scf/model_space_role_create_bff_request_test.go create mode 100644 services/scf/model_space_role_create_bff_response.go create mode 100644 services/scf/model_space_role_create_bff_response_test.go create mode 100644 services/scf/model_space_role_create_response.go create mode 100644 services/scf/model_space_role_create_response_test.go create mode 100644 services/scf/model_space_role_type.go create mode 100644 services/scf/model_space_role_type_test.go create mode 100644 services/scf/model_space_test.go create mode 100644 services/scf/model_spaces_list.go create mode 100644 services/scf/model_spaces_list_test.go create mode 100644 services/scf/model_update_organization_payload.go create mode 100644 services/scf/model_update_organization_payload_test.go create mode 100644 services/scf/model_update_space_payload.go create mode 100644 services/scf/model_update_space_payload_test.go create mode 100644 services/scf/model_usage_summary.go create mode 100644 services/scf/model_usage_summary_test.go create mode 100644 services/scf/utils.go diff --git a/go.work b/go.work index 643812537..157c17fb9 100644 --- a/go.work +++ b/go.work @@ -54,6 +54,7 @@ use ( ./services/redis ./services/resourcemanager ./services/runcommand + ./services/scf ./services/secretsmanager ./services/serverbackup ./services/serverupdate diff --git a/services/scf/.openapi-generator/VERSION b/services/scf/.openapi-generator/VERSION new file mode 100644 index 000000000..cd802a1ec --- /dev/null +++ b/services/scf/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/services/scf/api_default.go b/services/scf/api_default.go new file mode 100644 index 000000000..31146bb74 --- /dev/null +++ b/services/scf/api_default.go @@ -0,0 +1,5122 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultApi interface { + /* + ApplyOrganizationQuota Apply an organization quota + Change the organization quota of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiApplyOrganizationQuotaRequest + */ + ApplyOrganizationQuota(ctx context.Context, projectId string, region string, organizationId string) ApiApplyOrganizationQuotaRequest + /* + ApplyOrganizationQuotaExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrganizationQuota + + */ + ApplyOrganizationQuotaExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationQuota, error) + /* + CreateOrgManager Create organization manager + Creates organization manager within an organization. + + The organization manager will be backed by a CF user. + There is only one organization manager per organization. + The organization manager gets assigned the CF role Org Manager. + + This endpoint does synchronously several non-atomic steps behind the scenes. + If any of those steps fail, the 'Delete Organization Manager' needs to be called first to clean up the failed creation attempt and afterwards the creation can be retried. + + The password needs to be stored by the API callee since it cannot be retrieved after creation. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateOrgManagerRequest + */ + CreateOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiCreateOrgManagerRequest + /* + CreateOrgManagerExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrgManagerResponse + + */ + CreateOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManagerResponse, error) + /* + CreateOrgRole Assign organization role + Assign organization role within an organization. If the role is already assigned, the existing role GUID gets returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateOrgRoleRequest + */ + CreateOrgRole(ctx context.Context, projectId string, region string, organizationId string) ApiCreateOrgRoleRequest + /* + CreateOrgRoleExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrgRoleResponse + + */ + CreateOrgRoleExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgRoleResponse, error) + /* + CreateOrganization Create an organization + Creates an organization without assigning any CF roles or creating a space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateOrganizationRequest + */ + CreateOrganization(ctx context.Context, projectId string, region string) ApiCreateOrganizationRequest + /* + CreateOrganizationExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return OrganizationCreateResponse + + */ + CreateOrganizationExecute(ctx context.Context, projectId string, region string) (*OrganizationCreateResponse, error) + /* + CreateSpace Create space + Create space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateSpaceRequest + */ + CreateSpace(ctx context.Context, projectId string, region string, organizationId string) ApiCreateSpaceRequest + /* + CreateSpaceExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return Space + + */ + CreateSpaceExecute(ctx context.Context, projectId string, region string, organizationId string) (*Space, error) + /* + CreateSpaceRole Assign space role + Assign space role within an space. If the role is already assigned, the existing role GUID gets returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiCreateSpaceRoleRequest + */ + CreateSpaceRole(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiCreateSpaceRoleRequest + /* + CreateSpaceRoleExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return SpaceRoleCreateResponse + + */ + CreateSpaceRoleExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*SpaceRoleCreateResponse, error) + /* + DeleteOrgManager Delete organization manager + Delete the organization manager. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiDeleteOrgManagerRequest + */ + DeleteOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiDeleteOrgManagerRequest + /* + DeleteOrgManagerExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrgManagerDeleteResponse + + */ + DeleteOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManagerDeleteResponse, error) + /* + DeleteOrganization Delete organization + Delete an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiDeleteOrganizationRequest + */ + DeleteOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiDeleteOrganizationRequest + /* + DeleteOrganizationExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrganizationDeleteResponse + + */ + DeleteOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationDeleteResponse, error) + /* + DeleteSpace Delete space + Delete space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiDeleteSpaceRequest + */ + DeleteSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiDeleteSpaceRequest + /* + DeleteSpaceExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return SpaceDeleteResponse + + */ + DeleteSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*SpaceDeleteResponse, error) + /* + GetOrgManager Get organization manager + Returns the organization manager within an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrgManagerRequest + */ + GetOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrgManagerRequest + /* + GetOrgManagerExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrgManager + + */ + GetOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManager, error) + /* + GetOrganization Get an organization + Returns an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrganizationRequest + */ + GetOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrganizationRequest + /* + GetOrganizationExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return Organization + + */ + GetOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*Organization, error) + /* + GetOrganizationQuota Get an organization quota + Returns an organization quota. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param quotaId + @return ApiGetOrganizationQuotaRequest + */ + GetOrganizationQuota(ctx context.Context, projectId string, region string, organizationId string, quotaId string) ApiGetOrganizationQuotaRequest + /* + GetOrganizationQuotaExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param quotaId + @return Quota + + */ + GetOrganizationQuotaExecute(ctx context.Context, projectId string, region string, organizationId string, quotaId string) (*Quota, error) + /* + GetOrganizationUsageSummary Get an organization usage summary + Returns an organization usage summary. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrganizationUsageSummaryRequest + */ + GetOrganizationUsageSummary(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrganizationUsageSummaryRequest + /* + GetOrganizationUsageSummaryExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return OrganizationUsageSummary + + */ + GetOrganizationUsageSummaryExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationUsageSummary, error) + /* + GetPlatform Get platform + Fetch a single platform + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return ApiGetPlatformRequest + */ + GetPlatform(ctx context.Context, projectId string, region string, platformId string) ApiGetPlatformRequest + /* + GetPlatformExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return Platforms + + */ + GetPlatformExecute(ctx context.Context, projectId string, region string, platformId string) (*Platforms, error) + /* + GetPlatformQuota Get organization quota on a platform + Returns an organization quota on a platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @param quotaId + @return ApiGetPlatformQuotaRequest + */ + GetPlatformQuota(ctx context.Context, projectId string, region string, platformId string, quotaId string) ApiGetPlatformQuotaRequest + /* + GetPlatformQuotaExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @param quotaId + @return Quota + + */ + GetPlatformQuotaExecute(ctx context.Context, projectId string, region string, platformId string, quotaId string) (*Quota, error) + /* + GetSpace Get a space + Returns a space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiGetSpaceRequest + */ + GetSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiGetSpaceRequest + /* + GetSpaceExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return Space + + */ + GetSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*Space, error) + /* + ListOrganizationQuotas List organization quotas + Returns a list of organization quotas. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiListOrganizationQuotasRequest + */ + ListOrganizationQuotas(ctx context.Context, projectId string, region string, organizationId string) ApiListOrganizationQuotasRequest + /* + ListOrganizationQuotasExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return []Quota + + */ + ListOrganizationQuotasExecute(ctx context.Context, projectId string, region string, organizationId string) ([]Quota, error) + /* + ListOrganizations List organizations + Returns a list of organizations for a specific STACKIT project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListOrganizationsRequest + */ + ListOrganizations(ctx context.Context, projectId string, region string) ApiListOrganizationsRequest + /* + ListOrganizationsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return OrganizationsList + + */ + ListOrganizationsExecute(ctx context.Context, projectId string, region string) (*OrganizationsList, error) + /* + ListPlatformQuotas List organization quotas on a platform + Returns a list of organization quotas on a platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return ApiListPlatformQuotasRequest + */ + ListPlatformQuotas(ctx context.Context, projectId string, region string, platformId string) ApiListPlatformQuotasRequest + /* + ListPlatformQuotasExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return []Quota + + */ + ListPlatformQuotasExecute(ctx context.Context, projectId string, region string, platformId string) ([]Quota, error) + /* + ListPlatforms List all platforms + List all platforms available for a STACKIT project + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListPlatformsRequest + */ + ListPlatforms(ctx context.Context, projectId string, region string) ApiListPlatformsRequest + /* + ListPlatformsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return PlatformList + + */ + ListPlatformsExecute(ctx context.Context, projectId string, region string) (*PlatformList, error) + /* + ListSpaces List spaces + Returns a list of spaces for a specific organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiListSpacesRequest + */ + ListSpaces(ctx context.Context, projectId string, region string, organizationId string) ApiListSpacesRequest + /* + ListSpacesExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return SpacesList + + */ + ListSpacesExecute(ctx context.Context, projectId string, region string, organizationId string) (*SpacesList, error) + /* + UpdateOrganization Update organization + Update organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiUpdateOrganizationRequest + */ + UpdateOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiUpdateOrganizationRequest + /* + UpdateOrganizationExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return Organization + + */ + UpdateOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*Organization, error) + /* + UpdateSpace Update space + Update space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiUpdateSpaceRequest + */ + UpdateSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiUpdateSpaceRequest + /* + UpdateSpaceExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return Space + + */ + UpdateSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*Space, error) +} + +type ApiApplyOrganizationQuotaRequest interface { + ApplyOrganizationQuotaPayload(applyOrganizationQuotaPayload ApplyOrganizationQuotaPayload) ApiApplyOrganizationQuotaRequest + Execute() (*OrganizationQuota, error) +} + +type ApiCreateOrgManagerRequest interface { + Execute() (*OrgManagerResponse, error) +} + +type ApiCreateOrgRoleRequest interface { + CreateOrgRolePayload(createOrgRolePayload CreateOrgRolePayload) ApiCreateOrgRoleRequest + Execute() (*OrgRoleResponse, error) +} + +type ApiCreateOrganizationRequest interface { + CreateOrganizationPayload(createOrganizationPayload CreateOrganizationPayload) ApiCreateOrganizationRequest + Execute() (*OrganizationCreateResponse, error) +} + +type ApiCreateSpaceRequest interface { + CreateSpacePayload(createSpacePayload CreateSpacePayload) ApiCreateSpaceRequest + Execute() (*Space, error) +} + +type ApiCreateSpaceRoleRequest interface { + CreateSpaceRolePayload(createSpaceRolePayload CreateSpaceRolePayload) ApiCreateSpaceRoleRequest + Execute() (*SpaceRoleCreateResponse, error) +} + +type ApiDeleteOrgManagerRequest interface { + Execute() (*OrgManagerDeleteResponse, error) +} + +type ApiDeleteOrganizationRequest interface { + Execute() (*OrganizationDeleteResponse, error) +} + +type ApiDeleteSpaceRequest interface { + Execute() (*SpaceDeleteResponse, error) +} + +type ApiGetOrgManagerRequest interface { + Execute() (*OrgManager, error) +} + +type ApiGetOrganizationRequest interface { + Execute() (*Organization, error) +} + +type ApiGetOrganizationQuotaRequest interface { + Execute() (*Quota, error) +} + +type ApiGetOrganizationUsageSummaryRequest interface { + Execute() (*OrganizationUsageSummary, error) +} + +type ApiGetPlatformRequest interface { + Execute() (*Platforms, error) +} + +type ApiGetPlatformQuotaRequest interface { + Execute() (*Quota, error) +} + +type ApiGetSpaceRequest interface { + Execute() (*Space, error) +} + +type ApiListOrganizationQuotasRequest interface { + Execute() ([]Quota, error) +} + +type ApiListOrganizationsRequest interface { + // Adds the details to the response that can be queried from the Cloud Controller API + WithDetails(withDetails bool) ApiListOrganizationsRequest + // In case `withDetails` is enabled, the organization list can be sorted by `name`. In order to sort by `name`, you have to set the value `name`. The default sort ordering is ascending. To specify descending order for `name` field, you have to append ` desc` suffix; for example `name desc`. + OrderBy(orderBy string) ApiListOrganizationsRequest + // Which page is returned + Page(page int64) ApiListOrganizationsRequest + // Elements to be returned per page + PerPage(perPage int64) ApiListOrganizationsRequest + Execute() (*OrganizationsList, error) +} + +type ApiListPlatformQuotasRequest interface { + Execute() ([]Quota, error) +} + +type ApiListPlatformsRequest interface { + // Which page is returned + Page(page int64) ApiListPlatformsRequest + // Elements to be returned per page + PerPage(perPage int64) ApiListPlatformsRequest + Execute() (*PlatformList, error) +} + +type ApiListSpacesRequest interface { + // Which page is returned + Page(page int64) ApiListSpacesRequest + // Elements to be returned per page + PerPage(perPage int64) ApiListSpacesRequest + Execute() (*SpacesList, error) +} + +type ApiUpdateOrganizationRequest interface { + UpdateOrganizationPayload(updateOrganizationPayload UpdateOrganizationPayload) ApiUpdateOrganizationRequest + Execute() (*Organization, error) +} + +type ApiUpdateSpaceRequest interface { + UpdateSpacePayload(updateSpacePayload UpdateSpacePayload) ApiUpdateSpaceRequest + Execute() (*Space, error) +} + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type ApplyOrganizationQuotaRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + applyOrganizationQuotaPayload *ApplyOrganizationQuotaPayload +} + +func (r ApplyOrganizationQuotaRequest) ApplyOrganizationQuotaPayload(applyOrganizationQuotaPayload ApplyOrganizationQuotaPayload) ApiApplyOrganizationQuotaRequest { + r.applyOrganizationQuotaPayload = &applyOrganizationQuotaPayload + return r +} + +func (r ApplyOrganizationQuotaRequest) Execute() (*OrganizationQuota, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationQuota + ) + 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.ApplyOrganizationQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.applyOrganizationQuotaPayload == nil { + return localVarReturnValue, fmt.Errorf("applyOrganizationQuotaPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.applyOrganizationQuotaPayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ApplyOrganizationQuota: Apply an organization quota + +Change the organization quota of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiApplyOrganizationQuotaRequest +*/ +func (a *APIClient) ApplyOrganizationQuota(ctx context.Context, projectId string, region string, organizationId string) ApiApplyOrganizationQuotaRequest { + return ApplyOrganizationQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) ApplyOrganizationQuotaExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationQuota, error) { + r := ApplyOrganizationQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type CreateOrgManagerRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r CreateOrgManagerRequest) Execute() (*OrgManagerResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrgManagerResponse + ) + 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.CreateOrgManager") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +CreateOrgManager: Create organization manager + +Creates organization manager within an organization. + +The organization manager will be backed by a CF user. +There is only one organization manager per organization. +The organization manager gets assigned the CF role Org Manager. + +This endpoint does synchronously several non-atomic steps behind the scenes. +If any of those steps fail, the 'Delete Organization Manager' needs to be called first to clean up the failed creation attempt and afterwards the creation can be retried. + +The password needs to be stored by the API callee since it cannot be retrieved after creation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateOrgManagerRequest +*/ +func (a *APIClient) CreateOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiCreateOrgManagerRequest { + return CreateOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) CreateOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManagerResponse, error) { + r := CreateOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type CreateOrgRoleRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + createOrgRolePayload *CreateOrgRolePayload +} + +func (r CreateOrgRoleRequest) CreateOrgRolePayload(createOrgRolePayload CreateOrgRolePayload) ApiCreateOrgRoleRequest { + r.createOrgRolePayload = &createOrgRolePayload + return r +} + +func (r CreateOrgRoleRequest) Execute() (*OrgRoleResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrgRoleResponse + ) + 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.CreateOrgRole") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createOrgRolePayload == nil { + return localVarReturnValue, fmt.Errorf("createOrgRolePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createOrgRolePayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +CreateOrgRole: Assign organization role + +Assign organization role within an organization. If the role is already assigned, the existing role GUID gets returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateOrgRoleRequest +*/ +func (a *APIClient) CreateOrgRole(ctx context.Context, projectId string, region string, organizationId string) ApiCreateOrgRoleRequest { + return CreateOrgRoleRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) CreateOrgRoleExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgRoleResponse, error) { + r := CreateOrgRoleRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type CreateOrganizationRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + createOrganizationPayload *CreateOrganizationPayload +} + +func (r CreateOrganizationRequest) CreateOrganizationPayload(createOrganizationPayload CreateOrganizationPayload) ApiCreateOrganizationRequest { + r.createOrganizationPayload = &createOrganizationPayload + return r +} + +func (r CreateOrganizationRequest) Execute() (*OrganizationCreateResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationCreateResponse + ) + 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.CreateOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createOrganizationPayload == nil { + return localVarReturnValue, fmt.Errorf("createOrganizationPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createOrganizationPayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +CreateOrganization: Create an organization + +Creates an organization without assigning any CF roles or creating a space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateOrganizationRequest +*/ +func (a *APIClient) CreateOrganization(ctx context.Context, projectId string, region string) ApiCreateOrganizationRequest { + return CreateOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +func (a *APIClient) CreateOrganizationExecute(ctx context.Context, projectId string, region string) (*OrganizationCreateResponse, error) { + r := CreateOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } + return r.Execute() +} + +type CreateSpaceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + createSpacePayload *CreateSpacePayload +} + +func (r CreateSpaceRequest) CreateSpacePayload(createSpacePayload CreateSpacePayload) ApiCreateSpaceRequest { + r.createSpacePayload = &createSpacePayload + return r +} + +func (r CreateSpaceRequest) Execute() (*Space, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Space + ) + 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.CreateSpace") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createSpacePayload == nil { + return localVarReturnValue, fmt.Errorf("createSpacePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createSpacePayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +CreateSpace: Create space + +Create space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiCreateSpaceRequest +*/ +func (a *APIClient) CreateSpace(ctx context.Context, projectId string, region string, organizationId string) ApiCreateSpaceRequest { + return CreateSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) CreateSpaceExecute(ctx context.Context, projectId string, region string, organizationId string) (*Space, error) { + r := CreateSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type CreateSpaceRoleRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + spaceId string + createSpaceRolePayload *CreateSpaceRolePayload +} + +func (r CreateSpaceRoleRequest) CreateSpaceRolePayload(createSpaceRolePayload CreateSpaceRolePayload) ApiCreateSpaceRoleRequest { + r.createSpaceRolePayload = &createSpaceRolePayload + return r +} + +func (r CreateSpaceRoleRequest) Execute() (*SpaceRoleCreateResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SpaceRoleCreateResponse + ) + 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.CreateSpaceRole") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createSpaceRolePayload == nil { + return localVarReturnValue, fmt.Errorf("createSpaceRolePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createSpaceRolePayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +CreateSpaceRole: Assign space role + +Assign space role within an space. If the role is already assigned, the existing role GUID gets returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiCreateSpaceRoleRequest +*/ +func (a *APIClient) CreateSpaceRole(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiCreateSpaceRoleRequest { + return CreateSpaceRoleRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } +} + +func (a *APIClient) CreateSpaceRoleExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*SpaceRoleCreateResponse, error) { + r := CreateSpaceRoleRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } + return r.Execute() +} + +type DeleteOrgManagerRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r DeleteOrgManagerRequest) Execute() (*OrgManagerDeleteResponse, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrgManagerDeleteResponse + ) + 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.DeleteOrgManager") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 == 410 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +DeleteOrgManager: Delete organization manager + +Delete the organization manager. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiDeleteOrgManagerRequest +*/ +func (a *APIClient) DeleteOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiDeleteOrgManagerRequest { + return DeleteOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) DeleteOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManagerDeleteResponse, error) { + r := DeleteOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type DeleteOrganizationRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r DeleteOrganizationRequest) Execute() (*OrganizationDeleteResponse, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationDeleteResponse + ) + 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.DeleteOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +DeleteOrganization: Delete organization + +Delete an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiDeleteOrganizationRequest +*/ +func (a *APIClient) DeleteOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiDeleteOrganizationRequest { + return DeleteOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) DeleteOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationDeleteResponse, error) { + r := DeleteOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type DeleteSpaceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + spaceId string +} + +func (r DeleteSpaceRequest) Execute() (*SpaceDeleteResponse, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SpaceDeleteResponse + ) + 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.DeleteSpace") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +DeleteSpace: Delete space + +Delete space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiDeleteSpaceRequest +*/ +func (a *APIClient) DeleteSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiDeleteSpaceRequest { + return DeleteSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } +} + +func (a *APIClient) DeleteSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*SpaceDeleteResponse, error) { + r := DeleteSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } + return r.Execute() +} + +type GetOrgManagerRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r GetOrgManagerRequest) Execute() (*OrgManager, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrgManager + ) + 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.GetOrgManager") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetOrgManager: Get organization manager + +Returns the organization manager within an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrgManagerRequest +*/ +func (a *APIClient) GetOrgManager(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrgManagerRequest { + return GetOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) GetOrgManagerExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrgManager, error) { + r := GetOrgManagerRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type GetOrganizationRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r GetOrganizationRequest) Execute() (*Organization, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + 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.GetOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetOrganization: Get an organization + +Returns an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrganizationRequest +*/ +func (a *APIClient) GetOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrganizationRequest { + return GetOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) GetOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*Organization, error) { + r := GetOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type GetOrganizationQuotaRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + quotaId string +} + +func (r GetOrganizationQuotaRequest) Execute() (*Quota, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Quota + ) + 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.GetOrganizationQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quotas/{quotaId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quotaId"+"}", url.PathEscape(ParameterValueToString(r.quotaId, "quotaId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetOrganizationQuota: Get an organization quota + +Returns an organization quota. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param quotaId + @return ApiGetOrganizationQuotaRequest +*/ +func (a *APIClient) GetOrganizationQuota(ctx context.Context, projectId string, region string, organizationId string, quotaId string) ApiGetOrganizationQuotaRequest { + return GetOrganizationQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + quotaId: quotaId, + } +} + +func (a *APIClient) GetOrganizationQuotaExecute(ctx context.Context, projectId string, region string, organizationId string, quotaId string) (*Quota, error) { + r := GetOrganizationQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + quotaId: quotaId, + } + return r.Execute() +} + +type GetOrganizationUsageSummaryRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r GetOrganizationUsageSummaryRequest) Execute() (*OrganizationUsageSummary, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationUsageSummary + ) + 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.GetOrganizationUsageSummary") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/usage_summary" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetOrganizationUsageSummary: Get an organization usage summary + +Returns an organization usage summary. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiGetOrganizationUsageSummaryRequest +*/ +func (a *APIClient) GetOrganizationUsageSummary(ctx context.Context, projectId string, region string, organizationId string) ApiGetOrganizationUsageSummaryRequest { + return GetOrganizationUsageSummaryRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) GetOrganizationUsageSummaryExecute(ctx context.Context, projectId string, region string, organizationId string) (*OrganizationUsageSummary, error) { + r := GetOrganizationUsageSummaryRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type GetPlatformRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + platformId string +} + +func (r GetPlatformRequest) Execute() (*Platforms, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Platforms + ) + 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.GetPlatform") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(r.platformId, "platformId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetPlatform: Get platform + +Fetch a single platform + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return ApiGetPlatformRequest +*/ +func (a *APIClient) GetPlatform(ctx context.Context, projectId string, region string, platformId string) ApiGetPlatformRequest { + return GetPlatformRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + } +} + +func (a *APIClient) GetPlatformExecute(ctx context.Context, projectId string, region string, platformId string) (*Platforms, error) { + r := GetPlatformRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + } + return r.Execute() +} + +type GetPlatformQuotaRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + platformId string + quotaId string +} + +func (r GetPlatformQuotaRequest) Execute() (*Quota, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Quota + ) + 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.GetPlatformQuota") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}/quotas/{quotaId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(r.platformId, "platformId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quotaId"+"}", url.PathEscape(ParameterValueToString(r.quotaId, "quotaId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetPlatformQuota: Get organization quota on a platform + +Returns an organization quota on a platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @param quotaId + @return ApiGetPlatformQuotaRequest +*/ +func (a *APIClient) GetPlatformQuota(ctx context.Context, projectId string, region string, platformId string, quotaId string) ApiGetPlatformQuotaRequest { + return GetPlatformQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + quotaId: quotaId, + } +} + +func (a *APIClient) GetPlatformQuotaExecute(ctx context.Context, projectId string, region string, platformId string, quotaId string) (*Quota, error) { + r := GetPlatformQuotaRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + quotaId: quotaId, + } + return r.Execute() +} + +type GetSpaceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + spaceId string +} + +func (r GetSpaceRequest) Execute() (*Space, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Space + ) + 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.GetSpace") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +GetSpace: Get a space + +Returns a space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiGetSpaceRequest +*/ +func (a *APIClient) GetSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiGetSpaceRequest { + return GetSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } +} + +func (a *APIClient) GetSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*Space, error) { + r := GetSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } + return r.Execute() +} + +type ListOrganizationQuotasRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string +} + +func (r ListOrganizationQuotasRequest) Execute() ([]Quota, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Quota + ) + 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.ListOrganizationQuotas") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quotas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ListOrganizationQuotas: List organization quotas + +Returns a list of organization quotas. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiListOrganizationQuotasRequest +*/ +func (a *APIClient) ListOrganizationQuotas(ctx context.Context, projectId string, region string, organizationId string) ApiListOrganizationQuotasRequest { + return ListOrganizationQuotasRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) ListOrganizationQuotasExecute(ctx context.Context, projectId string, region string, organizationId string) ([]Quota, error) { + r := ListOrganizationQuotasRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type ListOrganizationsRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + withDetails *bool + orderBy *string + page *int64 + perPage *int64 +} + +// Adds the details to the response that can be queried from the Cloud Controller API + +func (r ListOrganizationsRequest) WithDetails(withDetails bool) ApiListOrganizationsRequest { + r.withDetails = &withDetails + return r +} + +// In case `withDetails` is enabled, the organization list can be sorted by `name`. In order to sort by `name`, you have to set the value `name`. The default sort ordering is ascending. To specify descending order for `name` field, you have to append ` desc` suffix; for example `name desc`. + +func (r ListOrganizationsRequest) OrderBy(orderBy string) ApiListOrganizationsRequest { + r.orderBy = &orderBy + return r +} + +// Which page is returned + +func (r ListOrganizationsRequest) Page(page int64) ApiListOrganizationsRequest { + r.page = &page + return r +} + +// Elements to be returned per page + +func (r ListOrganizationsRequest) PerPage(perPage int64) ApiListOrganizationsRequest { + r.perPage = &perPage + return r +} + +func (r ListOrganizationsRequest) Execute() (*OrganizationsList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrganizationsList + ) + 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.ListOrganizations") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.withDetails != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "withDetails", r.withDetails, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderBy", r.orderBy, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "perPage", r.perPage, "") + } + // 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ListOrganizations: List organizations + +Returns a list of organizations for a specific STACKIT project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListOrganizationsRequest +*/ +func (a *APIClient) ListOrganizations(ctx context.Context, projectId string, region string) ApiListOrganizationsRequest { + return ListOrganizationsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +func (a *APIClient) ListOrganizationsExecute(ctx context.Context, projectId string, region string) (*OrganizationsList, error) { + r := ListOrganizationsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } + return r.Execute() +} + +type ListPlatformQuotasRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + platformId string +} + +func (r ListPlatformQuotasRequest) Execute() ([]Quota, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Quota + ) + 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.ListPlatformQuotas") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}/quotas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(r.platformId, "platformId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ListPlatformQuotas: List organization quotas on a platform + +Returns a list of organization quotas on a platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param platformId + @return ApiListPlatformQuotasRequest +*/ +func (a *APIClient) ListPlatformQuotas(ctx context.Context, projectId string, region string, platformId string) ApiListPlatformQuotasRequest { + return ListPlatformQuotasRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + } +} + +func (a *APIClient) ListPlatformQuotasExecute(ctx context.Context, projectId string, region string, platformId string) ([]Quota, error) { + r := ListPlatformQuotasRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + platformId: platformId, + } + return r.Execute() +} + +type ListPlatformsRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + page *int64 + perPage *int64 +} + +// Which page is returned + +func (r ListPlatformsRequest) Page(page int64) ApiListPlatformsRequest { + r.page = &page + return r +} + +// Elements to be returned per page + +func (r ListPlatformsRequest) PerPage(perPage int64) ApiListPlatformsRequest { + r.perPage = &perPage + return r +} + +func (r ListPlatformsRequest) Execute() (*PlatformList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PlatformList + ) + 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.ListPlatforms") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/platforms" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "perPage", r.perPage, "") + } + // 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ListPlatforms: List all platforms + +List all platforms available for a STACKIT project + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListPlatformsRequest +*/ +func (a *APIClient) ListPlatforms(ctx context.Context, projectId string, region string) ApiListPlatformsRequest { + return ListPlatformsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +func (a *APIClient) ListPlatformsExecute(ctx context.Context, projectId string, region string) (*PlatformList, error) { + r := ListPlatformsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + } + return r.Execute() +} + +type ListSpacesRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + page *int64 + perPage *int64 +} + +// Which page is returned + +func (r ListSpacesRequest) Page(page int64) ApiListSpacesRequest { + r.page = &page + return r +} + +// Elements to be returned per page + +func (r ListSpacesRequest) PerPage(perPage int64) ApiListSpacesRequest { + r.perPage = &perPage + return r +} + +func (r ListSpacesRequest) Execute() (*SpacesList, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SpacesList + ) + 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.ListSpaces") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "perPage", r.perPage, "") + } + // 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +ListSpaces: List spaces + +Returns a list of spaces for a specific organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiListSpacesRequest +*/ +func (a *APIClient) ListSpaces(ctx context.Context, projectId string, region string, organizationId string) ApiListSpacesRequest { + return ListSpacesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) ListSpacesExecute(ctx context.Context, projectId string, region string, organizationId string) (*SpacesList, error) { + r := ListSpacesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type UpdateOrganizationRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + updateOrganizationPayload *UpdateOrganizationPayload +} + +func (r UpdateOrganizationRequest) UpdateOrganizationPayload(updateOrganizationPayload UpdateOrganizationPayload) ApiUpdateOrganizationRequest { + r.updateOrganizationPayload = &updateOrganizationPayload + return r +} + +func (r UpdateOrganizationRequest) Execute() (*Organization, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + 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.UpdateOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateOrganizationPayload == nil { + return localVarReturnValue, fmt.Errorf("updateOrganizationPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateOrganizationPayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +UpdateOrganization: Update organization + +Update organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @return ApiUpdateOrganizationRequest +*/ +func (a *APIClient) UpdateOrganization(ctx context.Context, projectId string, region string, organizationId string) ApiUpdateOrganizationRequest { + return UpdateOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } +} + +func (a *APIClient) UpdateOrganizationExecute(ctx context.Context, projectId string, region string, organizationId string) (*Organization, error) { + r := UpdateOrganizationRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + } + return r.Execute() +} + +type UpdateSpaceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + organizationId string + spaceId string + updateSpacePayload *UpdateSpacePayload +} + +func (r UpdateSpaceRequest) UpdateSpacePayload(updateSpacePayload UpdateSpacePayload) ApiUpdateSpaceRequest { + r.updateSpacePayload = &updateSpacePayload + return r +} + +func (r UpdateSpaceRequest) Execute() (*Space, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Space + ) + 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.UpdateSpace") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateSpacePayload == nil { + return localVarReturnValue, fmt.Errorf("updateSpacePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateSpacePayload + 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 == 400 { + var v ErrorResponse + 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 ErrorResponse + 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 == 403 { + var v ErrorResponse + 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 == 404 { + var v ErrorResponse + 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 ErrorResponse + 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 +} + +/* +UpdateSpace: Update space + +Update space. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param organizationId + @param spaceId + @return ApiUpdateSpaceRequest +*/ +func (a *APIClient) UpdateSpace(ctx context.Context, projectId string, region string, organizationId string, spaceId string) ApiUpdateSpaceRequest { + return UpdateSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } +} + +func (a *APIClient) UpdateSpaceExecute(ctx context.Context, projectId string, region string, organizationId string, spaceId string) (*Space, error) { + r := UpdateSpaceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + organizationId: organizationId, + spaceId: spaceId, + } + return r.Execute() +} diff --git a/services/scf/api_default_test.go b/services/scf/api_default_test.go new file mode 100644 index 000000000..8b53ffb4f --- /dev/null +++ b/services/scf/api_default_test.go @@ -0,0 +1,1377 @@ +/* +STACKIT Cloud Foundry API + +Testing DefaultApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package scf + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "testing" + + "github.com/google/uuid" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +func Test_scf_DefaultApiService(t *testing.T) { + + t.Run("Test DefaultApiService ApplyOrganizationQuota", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quota" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrganizationQuota{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + applyOrganizationQuotaPayload := ApplyOrganizationQuotaPayload{} + + resp, reqErr := apiClient.ApplyOrganizationQuota(context.Background(), projectId, region, organizationId).ApplyOrganizationQuotaPayload(applyOrganizationQuotaPayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService CreateOrgManager", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrgManagerResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.CreateOrgManager(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService CreateOrgRole", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/roles" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrgRoleResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + createOrgRolePayload := CreateOrgRolePayload{} + + resp, reqErr := apiClient.CreateOrgRole(context.Background(), projectId, region, organizationId).CreateOrgRolePayload(createOrgRolePayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService CreateOrganization", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrganizationCreateResponse{} + 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 scf_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 + region := regionValue + createOrganizationPayload := CreateOrganizationPayload{} + + resp, reqErr := apiClient.CreateOrganization(context.Background(), projectId, region).CreateOrganizationPayload(createOrganizationPayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService CreateSpace", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Space{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + createSpacePayload := CreateSpacePayload{} + + resp, reqErr := apiClient.CreateSpace(context.Background(), projectId, region, organizationId).CreateSpacePayload(createSpacePayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService CreateSpaceRole", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}/roles" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + spaceIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(spaceIdValue, "spaceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := SpaceRoleCreateResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + spaceId := spaceIdValue + createSpaceRolePayload := CreateSpaceRolePayload{} + + resp, reqErr := apiClient.CreateSpaceRole(context.Background(), projectId, region, organizationId, spaceId).CreateSpaceRolePayload(createSpaceRolePayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService DeleteOrgManager", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrgManagerDeleteResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.DeleteOrgManager(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService DeleteOrganization", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrganizationDeleteResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.DeleteOrganization(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService DeleteSpace", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + spaceIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(spaceIdValue, "spaceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := SpaceDeleteResponse{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + spaceId := spaceIdValue + + resp, reqErr := apiClient.DeleteSpace(context.Background(), projectId, region, organizationId, spaceId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetOrgManager", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/organization_manager" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrgManager{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.GetOrgManager(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetOrganization", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Organization{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.GetOrganization(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetOrganizationQuota", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quotas/{quotaId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + quotaIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"quotaId"+"}", url.PathEscape(ParameterValueToString(quotaIdValue, "quotaId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Quota{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + quotaId := quotaIdValue + + resp, reqErr := apiClient.GetOrganizationQuota(context.Background(), projectId, region, organizationId, quotaId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetOrganizationUsageSummary", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/usage_summary" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrganizationUsageSummary{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.GetOrganizationUsageSummary(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetPlatform", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + platformIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(platformIdValue, "platformId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Platforms{} + 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 scf_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 + region := regionValue + platformId := platformIdValue + + resp, reqErr := apiClient.GetPlatform(context.Background(), projectId, region, platformId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetPlatformQuota", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}/quotas/{quotaId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + platformIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(platformIdValue, "platformId")), -1) + quotaIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"quotaId"+"}", url.PathEscape(ParameterValueToString(quotaIdValue, "quotaId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Quota{} + 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 scf_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 + region := regionValue + platformId := platformIdValue + quotaId := quotaIdValue + + resp, reqErr := apiClient.GetPlatformQuota(context.Background(), projectId, region, platformId, quotaId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetSpace", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + spaceIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(spaceIdValue, "spaceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Space{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + spaceId := spaceIdValue + + resp, reqErr := apiClient.GetSpace(context.Background(), projectId, region, organizationId, spaceId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListOrganizationQuotas", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/quotas" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := []Quota{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.ListOrganizationQuotas(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListOrganizations", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := OrganizationsList{} + 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 scf_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 + region := regionValue + + resp, reqErr := apiClient.ListOrganizations(context.Background(), projectId, region).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListPlatformQuotas", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/platforms/{platformId}/quotas" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + platformIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"platformId"+"}", url.PathEscape(ParameterValueToString(platformIdValue, "platformId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := []Quota{} + 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 scf_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 + region := regionValue + platformId := platformIdValue + + resp, reqErr := apiClient.ListPlatformQuotas(context.Background(), projectId, region, platformId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListPlatforms", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/platforms" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := PlatformList{} + 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 scf_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 + region := regionValue + + resp, reqErr := apiClient.ListPlatforms(context.Background(), projectId, region).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListSpaces", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := SpacesList{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + + resp, reqErr := apiClient.ListSpaces(context.Background(), projectId, region, organizationId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService UpdateOrganization", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Organization{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + updateOrganizationPayload := UpdateOrganizationPayload{} + + resp, reqErr := apiClient.UpdateOrganization(context.Background(), projectId, region, organizationId).UpdateOrganizationPayload(updateOrganizationPayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService UpdateSpace", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/regions/{region}/organizations/{organizationId}/spaces/{spaceId}" + projectIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + organizationIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(organizationIdValue, "organizationId")), -1) + spaceIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"spaceId"+"}", url.PathEscape(ParameterValueToString(spaceIdValue, "spaceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := Space{} + 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 scf_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 + region := regionValue + organizationId := organizationIdValue + spaceId := spaceIdValue + updateSpacePayload := UpdateSpacePayload{} + + resp, reqErr := apiClient.UpdateSpace(context.Background(), projectId, region, organizationId, spaceId).UpdateSpacePayload(updateSpacePayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + +} diff --git a/services/scf/client.go b/services/scf/client.go new file mode 100644 index 000000000..11b0ad4ad --- /dev/null +++ b/services/scf/client.go @@ -0,0 +1,631 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Cloud Foundry API API v1.0.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + defaultApi *DefaultApiService +} + +type service struct { + client DefaultApi +} + +// NewAPIClient creates a new API client. +// Optionally receives configuration options +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + c.defaultApi = (*DefaultApiService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func ParameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if !IsNil(postBody) { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return fmt.Errorf("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} diff --git a/services/scf/configuration.go b/services/scf/configuration.go new file mode 100644 index 000000000..8f9ed0723 --- /dev/null +++ b/services/scf/configuration.go @@ -0,0 +1,38 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/scf", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://scf.api.stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "global", + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/scf/go.mod b/services/scf/go.mod new file mode 100644 index 000000000..06f155aa3 --- /dev/null +++ b/services/scf/go.mod @@ -0,0 +1,10 @@ +module github.com/stackitcloud/stackit-sdk-go/services/scf + +go 1.21 + +require ( + github.com/google/uuid v1.6.0 + github.com/stackitcloud/stackit-sdk-go/core v0.17.3 +) + +require github.com/golang-jwt/jwt/v5 v5.2.3 // indirect diff --git a/services/scf/go.sum b/services/scf/go.sum new file mode 100644 index 000000000..e9c36ffb7 --- /dev/null +++ b/services/scf/go.sum @@ -0,0 +1,8 @@ +github.com/golang-jwt/jwt/v5 v5.2.3 h1:kkGXqQOBSDDWRhWNXTFpqGSCMyh/PLnqUvMGJPDJDs0= +github.com/golang-jwt/jwt/v5 v5.2.3/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/stackitcloud/stackit-sdk-go/core v0.17.3 h1:GsZGmRRc/3GJLmCUnsZswirr5wfLRrwavbnL/renOqg= +github.com/stackitcloud/stackit-sdk-go/core v0.17.3/go.mod h1:HBCXJGPgdRulplDzhrmwC+Dak9B/x0nzNtmOpu+1Ahg= diff --git a/services/scf/model_apply_organization_quota_payload.go b/services/scf/model_apply_organization_quota_payload.go new file mode 100644 index 000000000..7967601da --- /dev/null +++ b/services/scf/model_apply_organization_quota_payload.go @@ -0,0 +1,126 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the ApplyOrganizationQuotaPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplyOrganizationQuotaPayload{} + +/* + types and functions for quotaId +*/ + +// isNotNullableString +type ApplyOrganizationQuotaPayloadGetQuotaIdAttributeType = *string + +func getApplyOrganizationQuotaPayloadGetQuotaIdAttributeTypeOk(arg ApplyOrganizationQuotaPayloadGetQuotaIdAttributeType) (ret ApplyOrganizationQuotaPayloadGetQuotaIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setApplyOrganizationQuotaPayloadGetQuotaIdAttributeType(arg *ApplyOrganizationQuotaPayloadGetQuotaIdAttributeType, val ApplyOrganizationQuotaPayloadGetQuotaIdRetType) { + *arg = &val +} + +type ApplyOrganizationQuotaPayloadGetQuotaIdArgType = string +type ApplyOrganizationQuotaPayloadGetQuotaIdRetType = string + +// ApplyOrganizationQuotaPayload struct for ApplyOrganizationQuotaPayload +type ApplyOrganizationQuotaPayload struct { + // REQUIRED + QuotaId ApplyOrganizationQuotaPayloadGetQuotaIdAttributeType `json:"quotaId" required:"true"` +} + +type _ApplyOrganizationQuotaPayload ApplyOrganizationQuotaPayload + +// NewApplyOrganizationQuotaPayload instantiates a new ApplyOrganizationQuotaPayload 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 NewApplyOrganizationQuotaPayload(quotaId ApplyOrganizationQuotaPayloadGetQuotaIdArgType) *ApplyOrganizationQuotaPayload { + this := ApplyOrganizationQuotaPayload{} + setApplyOrganizationQuotaPayloadGetQuotaIdAttributeType(&this.QuotaId, quotaId) + return &this +} + +// NewApplyOrganizationQuotaPayloadWithDefaults instantiates a new ApplyOrganizationQuotaPayload 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 NewApplyOrganizationQuotaPayloadWithDefaults() *ApplyOrganizationQuotaPayload { + this := ApplyOrganizationQuotaPayload{} + return &this +} + +// GetQuotaId returns the QuotaId field value +func (o *ApplyOrganizationQuotaPayload) GetQuotaId() (ret ApplyOrganizationQuotaPayloadGetQuotaIdRetType) { + ret, _ = o.GetQuotaIdOk() + return ret +} + +// GetQuotaIdOk returns a tuple with the QuotaId field value +// and a boolean to check if the value has been set. +func (o *ApplyOrganizationQuotaPayload) GetQuotaIdOk() (ret ApplyOrganizationQuotaPayloadGetQuotaIdRetType, ok bool) { + return getApplyOrganizationQuotaPayloadGetQuotaIdAttributeTypeOk(o.QuotaId) +} + +// SetQuotaId sets field value +func (o *ApplyOrganizationQuotaPayload) SetQuotaId(v ApplyOrganizationQuotaPayloadGetQuotaIdRetType) { + setApplyOrganizationQuotaPayloadGetQuotaIdAttributeType(&o.QuotaId, v) +} + +func (o ApplyOrganizationQuotaPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getApplyOrganizationQuotaPayloadGetQuotaIdAttributeTypeOk(o.QuotaId); ok { + toSerialize["QuotaId"] = val + } + return toSerialize, nil +} + +type NullableApplyOrganizationQuotaPayload struct { + value *ApplyOrganizationQuotaPayload + isSet bool +} + +func (v NullableApplyOrganizationQuotaPayload) Get() *ApplyOrganizationQuotaPayload { + return v.value +} + +func (v *NullableApplyOrganizationQuotaPayload) Set(val *ApplyOrganizationQuotaPayload) { + v.value = val + v.isSet = true +} + +func (v NullableApplyOrganizationQuotaPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableApplyOrganizationQuotaPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplyOrganizationQuotaPayload(val *ApplyOrganizationQuotaPayload) *NullableApplyOrganizationQuotaPayload { + return &NullableApplyOrganizationQuotaPayload{value: val, isSet: true} +} + +func (v NullableApplyOrganizationQuotaPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplyOrganizationQuotaPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_apply_organization_quota_payload_test.go b/services/scf/model_apply_organization_quota_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_apply_organization_quota_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_create_org_role_payload.go b/services/scf/model_create_org_role_payload.go new file mode 100644 index 000000000..e27b51472 --- /dev/null +++ b/services/scf/model_create_org_role_payload.go @@ -0,0 +1,221 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the CreateOrgRolePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrgRolePayload{} + +/* + types and functions for type +*/ + +// isEnumRef +type CreateOrgRolePayloadGetTypeAttributeType = *OrgRoleType +type CreateOrgRolePayloadGetTypeArgType = OrgRoleType +type CreateOrgRolePayloadGetTypeRetType = OrgRoleType + +func getCreateOrgRolePayloadGetTypeAttributeTypeOk(arg CreateOrgRolePayloadGetTypeAttributeType) (ret CreateOrgRolePayloadGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateOrgRolePayloadGetTypeAttributeType(arg *CreateOrgRolePayloadGetTypeAttributeType, val CreateOrgRolePayloadGetTypeRetType) { + *arg = &val +} + +/* + types and functions for userGuid +*/ + +// isNotNullableString +type CreateOrgRolePayloadGetUserGuidAttributeType = *string + +func getCreateOrgRolePayloadGetUserGuidAttributeTypeOk(arg CreateOrgRolePayloadGetUserGuidAttributeType) (ret CreateOrgRolePayloadGetUserGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateOrgRolePayloadGetUserGuidAttributeType(arg *CreateOrgRolePayloadGetUserGuidAttributeType, val CreateOrgRolePayloadGetUserGuidRetType) { + *arg = &val +} + +type CreateOrgRolePayloadGetUserGuidArgType = string +type CreateOrgRolePayloadGetUserGuidRetType = string + +/* + types and functions for userName +*/ + +// isNotNullableString +type CreateOrgRolePayloadGetUserNameAttributeType = *string + +func getCreateOrgRolePayloadGetUserNameAttributeTypeOk(arg CreateOrgRolePayloadGetUserNameAttributeType) (ret CreateOrgRolePayloadGetUserNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateOrgRolePayloadGetUserNameAttributeType(arg *CreateOrgRolePayloadGetUserNameAttributeType, val CreateOrgRolePayloadGetUserNameRetType) { + *arg = &val +} + +type CreateOrgRolePayloadGetUserNameArgType = string +type CreateOrgRolePayloadGetUserNameRetType = string + +// CreateOrgRolePayload struct for CreateOrgRolePayload +type CreateOrgRolePayload struct { + // REQUIRED + Type CreateOrgRolePayloadGetTypeAttributeType `json:"type" required:"true"` + UserGuid CreateOrgRolePayloadGetUserGuidAttributeType `json:"userGuid,omitempty"` + UserName CreateOrgRolePayloadGetUserNameAttributeType `json:"userName,omitempty"` +} + +type _CreateOrgRolePayload CreateOrgRolePayload + +// NewCreateOrgRolePayload instantiates a new CreateOrgRolePayload 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 NewCreateOrgRolePayload(types CreateOrgRolePayloadGetTypeArgType) *CreateOrgRolePayload { + this := CreateOrgRolePayload{} + setCreateOrgRolePayloadGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewCreateOrgRolePayloadWithDefaults instantiates a new CreateOrgRolePayload 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 NewCreateOrgRolePayloadWithDefaults() *CreateOrgRolePayload { + this := CreateOrgRolePayload{} + return &this +} + +// GetType returns the Type field value +func (o *CreateOrgRolePayload) GetType() (ret CreateOrgRolePayloadGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateOrgRolePayload) GetTypeOk() (ret CreateOrgRolePayloadGetTypeRetType, ok bool) { + return getCreateOrgRolePayloadGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *CreateOrgRolePayload) SetType(v CreateOrgRolePayloadGetTypeRetType) { + setCreateOrgRolePayloadGetTypeAttributeType(&o.Type, v) +} + +// GetUserGuid returns the UserGuid field value if set, zero value otherwise. +func (o *CreateOrgRolePayload) GetUserGuid() (res CreateOrgRolePayloadGetUserGuidRetType) { + res, _ = o.GetUserGuidOk() + return +} + +// GetUserGuidOk returns a tuple with the UserGuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrgRolePayload) GetUserGuidOk() (ret CreateOrgRolePayloadGetUserGuidRetType, ok bool) { + return getCreateOrgRolePayloadGetUserGuidAttributeTypeOk(o.UserGuid) +} + +// HasUserGuid returns a boolean if a field has been set. +func (o *CreateOrgRolePayload) HasUserGuid() bool { + _, ok := o.GetUserGuidOk() + return ok +} + +// SetUserGuid gets a reference to the given string and assigns it to the UserGuid field. +func (o *CreateOrgRolePayload) SetUserGuid(v CreateOrgRolePayloadGetUserGuidRetType) { + setCreateOrgRolePayloadGetUserGuidAttributeType(&o.UserGuid, v) +} + +// GetUserName returns the UserName field value if set, zero value otherwise. +func (o *CreateOrgRolePayload) GetUserName() (res CreateOrgRolePayloadGetUserNameRetType) { + res, _ = o.GetUserNameOk() + return +} + +// GetUserNameOk returns a tuple with the UserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrgRolePayload) GetUserNameOk() (ret CreateOrgRolePayloadGetUserNameRetType, ok bool) { + return getCreateOrgRolePayloadGetUserNameAttributeTypeOk(o.UserName) +} + +// HasUserName returns a boolean if a field has been set. +func (o *CreateOrgRolePayload) HasUserName() bool { + _, ok := o.GetUserNameOk() + return ok +} + +// SetUserName gets a reference to the given string and assigns it to the UserName field. +func (o *CreateOrgRolePayload) SetUserName(v CreateOrgRolePayloadGetUserNameRetType) { + setCreateOrgRolePayloadGetUserNameAttributeType(&o.UserName, v) +} + +func (o CreateOrgRolePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCreateOrgRolePayloadGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getCreateOrgRolePayloadGetUserGuidAttributeTypeOk(o.UserGuid); ok { + toSerialize["UserGuid"] = val + } + if val, ok := getCreateOrgRolePayloadGetUserNameAttributeTypeOk(o.UserName); ok { + toSerialize["UserName"] = val + } + return toSerialize, nil +} + +type NullableCreateOrgRolePayload struct { + value *CreateOrgRolePayload + isSet bool +} + +func (v NullableCreateOrgRolePayload) Get() *CreateOrgRolePayload { + return v.value +} + +func (v *NullableCreateOrgRolePayload) Set(val *CreateOrgRolePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrgRolePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrgRolePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrgRolePayload(val *CreateOrgRolePayload) *NullableCreateOrgRolePayload { + return &NullableCreateOrgRolePayload{value: val, isSet: true} +} + +func (v NullableCreateOrgRolePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrgRolePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_create_org_role_payload_test.go b/services/scf/model_create_org_role_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_create_org_role_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_create_organization_payload.go b/services/scf/model_create_organization_payload.go new file mode 100644 index 000000000..5094b4cc1 --- /dev/null +++ b/services/scf/model_create_organization_payload.go @@ -0,0 +1,174 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the CreateOrganizationPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrganizationPayload{} + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateOrganizationPayloadGetNameAttributeType = *string + +func getCreateOrganizationPayloadGetNameAttributeTypeOk(arg CreateOrganizationPayloadGetNameAttributeType) (ret CreateOrganizationPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateOrganizationPayloadGetNameAttributeType(arg *CreateOrganizationPayloadGetNameAttributeType, val CreateOrganizationPayloadGetNameRetType) { + *arg = &val +} + +type CreateOrganizationPayloadGetNameArgType = string +type CreateOrganizationPayloadGetNameRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type CreateOrganizationPayloadGetPlatformIdAttributeType = *string + +func getCreateOrganizationPayloadGetPlatformIdAttributeTypeOk(arg CreateOrganizationPayloadGetPlatformIdAttributeType) (ret CreateOrganizationPayloadGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateOrganizationPayloadGetPlatformIdAttributeType(arg *CreateOrganizationPayloadGetPlatformIdAttributeType, val CreateOrganizationPayloadGetPlatformIdRetType) { + *arg = &val +} + +type CreateOrganizationPayloadGetPlatformIdArgType = string +type CreateOrganizationPayloadGetPlatformIdRetType = string + +// CreateOrganizationPayload struct for CreateOrganizationPayload +type CreateOrganizationPayload struct { + // REQUIRED + Name CreateOrganizationPayloadGetNameAttributeType `json:"name" required:"true"` + PlatformId CreateOrganizationPayloadGetPlatformIdAttributeType `json:"platformId,omitempty"` +} + +type _CreateOrganizationPayload CreateOrganizationPayload + +// NewCreateOrganizationPayload instantiates a new CreateOrganizationPayload 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 NewCreateOrganizationPayload(name CreateOrganizationPayloadGetNameArgType) *CreateOrganizationPayload { + this := CreateOrganizationPayload{} + setCreateOrganizationPayloadGetNameAttributeType(&this.Name, name) + return &this +} + +// NewCreateOrganizationPayloadWithDefaults instantiates a new CreateOrganizationPayload 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 NewCreateOrganizationPayloadWithDefaults() *CreateOrganizationPayload { + this := CreateOrganizationPayload{} + return &this +} + +// GetName returns the Name field value +func (o *CreateOrganizationPayload) GetName() (ret CreateOrganizationPayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateOrganizationPayload) GetNameOk() (ret CreateOrganizationPayloadGetNameRetType, ok bool) { + return getCreateOrganizationPayloadGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *CreateOrganizationPayload) SetName(v CreateOrganizationPayloadGetNameRetType) { + setCreateOrganizationPayloadGetNameAttributeType(&o.Name, v) +} + +// GetPlatformId returns the PlatformId field value if set, zero value otherwise. +func (o *CreateOrganizationPayload) GetPlatformId() (res CreateOrganizationPayloadGetPlatformIdRetType) { + res, _ = o.GetPlatformIdOk() + return +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateOrganizationPayload) GetPlatformIdOk() (ret CreateOrganizationPayloadGetPlatformIdRetType, ok bool) { + return getCreateOrganizationPayloadGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// HasPlatformId returns a boolean if a field has been set. +func (o *CreateOrganizationPayload) HasPlatformId() bool { + _, ok := o.GetPlatformIdOk() + return ok +} + +// SetPlatformId gets a reference to the given string and assigns it to the PlatformId field. +func (o *CreateOrganizationPayload) SetPlatformId(v CreateOrganizationPayloadGetPlatformIdRetType) { + setCreateOrganizationPayloadGetPlatformIdAttributeType(&o.PlatformId, v) +} + +func (o CreateOrganizationPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCreateOrganizationPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCreateOrganizationPayloadGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + return toSerialize, nil +} + +type NullableCreateOrganizationPayload struct { + value *CreateOrganizationPayload + isSet bool +} + +func (v NullableCreateOrganizationPayload) Get() *CreateOrganizationPayload { + return v.value +} + +func (v *NullableCreateOrganizationPayload) Set(val *CreateOrganizationPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrganizationPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrganizationPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrganizationPayload(val *CreateOrganizationPayload) *NullableCreateOrganizationPayload { + return &NullableCreateOrganizationPayload{value: val, isSet: true} +} + +func (v NullableCreateOrganizationPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrganizationPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_create_organization_payload_test.go b/services/scf/model_create_organization_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_create_organization_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_create_space_payload.go b/services/scf/model_create_space_payload.go new file mode 100644 index 000000000..ace0c6d4a --- /dev/null +++ b/services/scf/model_create_space_payload.go @@ -0,0 +1,127 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the CreateSpacePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSpacePayload{} + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateSpacePayloadGetNameAttributeType = *string + +func getCreateSpacePayloadGetNameAttributeTypeOk(arg CreateSpacePayloadGetNameAttributeType) (ret CreateSpacePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateSpacePayloadGetNameAttributeType(arg *CreateSpacePayloadGetNameAttributeType, val CreateSpacePayloadGetNameRetType) { + *arg = &val +} + +type CreateSpacePayloadGetNameArgType = string +type CreateSpacePayloadGetNameRetType = string + +// CreateSpacePayload struct for CreateSpacePayload +type CreateSpacePayload struct { + // Name of the space + // REQUIRED + Name CreateSpacePayloadGetNameAttributeType `json:"name" required:"true"` +} + +type _CreateSpacePayload CreateSpacePayload + +// NewCreateSpacePayload instantiates a new CreateSpacePayload 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 NewCreateSpacePayload(name CreateSpacePayloadGetNameArgType) *CreateSpacePayload { + this := CreateSpacePayload{} + setCreateSpacePayloadGetNameAttributeType(&this.Name, name) + return &this +} + +// NewCreateSpacePayloadWithDefaults instantiates a new CreateSpacePayload 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 NewCreateSpacePayloadWithDefaults() *CreateSpacePayload { + this := CreateSpacePayload{} + return &this +} + +// GetName returns the Name field value +func (o *CreateSpacePayload) GetName() (ret CreateSpacePayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateSpacePayload) GetNameOk() (ret CreateSpacePayloadGetNameRetType, ok bool) { + return getCreateSpacePayloadGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *CreateSpacePayload) SetName(v CreateSpacePayloadGetNameRetType) { + setCreateSpacePayloadGetNameAttributeType(&o.Name, v) +} + +func (o CreateSpacePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCreateSpacePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + return toSerialize, nil +} + +type NullableCreateSpacePayload struct { + value *CreateSpacePayload + isSet bool +} + +func (v NullableCreateSpacePayload) Get() *CreateSpacePayload { + return v.value +} + +func (v *NullableCreateSpacePayload) Set(val *CreateSpacePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSpacePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSpacePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSpacePayload(val *CreateSpacePayload) *NullableCreateSpacePayload { + return &NullableCreateSpacePayload{value: val, isSet: true} +} + +func (v NullableCreateSpacePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSpacePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_create_space_payload_test.go b/services/scf/model_create_space_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_create_space_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_create_space_role_payload.go b/services/scf/model_create_space_role_payload.go new file mode 100644 index 000000000..e808113aa --- /dev/null +++ b/services/scf/model_create_space_role_payload.go @@ -0,0 +1,221 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the CreateSpaceRolePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSpaceRolePayload{} + +/* + types and functions for type +*/ + +// isEnumRef +type CreateSpaceRolePayloadGetTypeAttributeType = *SpaceRoleType +type CreateSpaceRolePayloadGetTypeArgType = SpaceRoleType +type CreateSpaceRolePayloadGetTypeRetType = SpaceRoleType + +func getCreateSpaceRolePayloadGetTypeAttributeTypeOk(arg CreateSpaceRolePayloadGetTypeAttributeType) (ret CreateSpaceRolePayloadGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateSpaceRolePayloadGetTypeAttributeType(arg *CreateSpaceRolePayloadGetTypeAttributeType, val CreateSpaceRolePayloadGetTypeRetType) { + *arg = &val +} + +/* + types and functions for userGuid +*/ + +// isNotNullableString +type CreateSpaceRolePayloadGetUserGuidAttributeType = *string + +func getCreateSpaceRolePayloadGetUserGuidAttributeTypeOk(arg CreateSpaceRolePayloadGetUserGuidAttributeType) (ret CreateSpaceRolePayloadGetUserGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateSpaceRolePayloadGetUserGuidAttributeType(arg *CreateSpaceRolePayloadGetUserGuidAttributeType, val CreateSpaceRolePayloadGetUserGuidRetType) { + *arg = &val +} + +type CreateSpaceRolePayloadGetUserGuidArgType = string +type CreateSpaceRolePayloadGetUserGuidRetType = string + +/* + types and functions for userName +*/ + +// isNotNullableString +type CreateSpaceRolePayloadGetUserNameAttributeType = *string + +func getCreateSpaceRolePayloadGetUserNameAttributeTypeOk(arg CreateSpaceRolePayloadGetUserNameAttributeType) (ret CreateSpaceRolePayloadGetUserNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateSpaceRolePayloadGetUserNameAttributeType(arg *CreateSpaceRolePayloadGetUserNameAttributeType, val CreateSpaceRolePayloadGetUserNameRetType) { + *arg = &val +} + +type CreateSpaceRolePayloadGetUserNameArgType = string +type CreateSpaceRolePayloadGetUserNameRetType = string + +// CreateSpaceRolePayload struct for CreateSpaceRolePayload +type CreateSpaceRolePayload struct { + // REQUIRED + Type CreateSpaceRolePayloadGetTypeAttributeType `json:"type" required:"true"` + UserGuid CreateSpaceRolePayloadGetUserGuidAttributeType `json:"userGuid,omitempty"` + UserName CreateSpaceRolePayloadGetUserNameAttributeType `json:"userName,omitempty"` +} + +type _CreateSpaceRolePayload CreateSpaceRolePayload + +// NewCreateSpaceRolePayload instantiates a new CreateSpaceRolePayload 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 NewCreateSpaceRolePayload(types CreateSpaceRolePayloadGetTypeArgType) *CreateSpaceRolePayload { + this := CreateSpaceRolePayload{} + setCreateSpaceRolePayloadGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewCreateSpaceRolePayloadWithDefaults instantiates a new CreateSpaceRolePayload 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 NewCreateSpaceRolePayloadWithDefaults() *CreateSpaceRolePayload { + this := CreateSpaceRolePayload{} + return &this +} + +// GetType returns the Type field value +func (o *CreateSpaceRolePayload) GetType() (ret CreateSpaceRolePayloadGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateSpaceRolePayload) GetTypeOk() (ret CreateSpaceRolePayloadGetTypeRetType, ok bool) { + return getCreateSpaceRolePayloadGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *CreateSpaceRolePayload) SetType(v CreateSpaceRolePayloadGetTypeRetType) { + setCreateSpaceRolePayloadGetTypeAttributeType(&o.Type, v) +} + +// GetUserGuid returns the UserGuid field value if set, zero value otherwise. +func (o *CreateSpaceRolePayload) GetUserGuid() (res CreateSpaceRolePayloadGetUserGuidRetType) { + res, _ = o.GetUserGuidOk() + return +} + +// GetUserGuidOk returns a tuple with the UserGuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSpaceRolePayload) GetUserGuidOk() (ret CreateSpaceRolePayloadGetUserGuidRetType, ok bool) { + return getCreateSpaceRolePayloadGetUserGuidAttributeTypeOk(o.UserGuid) +} + +// HasUserGuid returns a boolean if a field has been set. +func (o *CreateSpaceRolePayload) HasUserGuid() bool { + _, ok := o.GetUserGuidOk() + return ok +} + +// SetUserGuid gets a reference to the given string and assigns it to the UserGuid field. +func (o *CreateSpaceRolePayload) SetUserGuid(v CreateSpaceRolePayloadGetUserGuidRetType) { + setCreateSpaceRolePayloadGetUserGuidAttributeType(&o.UserGuid, v) +} + +// GetUserName returns the UserName field value if set, zero value otherwise. +func (o *CreateSpaceRolePayload) GetUserName() (res CreateSpaceRolePayloadGetUserNameRetType) { + res, _ = o.GetUserNameOk() + return +} + +// GetUserNameOk returns a tuple with the UserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSpaceRolePayload) GetUserNameOk() (ret CreateSpaceRolePayloadGetUserNameRetType, ok bool) { + return getCreateSpaceRolePayloadGetUserNameAttributeTypeOk(o.UserName) +} + +// HasUserName returns a boolean if a field has been set. +func (o *CreateSpaceRolePayload) HasUserName() bool { + _, ok := o.GetUserNameOk() + return ok +} + +// SetUserName gets a reference to the given string and assigns it to the UserName field. +func (o *CreateSpaceRolePayload) SetUserName(v CreateSpaceRolePayloadGetUserNameRetType) { + setCreateSpaceRolePayloadGetUserNameAttributeType(&o.UserName, v) +} + +func (o CreateSpaceRolePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCreateSpaceRolePayloadGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getCreateSpaceRolePayloadGetUserGuidAttributeTypeOk(o.UserGuid); ok { + toSerialize["UserGuid"] = val + } + if val, ok := getCreateSpaceRolePayloadGetUserNameAttributeTypeOk(o.UserName); ok { + toSerialize["UserName"] = val + } + return toSerialize, nil +} + +type NullableCreateSpaceRolePayload struct { + value *CreateSpaceRolePayload + isSet bool +} + +func (v NullableCreateSpaceRolePayload) Get() *CreateSpaceRolePayload { + return v.value +} + +func (v *NullableCreateSpaceRolePayload) Set(val *CreateSpaceRolePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSpaceRolePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSpaceRolePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSpaceRolePayload(val *CreateSpaceRolePayload) *NullableCreateSpaceRolePayload { + return &NullableCreateSpaceRolePayload{value: val, isSet: true} +} + +func (v NullableCreateSpaceRolePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSpaceRolePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_create_space_role_payload_test.go b/services/scf/model_create_space_role_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_create_space_role_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_error_response.go b/services/scf/model_error_response.go new file mode 100644 index 000000000..f07628527 --- /dev/null +++ b/services/scf/model_error_response.go @@ -0,0 +1,170 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + +/* + types and functions for code +*/ + +// isNotNullableString +type ErrorResponseGetCodeAttributeType = *string + +func getErrorResponseGetCodeAttributeTypeOk(arg ErrorResponseGetCodeAttributeType) (ret ErrorResponseGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetCodeAttributeType(arg *ErrorResponseGetCodeAttributeType, val ErrorResponseGetCodeRetType) { + *arg = &val +} + +type ErrorResponseGetCodeArgType = string +type ErrorResponseGetCodeRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type ErrorResponseGetMessageAttributeType = *string + +func getErrorResponseGetMessageAttributeTypeOk(arg ErrorResponseGetMessageAttributeType) (ret ErrorResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorResponseGetMessageAttributeType(arg *ErrorResponseGetMessageAttributeType, val ErrorResponseGetMessageRetType) { + *arg = &val +} + +type ErrorResponseGetMessageArgType = string +type ErrorResponseGetMessageRetType = string + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + // REQUIRED + Code ErrorResponseGetCodeAttributeType `json:"code" required:"true"` + // REQUIRED + Message ErrorResponseGetMessageAttributeType `json:"message" required:"true"` +} + +type _ErrorResponse ErrorResponse + +// NewErrorResponse instantiates a new ErrorResponse 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 NewErrorResponse(code ErrorResponseGetCodeArgType, message ErrorResponseGetMessageArgType) *ErrorResponse { + this := ErrorResponse{} + setErrorResponseGetCodeAttributeType(&this.Code, code) + setErrorResponseGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse 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 NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + return &this +} + +// GetCode returns the Code field value +func (o *ErrorResponse) GetCode() (ret ErrorResponseGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetCodeOk() (ret ErrorResponseGetCodeRetType, ok bool) { + return getErrorResponseGetCodeAttributeTypeOk(o.Code) +} + +// SetCode sets field value +func (o *ErrorResponse) SetCode(v ErrorResponseGetCodeRetType) { + setErrorResponseGetCodeAttributeType(&o.Code, v) +} + +// GetMessage returns the Message field value +func (o *ErrorResponse) GetMessage() (ret ErrorResponseGetMessageRetType) { + 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 *ErrorResponse) GetMessageOk() (ret ErrorResponseGetMessageRetType, ok bool) { + return getErrorResponseGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *ErrorResponse) SetMessage(v ErrorResponseGetMessageRetType) { + setErrorResponseGetMessageAttributeType(&o.Message, v) +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getErrorResponseGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getErrorResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_error_response_test.go b/services/scf/model_error_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_error_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_manager.go b/services/scf/model_org_manager.go new file mode 100644 index 000000000..2dfe44a03 --- /dev/null +++ b/services/scf/model_org_manager.go @@ -0,0 +1,389 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the OrgManager type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgManager{} + +/* + types and functions for createdAt +*/ + +// isDateTime +type OrgManagerGetCreatedAtAttributeType = *time.Time +type OrgManagerGetCreatedAtArgType = time.Time +type OrgManagerGetCreatedAtRetType = time.Time + +func getOrgManagerGetCreatedAtAttributeTypeOk(arg OrgManagerGetCreatedAtAttributeType) (ret OrgManagerGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetCreatedAtAttributeType(arg *OrgManagerGetCreatedAtAttributeType, val OrgManagerGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrgManagerGetGuidAttributeType = *string + +func getOrgManagerGetGuidAttributeTypeOk(arg OrgManagerGetGuidAttributeType) (ret OrgManagerGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetGuidAttributeType(arg *OrgManagerGetGuidAttributeType, val OrgManagerGetGuidRetType) { + *arg = &val +} + +type OrgManagerGetGuidArgType = string +type OrgManagerGetGuidRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrgManagerGetPlatformIdAttributeType = *string + +func getOrgManagerGetPlatformIdAttributeTypeOk(arg OrgManagerGetPlatformIdAttributeType) (ret OrgManagerGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetPlatformIdAttributeType(arg *OrgManagerGetPlatformIdAttributeType, val OrgManagerGetPlatformIdRetType) { + *arg = &val +} + +type OrgManagerGetPlatformIdArgType = string +type OrgManagerGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrgManagerGetProjectIdAttributeType = *string + +func getOrgManagerGetProjectIdAttributeTypeOk(arg OrgManagerGetProjectIdAttributeType) (ret OrgManagerGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetProjectIdAttributeType(arg *OrgManagerGetProjectIdAttributeType, val OrgManagerGetProjectIdRetType) { + *arg = &val +} + +type OrgManagerGetProjectIdArgType = string +type OrgManagerGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrgManagerGetRegionAttributeType = *string + +func getOrgManagerGetRegionAttributeTypeOk(arg OrgManagerGetRegionAttributeType) (ret OrgManagerGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetRegionAttributeType(arg *OrgManagerGetRegionAttributeType, val OrgManagerGetRegionRetType) { + *arg = &val +} + +type OrgManagerGetRegionArgType = string +type OrgManagerGetRegionRetType = string + +/* + types and functions for updatedAt +*/ + +// isDateTime +type OrgManagerGetUpdatedAtAttributeType = *time.Time +type OrgManagerGetUpdatedAtArgType = time.Time +type OrgManagerGetUpdatedAtRetType = time.Time + +func getOrgManagerGetUpdatedAtAttributeTypeOk(arg OrgManagerGetUpdatedAtAttributeType) (ret OrgManagerGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetUpdatedAtAttributeType(arg *OrgManagerGetUpdatedAtAttributeType, val OrgManagerGetUpdatedAtRetType) { + *arg = &val +} + +/* + types and functions for username +*/ + +// isNotNullableString +type OrgManagerGetUsernameAttributeType = *string + +func getOrgManagerGetUsernameAttributeTypeOk(arg OrgManagerGetUsernameAttributeType) (ret OrgManagerGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerGetUsernameAttributeType(arg *OrgManagerGetUsernameAttributeType, val OrgManagerGetUsernameRetType) { + *arg = &val +} + +type OrgManagerGetUsernameArgType = string +type OrgManagerGetUsernameRetType = string + +// OrgManager struct for OrgManager +type OrgManager struct { + // REQUIRED + CreatedAt OrgManagerGetCreatedAtAttributeType `json:"createdAt" required:"true"` + // REQUIRED + Guid OrgManagerGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + PlatformId OrgManagerGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrgManagerGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrgManagerGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + UpdatedAt OrgManagerGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` + // REQUIRED + Username OrgManagerGetUsernameAttributeType `json:"username" required:"true"` +} + +type _OrgManager OrgManager + +// NewOrgManager instantiates a new OrgManager 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 NewOrgManager(createdAt OrgManagerGetCreatedAtArgType, guid OrgManagerGetGuidArgType, platformId OrgManagerGetPlatformIdArgType, projectId OrgManagerGetProjectIdArgType, region OrgManagerGetRegionArgType, updatedAt OrgManagerGetUpdatedAtArgType, username OrgManagerGetUsernameArgType) *OrgManager { + this := OrgManager{} + setOrgManagerGetCreatedAtAttributeType(&this.CreatedAt, createdAt) + setOrgManagerGetGuidAttributeType(&this.Guid, guid) + setOrgManagerGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrgManagerGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrgManagerGetRegionAttributeType(&this.Region, region) + setOrgManagerGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) + setOrgManagerGetUsernameAttributeType(&this.Username, username) + return &this +} + +// NewOrgManagerWithDefaults instantiates a new OrgManager 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 NewOrgManagerWithDefaults() *OrgManager { + this := OrgManager{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *OrgManager) GetCreatedAt() (ret OrgManagerGetCreatedAtRetType) { + ret, _ = o.GetCreatedAtOk() + return ret +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetCreatedAtOk() (ret OrgManagerGetCreatedAtRetType, ok bool) { + return getOrgManagerGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// SetCreatedAt sets field value +func (o *OrgManager) SetCreatedAt(v OrgManagerGetCreatedAtRetType) { + setOrgManagerGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetGuid returns the Guid field value +func (o *OrgManager) GetGuid() (ret OrgManagerGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetGuidOk() (ret OrgManagerGetGuidRetType, ok bool) { + return getOrgManagerGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrgManager) SetGuid(v OrgManagerGetGuidRetType) { + setOrgManagerGetGuidAttributeType(&o.Guid, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrgManager) GetPlatformId() (ret OrgManagerGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetPlatformIdOk() (ret OrgManagerGetPlatformIdRetType, ok bool) { + return getOrgManagerGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrgManager) SetPlatformId(v OrgManagerGetPlatformIdRetType) { + setOrgManagerGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrgManager) GetProjectId() (ret OrgManagerGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetProjectIdOk() (ret OrgManagerGetProjectIdRetType, ok bool) { + return getOrgManagerGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrgManager) SetProjectId(v OrgManagerGetProjectIdRetType) { + setOrgManagerGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrgManager) GetRegion() (ret OrgManagerGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetRegionOk() (ret OrgManagerGetRegionRetType, ok bool) { + return getOrgManagerGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrgManager) SetRegion(v OrgManagerGetRegionRetType) { + setOrgManagerGetRegionAttributeType(&o.Region, v) +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *OrgManager) GetUpdatedAt() (ret OrgManagerGetUpdatedAtRetType) { + ret, _ = o.GetUpdatedAtOk() + return ret +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetUpdatedAtOk() (ret OrgManagerGetUpdatedAtRetType, ok bool) { + return getOrgManagerGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// SetUpdatedAt sets field value +func (o *OrgManager) SetUpdatedAt(v OrgManagerGetUpdatedAtRetType) { + setOrgManagerGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +// GetUsername returns the Username field value +func (o *OrgManager) GetUsername() (ret OrgManagerGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *OrgManager) GetUsernameOk() (ret OrgManagerGetUsernameRetType, ok bool) { + return getOrgManagerGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +func (o *OrgManager) SetUsername(v OrgManagerGetUsernameRetType) { + setOrgManagerGetUsernameAttributeType(&o.Username, v) +} + +func (o OrgManager) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrgManagerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getOrgManagerGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrgManagerGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrgManagerGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrgManagerGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrgManagerGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + if val, ok := getOrgManagerGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val + } + return toSerialize, nil +} + +type NullableOrgManager struct { + value *OrgManager + isSet bool +} + +func (v NullableOrgManager) Get() *OrgManager { + return v.value +} + +func (v *NullableOrgManager) Set(val *OrgManager) { + v.value = val + v.isSet = true +} + +func (v NullableOrgManager) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgManager) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgManager(val *OrgManager) *NullableOrgManager { + return &NullableOrgManager{value: val, isSet: true} +} + +func (v NullableOrgManager) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgManager) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_manager_delete_response.go b/services/scf/model_org_manager_delete_response.go new file mode 100644 index 000000000..478e16c80 --- /dev/null +++ b/services/scf/model_org_manager_delete_response.go @@ -0,0 +1,126 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrgManagerDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgManagerDeleteResponse{} + +/* + types and functions for message +*/ + +// isNotNullableString +type OrgManagerDeleteResponseGetMessageAttributeType = *string + +func getOrgManagerDeleteResponseGetMessageAttributeTypeOk(arg OrgManagerDeleteResponseGetMessageAttributeType) (ret OrgManagerDeleteResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerDeleteResponseGetMessageAttributeType(arg *OrgManagerDeleteResponseGetMessageAttributeType, val OrgManagerDeleteResponseGetMessageRetType) { + *arg = &val +} + +type OrgManagerDeleteResponseGetMessageArgType = string +type OrgManagerDeleteResponseGetMessageRetType = string + +// OrgManagerDeleteResponse struct for OrgManagerDeleteResponse +type OrgManagerDeleteResponse struct { + // REQUIRED + Message OrgManagerDeleteResponseGetMessageAttributeType `json:"message" required:"true"` +} + +type _OrgManagerDeleteResponse OrgManagerDeleteResponse + +// NewOrgManagerDeleteResponse instantiates a new OrgManagerDeleteResponse 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 NewOrgManagerDeleteResponse(message OrgManagerDeleteResponseGetMessageArgType) *OrgManagerDeleteResponse { + this := OrgManagerDeleteResponse{} + setOrgManagerDeleteResponseGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewOrgManagerDeleteResponseWithDefaults instantiates a new OrgManagerDeleteResponse 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 NewOrgManagerDeleteResponseWithDefaults() *OrgManagerDeleteResponse { + this := OrgManagerDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *OrgManagerDeleteResponse) GetMessage() (ret OrgManagerDeleteResponseGetMessageRetType) { + 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 *OrgManagerDeleteResponse) GetMessageOk() (ret OrgManagerDeleteResponseGetMessageRetType, ok bool) { + return getOrgManagerDeleteResponseGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *OrgManagerDeleteResponse) SetMessage(v OrgManagerDeleteResponseGetMessageRetType) { + setOrgManagerDeleteResponseGetMessageAttributeType(&o.Message, v) +} + +func (o OrgManagerDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrgManagerDeleteResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableOrgManagerDeleteResponse struct { + value *OrgManagerDeleteResponse + isSet bool +} + +func (v NullableOrgManagerDeleteResponse) Get() *OrgManagerDeleteResponse { + return v.value +} + +func (v *NullableOrgManagerDeleteResponse) Set(val *OrgManagerDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrgManagerDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgManagerDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgManagerDeleteResponse(val *OrgManagerDeleteResponse) *NullableOrgManagerDeleteResponse { + return &NullableOrgManagerDeleteResponse{value: val, isSet: true} +} + +func (v NullableOrgManagerDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgManagerDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_manager_delete_response_test.go b/services/scf/model_org_manager_delete_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_manager_delete_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_manager_response.go b/services/scf/model_org_manager_response.go new file mode 100644 index 000000000..a16d401c1 --- /dev/null +++ b/services/scf/model_org_manager_response.go @@ -0,0 +1,477 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the OrgManagerResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgManagerResponse{} + +/* + types and functions for createdAt +*/ + +// isDateTime +type OrgManagerResponseGetCreatedAtAttributeType = *time.Time +type OrgManagerResponseGetCreatedAtArgType = time.Time +type OrgManagerResponseGetCreatedAtRetType = time.Time + +func getOrgManagerResponseGetCreatedAtAttributeTypeOk(arg OrgManagerResponseGetCreatedAtAttributeType) (ret OrgManagerResponseGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetCreatedAtAttributeType(arg *OrgManagerResponseGetCreatedAtAttributeType, val OrgManagerResponseGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrgManagerResponseGetGuidAttributeType = *string + +func getOrgManagerResponseGetGuidAttributeTypeOk(arg OrgManagerResponseGetGuidAttributeType) (ret OrgManagerResponseGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetGuidAttributeType(arg *OrgManagerResponseGetGuidAttributeType, val OrgManagerResponseGetGuidRetType) { + *arg = &val +} + +type OrgManagerResponseGetGuidArgType = string +type OrgManagerResponseGetGuidRetType = string + +/* + types and functions for orgId +*/ + +// isNotNullableString +type OrgManagerResponseGetOrgIdAttributeType = *string + +func getOrgManagerResponseGetOrgIdAttributeTypeOk(arg OrgManagerResponseGetOrgIdAttributeType) (ret OrgManagerResponseGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetOrgIdAttributeType(arg *OrgManagerResponseGetOrgIdAttributeType, val OrgManagerResponseGetOrgIdRetType) { + *arg = &val +} + +type OrgManagerResponseGetOrgIdArgType = string +type OrgManagerResponseGetOrgIdRetType = string + +/* + types and functions for password +*/ + +// isNotNullableString +type OrgManagerResponseGetPasswordAttributeType = *string + +func getOrgManagerResponseGetPasswordAttributeTypeOk(arg OrgManagerResponseGetPasswordAttributeType) (ret OrgManagerResponseGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetPasswordAttributeType(arg *OrgManagerResponseGetPasswordAttributeType, val OrgManagerResponseGetPasswordRetType) { + *arg = &val +} + +type OrgManagerResponseGetPasswordArgType = string +type OrgManagerResponseGetPasswordRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrgManagerResponseGetPlatformIdAttributeType = *string + +func getOrgManagerResponseGetPlatformIdAttributeTypeOk(arg OrgManagerResponseGetPlatformIdAttributeType) (ret OrgManagerResponseGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetPlatformIdAttributeType(arg *OrgManagerResponseGetPlatformIdAttributeType, val OrgManagerResponseGetPlatformIdRetType) { + *arg = &val +} + +type OrgManagerResponseGetPlatformIdArgType = string +type OrgManagerResponseGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrgManagerResponseGetProjectIdAttributeType = *string + +func getOrgManagerResponseGetProjectIdAttributeTypeOk(arg OrgManagerResponseGetProjectIdAttributeType) (ret OrgManagerResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetProjectIdAttributeType(arg *OrgManagerResponseGetProjectIdAttributeType, val OrgManagerResponseGetProjectIdRetType) { + *arg = &val +} + +type OrgManagerResponseGetProjectIdArgType = string +type OrgManagerResponseGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrgManagerResponseGetRegionAttributeType = *string + +func getOrgManagerResponseGetRegionAttributeTypeOk(arg OrgManagerResponseGetRegionAttributeType) (ret OrgManagerResponseGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetRegionAttributeType(arg *OrgManagerResponseGetRegionAttributeType, val OrgManagerResponseGetRegionRetType) { + *arg = &val +} + +type OrgManagerResponseGetRegionArgType = string +type OrgManagerResponseGetRegionRetType = string + +/* + types and functions for updatedAt +*/ + +// isDateTime +type OrgManagerResponseGetUpdatedAtAttributeType = *time.Time +type OrgManagerResponseGetUpdatedAtArgType = time.Time +type OrgManagerResponseGetUpdatedAtRetType = time.Time + +func getOrgManagerResponseGetUpdatedAtAttributeTypeOk(arg OrgManagerResponseGetUpdatedAtAttributeType) (ret OrgManagerResponseGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetUpdatedAtAttributeType(arg *OrgManagerResponseGetUpdatedAtAttributeType, val OrgManagerResponseGetUpdatedAtRetType) { + *arg = &val +} + +/* + types and functions for username +*/ + +// isNotNullableString +type OrgManagerResponseGetUsernameAttributeType = *string + +func getOrgManagerResponseGetUsernameAttributeTypeOk(arg OrgManagerResponseGetUsernameAttributeType) (ret OrgManagerResponseGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgManagerResponseGetUsernameAttributeType(arg *OrgManagerResponseGetUsernameAttributeType, val OrgManagerResponseGetUsernameRetType) { + *arg = &val +} + +type OrgManagerResponseGetUsernameArgType = string +type OrgManagerResponseGetUsernameRetType = string + +// OrgManagerResponse struct for OrgManagerResponse +type OrgManagerResponse struct { + // REQUIRED + CreatedAt OrgManagerResponseGetCreatedAtAttributeType `json:"createdAt" required:"true"` + // REQUIRED + Guid OrgManagerResponseGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + OrgId OrgManagerResponseGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + Password OrgManagerResponseGetPasswordAttributeType `json:"password" required:"true"` + // REQUIRED + PlatformId OrgManagerResponseGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrgManagerResponseGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrgManagerResponseGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + UpdatedAt OrgManagerResponseGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` + // REQUIRED + Username OrgManagerResponseGetUsernameAttributeType `json:"username" required:"true"` +} + +type _OrgManagerResponse OrgManagerResponse + +// NewOrgManagerResponse instantiates a new OrgManagerResponse 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 NewOrgManagerResponse(createdAt OrgManagerResponseGetCreatedAtArgType, guid OrgManagerResponseGetGuidArgType, orgId OrgManagerResponseGetOrgIdArgType, password OrgManagerResponseGetPasswordArgType, platformId OrgManagerResponseGetPlatformIdArgType, projectId OrgManagerResponseGetProjectIdArgType, region OrgManagerResponseGetRegionArgType, updatedAt OrgManagerResponseGetUpdatedAtArgType, username OrgManagerResponseGetUsernameArgType) *OrgManagerResponse { + this := OrgManagerResponse{} + setOrgManagerResponseGetCreatedAtAttributeType(&this.CreatedAt, createdAt) + setOrgManagerResponseGetGuidAttributeType(&this.Guid, guid) + setOrgManagerResponseGetOrgIdAttributeType(&this.OrgId, orgId) + setOrgManagerResponseGetPasswordAttributeType(&this.Password, password) + setOrgManagerResponseGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrgManagerResponseGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrgManagerResponseGetRegionAttributeType(&this.Region, region) + setOrgManagerResponseGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) + setOrgManagerResponseGetUsernameAttributeType(&this.Username, username) + return &this +} + +// NewOrgManagerResponseWithDefaults instantiates a new OrgManagerResponse 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 NewOrgManagerResponseWithDefaults() *OrgManagerResponse { + this := OrgManagerResponse{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *OrgManagerResponse) GetCreatedAt() (ret OrgManagerResponseGetCreatedAtRetType) { + ret, _ = o.GetCreatedAtOk() + return ret +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetCreatedAtOk() (ret OrgManagerResponseGetCreatedAtRetType, ok bool) { + return getOrgManagerResponseGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// SetCreatedAt sets field value +func (o *OrgManagerResponse) SetCreatedAt(v OrgManagerResponseGetCreatedAtRetType) { + setOrgManagerResponseGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetGuid returns the Guid field value +func (o *OrgManagerResponse) GetGuid() (ret OrgManagerResponseGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetGuidOk() (ret OrgManagerResponseGetGuidRetType, ok bool) { + return getOrgManagerResponseGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrgManagerResponse) SetGuid(v OrgManagerResponseGetGuidRetType) { + setOrgManagerResponseGetGuidAttributeType(&o.Guid, v) +} + +// GetOrgId returns the OrgId field value +func (o *OrgManagerResponse) GetOrgId() (ret OrgManagerResponseGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetOrgIdOk() (ret OrgManagerResponseGetOrgIdRetType, ok bool) { + return getOrgManagerResponseGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *OrgManagerResponse) SetOrgId(v OrgManagerResponseGetOrgIdRetType) { + setOrgManagerResponseGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPassword returns the Password field value +func (o *OrgManagerResponse) GetPassword() (ret OrgManagerResponseGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetPasswordOk() (ret OrgManagerResponseGetPasswordRetType, ok bool) { + return getOrgManagerResponseGetPasswordAttributeTypeOk(o.Password) +} + +// SetPassword sets field value +func (o *OrgManagerResponse) SetPassword(v OrgManagerResponseGetPasswordRetType) { + setOrgManagerResponseGetPasswordAttributeType(&o.Password, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrgManagerResponse) GetPlatformId() (ret OrgManagerResponseGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetPlatformIdOk() (ret OrgManagerResponseGetPlatformIdRetType, ok bool) { + return getOrgManagerResponseGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrgManagerResponse) SetPlatformId(v OrgManagerResponseGetPlatformIdRetType) { + setOrgManagerResponseGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrgManagerResponse) GetProjectId() (ret OrgManagerResponseGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetProjectIdOk() (ret OrgManagerResponseGetProjectIdRetType, ok bool) { + return getOrgManagerResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrgManagerResponse) SetProjectId(v OrgManagerResponseGetProjectIdRetType) { + setOrgManagerResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrgManagerResponse) GetRegion() (ret OrgManagerResponseGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetRegionOk() (ret OrgManagerResponseGetRegionRetType, ok bool) { + return getOrgManagerResponseGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrgManagerResponse) SetRegion(v OrgManagerResponseGetRegionRetType) { + setOrgManagerResponseGetRegionAttributeType(&o.Region, v) +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *OrgManagerResponse) GetUpdatedAt() (ret OrgManagerResponseGetUpdatedAtRetType) { + ret, _ = o.GetUpdatedAtOk() + return ret +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetUpdatedAtOk() (ret OrgManagerResponseGetUpdatedAtRetType, ok bool) { + return getOrgManagerResponseGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// SetUpdatedAt sets field value +func (o *OrgManagerResponse) SetUpdatedAt(v OrgManagerResponseGetUpdatedAtRetType) { + setOrgManagerResponseGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +// GetUsername returns the Username field value +func (o *OrgManagerResponse) GetUsername() (ret OrgManagerResponseGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *OrgManagerResponse) GetUsernameOk() (ret OrgManagerResponseGetUsernameRetType, ok bool) { + return getOrgManagerResponseGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +func (o *OrgManagerResponse) SetUsername(v OrgManagerResponseGetUsernameRetType) { + setOrgManagerResponseGetUsernameAttributeType(&o.Username, v) +} + +func (o OrgManagerResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrgManagerResponseGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getOrgManagerResponseGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrgManagerResponseGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getOrgManagerResponseGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getOrgManagerResponseGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrgManagerResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrgManagerResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrgManagerResponseGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + if val, ok := getOrgManagerResponseGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val + } + return toSerialize, nil +} + +type NullableOrgManagerResponse struct { + value *OrgManagerResponse + isSet bool +} + +func (v NullableOrgManagerResponse) Get() *OrgManagerResponse { + return v.value +} + +func (v *NullableOrgManagerResponse) Set(val *OrgManagerResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrgManagerResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgManagerResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgManagerResponse(val *OrgManagerResponse) *NullableOrgManagerResponse { + return &NullableOrgManagerResponse{value: val, isSet: true} +} + +func (v NullableOrgManagerResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgManagerResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_manager_response_test.go b/services/scf/model_org_manager_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_manager_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_manager_test.go b/services/scf/model_org_manager_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_manager_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_role_create_bff_request.go b/services/scf/model_org_role_create_bff_request.go new file mode 100644 index 000000000..f9e9045b4 --- /dev/null +++ b/services/scf/model_org_role_create_bff_request.go @@ -0,0 +1,125 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrgRoleCreateBffRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgRoleCreateBffRequest{} + +/* + types and functions for type +*/ + +// isEnumRef +type OrgRoleCreateBffRequestGetTypeAttributeType = *OrgRoleType +type OrgRoleCreateBffRequestGetTypeArgType = OrgRoleType +type OrgRoleCreateBffRequestGetTypeRetType = OrgRoleType + +func getOrgRoleCreateBffRequestGetTypeAttributeTypeOk(arg OrgRoleCreateBffRequestGetTypeAttributeType) (ret OrgRoleCreateBffRequestGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleCreateBffRequestGetTypeAttributeType(arg *OrgRoleCreateBffRequestGetTypeAttributeType, val OrgRoleCreateBffRequestGetTypeRetType) { + *arg = &val +} + +// OrgRoleCreateBffRequest struct for OrgRoleCreateBffRequest +type OrgRoleCreateBffRequest struct { + // REQUIRED + Type OrgRoleCreateBffRequestGetTypeAttributeType `json:"type" required:"true"` +} + +type _OrgRoleCreateBffRequest OrgRoleCreateBffRequest + +// NewOrgRoleCreateBffRequest instantiates a new OrgRoleCreateBffRequest 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 NewOrgRoleCreateBffRequest(types OrgRoleCreateBffRequestGetTypeArgType) *OrgRoleCreateBffRequest { + this := OrgRoleCreateBffRequest{} + setOrgRoleCreateBffRequestGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewOrgRoleCreateBffRequestWithDefaults instantiates a new OrgRoleCreateBffRequest 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 NewOrgRoleCreateBffRequestWithDefaults() *OrgRoleCreateBffRequest { + this := OrgRoleCreateBffRequest{} + return &this +} + +// GetType returns the Type field value +func (o *OrgRoleCreateBffRequest) GetType() (ret OrgRoleCreateBffRequestGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OrgRoleCreateBffRequest) GetTypeOk() (ret OrgRoleCreateBffRequestGetTypeRetType, ok bool) { + return getOrgRoleCreateBffRequestGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *OrgRoleCreateBffRequest) SetType(v OrgRoleCreateBffRequestGetTypeRetType) { + setOrgRoleCreateBffRequestGetTypeAttributeType(&o.Type, v) +} + +func (o OrgRoleCreateBffRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrgRoleCreateBffRequestGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableOrgRoleCreateBffRequest struct { + value *OrgRoleCreateBffRequest + isSet bool +} + +func (v NullableOrgRoleCreateBffRequest) Get() *OrgRoleCreateBffRequest { + return v.value +} + +func (v *NullableOrgRoleCreateBffRequest) Set(val *OrgRoleCreateBffRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOrgRoleCreateBffRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgRoleCreateBffRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgRoleCreateBffRequest(val *OrgRoleCreateBffRequest) *NullableOrgRoleCreateBffRequest { + return &NullableOrgRoleCreateBffRequest{value: val, isSet: true} +} + +func (v NullableOrgRoleCreateBffRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgRoleCreateBffRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_role_create_bff_request_test.go b/services/scf/model_org_role_create_bff_request_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_role_create_bff_request_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_role_response.go b/services/scf/model_org_role_response.go new file mode 100644 index 000000000..1b58591dc --- /dev/null +++ b/services/scf/model_org_role_response.go @@ -0,0 +1,345 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrgRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrgRoleResponse{} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrgRoleResponseGetGuidAttributeType = *string + +func getOrgRoleResponseGetGuidAttributeTypeOk(arg OrgRoleResponseGetGuidAttributeType) (ret OrgRoleResponseGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetGuidAttributeType(arg *OrgRoleResponseGetGuidAttributeType, val OrgRoleResponseGetGuidRetType) { + *arg = &val +} + +type OrgRoleResponseGetGuidArgType = string +type OrgRoleResponseGetGuidRetType = string + +/* + types and functions for orgId +*/ + +// isNotNullableString +type OrgRoleResponseGetOrgIdAttributeType = *string + +func getOrgRoleResponseGetOrgIdAttributeTypeOk(arg OrgRoleResponseGetOrgIdAttributeType) (ret OrgRoleResponseGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetOrgIdAttributeType(arg *OrgRoleResponseGetOrgIdAttributeType, val OrgRoleResponseGetOrgIdRetType) { + *arg = &val +} + +type OrgRoleResponseGetOrgIdArgType = string +type OrgRoleResponseGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrgRoleResponseGetPlatformIdAttributeType = *string + +func getOrgRoleResponseGetPlatformIdAttributeTypeOk(arg OrgRoleResponseGetPlatformIdAttributeType) (ret OrgRoleResponseGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetPlatformIdAttributeType(arg *OrgRoleResponseGetPlatformIdAttributeType, val OrgRoleResponseGetPlatformIdRetType) { + *arg = &val +} + +type OrgRoleResponseGetPlatformIdArgType = string +type OrgRoleResponseGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrgRoleResponseGetProjectIdAttributeType = *string + +func getOrgRoleResponseGetProjectIdAttributeTypeOk(arg OrgRoleResponseGetProjectIdAttributeType) (ret OrgRoleResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetProjectIdAttributeType(arg *OrgRoleResponseGetProjectIdAttributeType, val OrgRoleResponseGetProjectIdRetType) { + *arg = &val +} + +type OrgRoleResponseGetProjectIdArgType = string +type OrgRoleResponseGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrgRoleResponseGetRegionAttributeType = *string + +func getOrgRoleResponseGetRegionAttributeTypeOk(arg OrgRoleResponseGetRegionAttributeType) (ret OrgRoleResponseGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetRegionAttributeType(arg *OrgRoleResponseGetRegionAttributeType, val OrgRoleResponseGetRegionRetType) { + *arg = &val +} + +type OrgRoleResponseGetRegionArgType = string +type OrgRoleResponseGetRegionRetType = string + +/* + types and functions for type +*/ + +// isEnumRef +type OrgRoleResponseGetTypeAttributeType = *OrgRoleType +type OrgRoleResponseGetTypeArgType = OrgRoleType +type OrgRoleResponseGetTypeRetType = OrgRoleType + +func getOrgRoleResponseGetTypeAttributeTypeOk(arg OrgRoleResponseGetTypeAttributeType) (ret OrgRoleResponseGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrgRoleResponseGetTypeAttributeType(arg *OrgRoleResponseGetTypeAttributeType, val OrgRoleResponseGetTypeRetType) { + *arg = &val +} + +// OrgRoleResponse struct for OrgRoleResponse +type OrgRoleResponse struct { + // REQUIRED + Guid OrgRoleResponseGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + OrgId OrgRoleResponseGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + PlatformId OrgRoleResponseGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrgRoleResponseGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrgRoleResponseGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + Type OrgRoleResponseGetTypeAttributeType `json:"type" required:"true"` +} + +type _OrgRoleResponse OrgRoleResponse + +// NewOrgRoleResponse instantiates a new OrgRoleResponse 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 NewOrgRoleResponse(guid OrgRoleResponseGetGuidArgType, orgId OrgRoleResponseGetOrgIdArgType, platformId OrgRoleResponseGetPlatformIdArgType, projectId OrgRoleResponseGetProjectIdArgType, region OrgRoleResponseGetRegionArgType, types OrgRoleResponseGetTypeArgType) *OrgRoleResponse { + this := OrgRoleResponse{} + setOrgRoleResponseGetGuidAttributeType(&this.Guid, guid) + setOrgRoleResponseGetOrgIdAttributeType(&this.OrgId, orgId) + setOrgRoleResponseGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrgRoleResponseGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrgRoleResponseGetRegionAttributeType(&this.Region, region) + setOrgRoleResponseGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewOrgRoleResponseWithDefaults instantiates a new OrgRoleResponse 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 NewOrgRoleResponseWithDefaults() *OrgRoleResponse { + this := OrgRoleResponse{} + return &this +} + +// GetGuid returns the Guid field value +func (o *OrgRoleResponse) GetGuid() (ret OrgRoleResponseGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetGuidOk() (ret OrgRoleResponseGetGuidRetType, ok bool) { + return getOrgRoleResponseGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrgRoleResponse) SetGuid(v OrgRoleResponseGetGuidRetType) { + setOrgRoleResponseGetGuidAttributeType(&o.Guid, v) +} + +// GetOrgId returns the OrgId field value +func (o *OrgRoleResponse) GetOrgId() (ret OrgRoleResponseGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetOrgIdOk() (ret OrgRoleResponseGetOrgIdRetType, ok bool) { + return getOrgRoleResponseGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *OrgRoleResponse) SetOrgId(v OrgRoleResponseGetOrgIdRetType) { + setOrgRoleResponseGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrgRoleResponse) GetPlatformId() (ret OrgRoleResponseGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetPlatformIdOk() (ret OrgRoleResponseGetPlatformIdRetType, ok bool) { + return getOrgRoleResponseGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrgRoleResponse) SetPlatformId(v OrgRoleResponseGetPlatformIdRetType) { + setOrgRoleResponseGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrgRoleResponse) GetProjectId() (ret OrgRoleResponseGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetProjectIdOk() (ret OrgRoleResponseGetProjectIdRetType, ok bool) { + return getOrgRoleResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrgRoleResponse) SetProjectId(v OrgRoleResponseGetProjectIdRetType) { + setOrgRoleResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrgRoleResponse) GetRegion() (ret OrgRoleResponseGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetRegionOk() (ret OrgRoleResponseGetRegionRetType, ok bool) { + return getOrgRoleResponseGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrgRoleResponse) SetRegion(v OrgRoleResponseGetRegionRetType) { + setOrgRoleResponseGetRegionAttributeType(&o.Region, v) +} + +// GetType returns the Type field value +func (o *OrgRoleResponse) GetType() (ret OrgRoleResponseGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OrgRoleResponse) GetTypeOk() (ret OrgRoleResponseGetTypeRetType, ok bool) { + return getOrgRoleResponseGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *OrgRoleResponse) SetType(v OrgRoleResponseGetTypeRetType) { + setOrgRoleResponseGetTypeAttributeType(&o.Type, v) +} + +func (o OrgRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrgRoleResponseGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrgRoleResponseGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getOrgRoleResponseGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrgRoleResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrgRoleResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrgRoleResponseGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableOrgRoleResponse struct { + value *OrgRoleResponse + isSet bool +} + +func (v NullableOrgRoleResponse) Get() *OrgRoleResponse { + return v.value +} + +func (v *NullableOrgRoleResponse) Set(val *OrgRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrgRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgRoleResponse(val *OrgRoleResponse) *NullableOrgRoleResponse { + return &NullableOrgRoleResponse{value: val, isSet: true} +} + +func (v NullableOrgRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_role_response_test.go b/services/scf/model_org_role_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_role_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_org_role_type.go b/services/scf/model_org_role_type.go new file mode 100644 index 000000000..0a4b90360 --- /dev/null +++ b/services/scf/model_org_role_type.go @@ -0,0 +1,119 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "fmt" +) + +// OrgRoleType the model 'OrgRoleType' +type OrgRoleType string + +// List of OrgRoleType +const ( + ORGROLETYPE_USER OrgRoleType = "organization_user" + ORGROLETYPE_AUDITOR OrgRoleType = "organization_auditor" + ORGROLETYPE_MANAGER OrgRoleType = "organization_manager" + ORGROLETYPE_BILLING_MANAGER OrgRoleType = "organization_billing_manager" +) + +// All allowed values of OrgRoleType enum +var AllowedOrgRoleTypeEnumValues = []OrgRoleType{ + "organization_user", + "organization_auditor", + "organization_manager", + "organization_billing_manager", +} + +func (v *OrgRoleType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := OrgRoleType(value) + for _, existing := range AllowedOrgRoleTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OrgRoleType", value) +} + +// NewOrgRoleTypeFromValue returns a pointer to a valid OrgRoleType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOrgRoleTypeFromValue(v string) (*OrgRoleType, error) { + ev := OrgRoleType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OrgRoleType: valid values are %v", v, AllowedOrgRoleTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OrgRoleType) IsValid() bool { + for _, existing := range AllowedOrgRoleTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to OrgRoleType value +func (v OrgRoleType) Ptr() *OrgRoleType { + return &v +} + +type NullableOrgRoleType struct { + value *OrgRoleType + isSet bool +} + +func (v NullableOrgRoleType) Get() *OrgRoleType { + return v.value +} + +func (v *NullableOrgRoleType) Set(val *OrgRoleType) { + v.value = val + v.isSet = true +} + +func (v NullableOrgRoleType) IsSet() bool { + return v.isSet +} + +func (v *NullableOrgRoleType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrgRoleType(val *OrgRoleType) *NullableOrgRoleType { + return &NullableOrgRoleType{value: val, isSet: true} +} + +func (v NullableOrgRoleType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrgRoleType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_org_role_type_test.go b/services/scf/model_org_role_type_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_org_role_type_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organization.go b/services/scf/model_organization.go new file mode 100644 index 000000000..b9fcffa77 --- /dev/null +++ b/services/scf/model_organization.go @@ -0,0 +1,521 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the Organization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Organization{} + +/* + types and functions for createdAt +*/ + +// isDateTime +type OrganizationGetCreatedAtAttributeType = *time.Time +type OrganizationGetCreatedAtArgType = time.Time +type OrganizationGetCreatedAtRetType = time.Time + +func getOrganizationGetCreatedAtAttributeTypeOk(arg OrganizationGetCreatedAtAttributeType) (ret OrganizationGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetCreatedAtAttributeType(arg *OrganizationGetCreatedAtAttributeType, val OrganizationGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrganizationGetGuidAttributeType = *string + +func getOrganizationGetGuidAttributeTypeOk(arg OrganizationGetGuidAttributeType) (ret OrganizationGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetGuidAttributeType(arg *OrganizationGetGuidAttributeType, val OrganizationGetGuidRetType) { + *arg = &val +} + +type OrganizationGetGuidArgType = string +type OrganizationGetGuidRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type OrganizationGetNameAttributeType = *string + +func getOrganizationGetNameAttributeTypeOk(arg OrganizationGetNameAttributeType) (ret OrganizationGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetNameAttributeType(arg *OrganizationGetNameAttributeType, val OrganizationGetNameRetType) { + *arg = &val +} + +type OrganizationGetNameArgType = string +type OrganizationGetNameRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationGetPlatformIdAttributeType = *string + +func getOrganizationGetPlatformIdAttributeTypeOk(arg OrganizationGetPlatformIdAttributeType) (ret OrganizationGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetPlatformIdAttributeType(arg *OrganizationGetPlatformIdAttributeType, val OrganizationGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationGetPlatformIdArgType = string +type OrganizationGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationGetProjectIdAttributeType = *string + +func getOrganizationGetProjectIdAttributeTypeOk(arg OrganizationGetProjectIdAttributeType) (ret OrganizationGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetProjectIdAttributeType(arg *OrganizationGetProjectIdAttributeType, val OrganizationGetProjectIdRetType) { + *arg = &val +} + +type OrganizationGetProjectIdArgType = string +type OrganizationGetProjectIdRetType = string + +/* + types and functions for quotaId +*/ + +// isNotNullableString +type OrganizationGetQuotaIdAttributeType = *string + +func getOrganizationGetQuotaIdAttributeTypeOk(arg OrganizationGetQuotaIdAttributeType) (ret OrganizationGetQuotaIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetQuotaIdAttributeType(arg *OrganizationGetQuotaIdAttributeType, val OrganizationGetQuotaIdRetType) { + *arg = &val +} + +type OrganizationGetQuotaIdArgType = string +type OrganizationGetQuotaIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationGetRegionAttributeType = *string + +func getOrganizationGetRegionAttributeTypeOk(arg OrganizationGetRegionAttributeType) (ret OrganizationGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetRegionAttributeType(arg *OrganizationGetRegionAttributeType, val OrganizationGetRegionRetType) { + *arg = &val +} + +type OrganizationGetRegionArgType = string +type OrganizationGetRegionRetType = string + +/* + types and functions for status +*/ + +// isNotNullableString +type OrganizationGetStatusAttributeType = *string + +func getOrganizationGetStatusAttributeTypeOk(arg OrganizationGetStatusAttributeType) (ret OrganizationGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetStatusAttributeType(arg *OrganizationGetStatusAttributeType, val OrganizationGetStatusRetType) { + *arg = &val +} + +type OrganizationGetStatusArgType = string +type OrganizationGetStatusRetType = string + +/* + types and functions for suspended +*/ + +// isBoolean +type OrganizationgetSuspendedAttributeType = *bool +type OrganizationgetSuspendedArgType = bool +type OrganizationgetSuspendedRetType = bool + +func getOrganizationgetSuspendedAttributeTypeOk(arg OrganizationgetSuspendedAttributeType) (ret OrganizationgetSuspendedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationgetSuspendedAttributeType(arg *OrganizationgetSuspendedAttributeType, val OrganizationgetSuspendedRetType) { + *arg = &val +} + +/* + types and functions for updatedAt +*/ + +// isDateTime +type OrganizationGetUpdatedAtAttributeType = *time.Time +type OrganizationGetUpdatedAtArgType = time.Time +type OrganizationGetUpdatedAtRetType = time.Time + +func getOrganizationGetUpdatedAtAttributeTypeOk(arg OrganizationGetUpdatedAtAttributeType) (ret OrganizationGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationGetUpdatedAtAttributeType(arg *OrganizationGetUpdatedAtAttributeType, val OrganizationGetUpdatedAtRetType) { + *arg = &val +} + +// Organization struct for Organization +type Organization struct { + // REQUIRED + CreatedAt OrganizationGetCreatedAtAttributeType `json:"createdAt" required:"true"` + // REQUIRED + Guid OrganizationGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + Name OrganizationGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + PlatformId OrganizationGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + QuotaId OrganizationGetQuotaIdAttributeType `json:"quotaId" required:"true"` + // REQUIRED + Region OrganizationGetRegionAttributeType `json:"region" required:"true"` + // The organization's status. The status value starts with `deleting` when a deleting request is in progress. The status value starts with `delete_failed` when the deletion failed. The status value can be different from `deleting` and `delete_failed`. Additional details can be provided in the future. + // REQUIRED + Status OrganizationGetStatusAttributeType `json:"status" required:"true"` + // REQUIRED + Suspended OrganizationgetSuspendedAttributeType `json:"suspended" required:"true"` + // REQUIRED + UpdatedAt OrganizationGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` +} + +type _Organization Organization + +// NewOrganization instantiates a new Organization 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 NewOrganization(createdAt OrganizationGetCreatedAtArgType, guid OrganizationGetGuidArgType, name OrganizationGetNameArgType, platformId OrganizationGetPlatformIdArgType, projectId OrganizationGetProjectIdArgType, quotaId OrganizationGetQuotaIdArgType, region OrganizationGetRegionArgType, status OrganizationGetStatusArgType, suspended OrganizationgetSuspendedArgType, updatedAt OrganizationGetUpdatedAtArgType) *Organization { + this := Organization{} + setOrganizationGetCreatedAtAttributeType(&this.CreatedAt, createdAt) + setOrganizationGetGuidAttributeType(&this.Guid, guid) + setOrganizationGetNameAttributeType(&this.Name, name) + setOrganizationGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationGetQuotaIdAttributeType(&this.QuotaId, quotaId) + setOrganizationGetRegionAttributeType(&this.Region, region) + setOrganizationGetStatusAttributeType(&this.Status, status) + setOrganizationgetSuspendedAttributeType(&this.Suspended, suspended) + setOrganizationGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) + return &this +} + +// NewOrganizationWithDefaults instantiates a new Organization 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 NewOrganizationWithDefaults() *Organization { + this := Organization{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *Organization) GetCreatedAt() (ret OrganizationGetCreatedAtRetType) { + ret, _ = o.GetCreatedAtOk() + return ret +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *Organization) GetCreatedAtOk() (ret OrganizationGetCreatedAtRetType, ok bool) { + return getOrganizationGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// SetCreatedAt sets field value +func (o *Organization) SetCreatedAt(v OrganizationGetCreatedAtRetType) { + setOrganizationGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetGuid returns the Guid field value +func (o *Organization) GetGuid() (ret OrganizationGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *Organization) GetGuidOk() (ret OrganizationGetGuidRetType, ok bool) { + return getOrganizationGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *Organization) SetGuid(v OrganizationGetGuidRetType) { + setOrganizationGetGuidAttributeType(&o.Guid, v) +} + +// GetName returns the Name field value +func (o *Organization) GetName() (ret OrganizationGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Organization) GetNameOk() (ret OrganizationGetNameRetType, ok bool) { + return getOrganizationGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *Organization) SetName(v OrganizationGetNameRetType) { + setOrganizationGetNameAttributeType(&o.Name, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *Organization) GetPlatformId() (ret OrganizationGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *Organization) GetPlatformIdOk() (ret OrganizationGetPlatformIdRetType, ok bool) { + return getOrganizationGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *Organization) SetPlatformId(v OrganizationGetPlatformIdRetType) { + setOrganizationGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *Organization) GetProjectId() (ret OrganizationGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *Organization) GetProjectIdOk() (ret OrganizationGetProjectIdRetType, ok bool) { + return getOrganizationGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *Organization) SetProjectId(v OrganizationGetProjectIdRetType) { + setOrganizationGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetQuotaId returns the QuotaId field value +func (o *Organization) GetQuotaId() (ret OrganizationGetQuotaIdRetType) { + ret, _ = o.GetQuotaIdOk() + return ret +} + +// GetQuotaIdOk returns a tuple with the QuotaId field value +// and a boolean to check if the value has been set. +func (o *Organization) GetQuotaIdOk() (ret OrganizationGetQuotaIdRetType, ok bool) { + return getOrganizationGetQuotaIdAttributeTypeOk(o.QuotaId) +} + +// SetQuotaId sets field value +func (o *Organization) SetQuotaId(v OrganizationGetQuotaIdRetType) { + setOrganizationGetQuotaIdAttributeType(&o.QuotaId, v) +} + +// GetRegion returns the Region field value +func (o *Organization) GetRegion() (ret OrganizationGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *Organization) GetRegionOk() (ret OrganizationGetRegionRetType, ok bool) { + return getOrganizationGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *Organization) SetRegion(v OrganizationGetRegionRetType) { + setOrganizationGetRegionAttributeType(&o.Region, v) +} + +// GetStatus returns the Status field value +func (o *Organization) GetStatus() (ret OrganizationGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Organization) GetStatusOk() (ret OrganizationGetStatusRetType, ok bool) { + return getOrganizationGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +func (o *Organization) SetStatus(v OrganizationGetStatusRetType) { + setOrganizationGetStatusAttributeType(&o.Status, v) +} + +// GetSuspended returns the Suspended field value +func (o *Organization) GetSuspended() (ret OrganizationgetSuspendedRetType) { + ret, _ = o.GetSuspendedOk() + return ret +} + +// GetSuspendedOk returns a tuple with the Suspended field value +// and a boolean to check if the value has been set. +func (o *Organization) GetSuspendedOk() (ret OrganizationgetSuspendedRetType, ok bool) { + return getOrganizationgetSuspendedAttributeTypeOk(o.Suspended) +} + +// SetSuspended sets field value +func (o *Organization) SetSuspended(v OrganizationgetSuspendedRetType) { + setOrganizationgetSuspendedAttributeType(&o.Suspended, v) +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *Organization) GetUpdatedAt() (ret OrganizationGetUpdatedAtRetType) { + ret, _ = o.GetUpdatedAtOk() + return ret +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *Organization) GetUpdatedAtOk() (ret OrganizationGetUpdatedAtRetType, ok bool) { + return getOrganizationGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// SetUpdatedAt sets field value +func (o *Organization) SetUpdatedAt(v OrganizationGetUpdatedAtRetType) { + setOrganizationGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +func (o Organization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getOrganizationGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrganizationGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getOrganizationGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationGetQuotaIdAttributeTypeOk(o.QuotaId); ok { + toSerialize["QuotaId"] = val + } + if val, ok := getOrganizationGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrganizationGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getOrganizationgetSuspendedAttributeTypeOk(o.Suspended); ok { + toSerialize["Suspended"] = val + } + if val, ok := getOrganizationGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + return toSerialize, nil +} + +type NullableOrganization struct { + value *Organization + isSet bool +} + +func (v NullableOrganization) Get() *Organization { + return v.value +} + +func (v *NullableOrganization) Set(val *Organization) { + v.value = val + v.isSet = true +} + +func (v NullableOrganization) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganization(val *Organization) *NullableOrganization { + return &NullableOrganization{value: val, isSet: true} +} + +func (v NullableOrganization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organization_create_response.go b/services/scf/model_organization_create_response.go new file mode 100644 index 000000000..78eba0c06 --- /dev/null +++ b/services/scf/model_organization_create_response.go @@ -0,0 +1,258 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrganizationCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationCreateResponse{} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrganizationCreateResponseGetGuidAttributeType = *string + +func getOrganizationCreateResponseGetGuidAttributeTypeOk(arg OrganizationCreateResponseGetGuidAttributeType) (ret OrganizationCreateResponseGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationCreateResponseGetGuidAttributeType(arg *OrganizationCreateResponseGetGuidAttributeType, val OrganizationCreateResponseGetGuidRetType) { + *arg = &val +} + +type OrganizationCreateResponseGetGuidArgType = string +type OrganizationCreateResponseGetGuidRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationCreateResponseGetPlatformIdAttributeType = *string + +func getOrganizationCreateResponseGetPlatformIdAttributeTypeOk(arg OrganizationCreateResponseGetPlatformIdAttributeType) (ret OrganizationCreateResponseGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationCreateResponseGetPlatformIdAttributeType(arg *OrganizationCreateResponseGetPlatformIdAttributeType, val OrganizationCreateResponseGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationCreateResponseGetPlatformIdArgType = string +type OrganizationCreateResponseGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationCreateResponseGetProjectIdAttributeType = *string + +func getOrganizationCreateResponseGetProjectIdAttributeTypeOk(arg OrganizationCreateResponseGetProjectIdAttributeType) (ret OrganizationCreateResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationCreateResponseGetProjectIdAttributeType(arg *OrganizationCreateResponseGetProjectIdAttributeType, val OrganizationCreateResponseGetProjectIdRetType) { + *arg = &val +} + +type OrganizationCreateResponseGetProjectIdArgType = string +type OrganizationCreateResponseGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationCreateResponseGetRegionAttributeType = *string + +func getOrganizationCreateResponseGetRegionAttributeTypeOk(arg OrganizationCreateResponseGetRegionAttributeType) (ret OrganizationCreateResponseGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationCreateResponseGetRegionAttributeType(arg *OrganizationCreateResponseGetRegionAttributeType, val OrganizationCreateResponseGetRegionRetType) { + *arg = &val +} + +type OrganizationCreateResponseGetRegionArgType = string +type OrganizationCreateResponseGetRegionRetType = string + +// OrganizationCreateResponse struct for OrganizationCreateResponse +type OrganizationCreateResponse struct { + // REQUIRED + Guid OrganizationCreateResponseGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + PlatformId OrganizationCreateResponseGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationCreateResponseGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrganizationCreateResponseGetRegionAttributeType `json:"region" required:"true"` +} + +type _OrganizationCreateResponse OrganizationCreateResponse + +// NewOrganizationCreateResponse instantiates a new OrganizationCreateResponse 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 NewOrganizationCreateResponse(guid OrganizationCreateResponseGetGuidArgType, platformId OrganizationCreateResponseGetPlatformIdArgType, projectId OrganizationCreateResponseGetProjectIdArgType, region OrganizationCreateResponseGetRegionArgType) *OrganizationCreateResponse { + this := OrganizationCreateResponse{} + setOrganizationCreateResponseGetGuidAttributeType(&this.Guid, guid) + setOrganizationCreateResponseGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationCreateResponseGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationCreateResponseGetRegionAttributeType(&this.Region, region) + return &this +} + +// NewOrganizationCreateResponseWithDefaults instantiates a new OrganizationCreateResponse 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 NewOrganizationCreateResponseWithDefaults() *OrganizationCreateResponse { + this := OrganizationCreateResponse{} + return &this +} + +// GetGuid returns the Guid field value +func (o *OrganizationCreateResponse) GetGuid() (ret OrganizationCreateResponseGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrganizationCreateResponse) GetGuidOk() (ret OrganizationCreateResponseGetGuidRetType, ok bool) { + return getOrganizationCreateResponseGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrganizationCreateResponse) SetGuid(v OrganizationCreateResponseGetGuidRetType) { + setOrganizationCreateResponseGetGuidAttributeType(&o.Guid, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrganizationCreateResponse) GetPlatformId() (ret OrganizationCreateResponseGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrganizationCreateResponse) GetPlatformIdOk() (ret OrganizationCreateResponseGetPlatformIdRetType, ok bool) { + return getOrganizationCreateResponseGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrganizationCreateResponse) SetPlatformId(v OrganizationCreateResponseGetPlatformIdRetType) { + setOrganizationCreateResponseGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrganizationCreateResponse) GetProjectId() (ret OrganizationCreateResponseGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrganizationCreateResponse) GetProjectIdOk() (ret OrganizationCreateResponseGetProjectIdRetType, ok bool) { + return getOrganizationCreateResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrganizationCreateResponse) SetProjectId(v OrganizationCreateResponseGetProjectIdRetType) { + setOrganizationCreateResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrganizationCreateResponse) GetRegion() (ret OrganizationCreateResponseGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrganizationCreateResponse) GetRegionOk() (ret OrganizationCreateResponseGetRegionRetType, ok bool) { + return getOrganizationCreateResponseGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrganizationCreateResponse) SetRegion(v OrganizationCreateResponseGetRegionRetType) { + setOrganizationCreateResponseGetRegionAttributeType(&o.Region, v) +} + +func (o OrganizationCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationCreateResponseGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrganizationCreateResponseGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationCreateResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationCreateResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + return toSerialize, nil +} + +type NullableOrganizationCreateResponse struct { + value *OrganizationCreateResponse + isSet bool +} + +func (v NullableOrganizationCreateResponse) Get() *OrganizationCreateResponse { + return v.value +} + +func (v *NullableOrganizationCreateResponse) Set(val *OrganizationCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationCreateResponse(val *OrganizationCreateResponse) *NullableOrganizationCreateResponse { + return &NullableOrganizationCreateResponse{value: val, isSet: true} +} + +func (v NullableOrganizationCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organization_create_response_test.go b/services/scf/model_organization_create_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organization_create_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organization_delete_response.go b/services/scf/model_organization_delete_response.go new file mode 100644 index 000000000..adb1740b1 --- /dev/null +++ b/services/scf/model_organization_delete_response.go @@ -0,0 +1,258 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrganizationDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationDeleteResponse{} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrganizationDeleteResponseGetGuidAttributeType = *string + +func getOrganizationDeleteResponseGetGuidAttributeTypeOk(arg OrganizationDeleteResponseGetGuidAttributeType) (ret OrganizationDeleteResponseGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationDeleteResponseGetGuidAttributeType(arg *OrganizationDeleteResponseGetGuidAttributeType, val OrganizationDeleteResponseGetGuidRetType) { + *arg = &val +} + +type OrganizationDeleteResponseGetGuidArgType = string +type OrganizationDeleteResponseGetGuidRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationDeleteResponseGetPlatformIdAttributeType = *string + +func getOrganizationDeleteResponseGetPlatformIdAttributeTypeOk(arg OrganizationDeleteResponseGetPlatformIdAttributeType) (ret OrganizationDeleteResponseGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationDeleteResponseGetPlatformIdAttributeType(arg *OrganizationDeleteResponseGetPlatformIdAttributeType, val OrganizationDeleteResponseGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationDeleteResponseGetPlatformIdArgType = string +type OrganizationDeleteResponseGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationDeleteResponseGetProjectIdAttributeType = *string + +func getOrganizationDeleteResponseGetProjectIdAttributeTypeOk(arg OrganizationDeleteResponseGetProjectIdAttributeType) (ret OrganizationDeleteResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationDeleteResponseGetProjectIdAttributeType(arg *OrganizationDeleteResponseGetProjectIdAttributeType, val OrganizationDeleteResponseGetProjectIdRetType) { + *arg = &val +} + +type OrganizationDeleteResponseGetProjectIdArgType = string +type OrganizationDeleteResponseGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationDeleteResponseGetRegionAttributeType = *string + +func getOrganizationDeleteResponseGetRegionAttributeTypeOk(arg OrganizationDeleteResponseGetRegionAttributeType) (ret OrganizationDeleteResponseGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationDeleteResponseGetRegionAttributeType(arg *OrganizationDeleteResponseGetRegionAttributeType, val OrganizationDeleteResponseGetRegionRetType) { + *arg = &val +} + +type OrganizationDeleteResponseGetRegionArgType = string +type OrganizationDeleteResponseGetRegionRetType = string + +// OrganizationDeleteResponse struct for OrganizationDeleteResponse +type OrganizationDeleteResponse struct { + // REQUIRED + Guid OrganizationDeleteResponseGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + PlatformId OrganizationDeleteResponseGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationDeleteResponseGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrganizationDeleteResponseGetRegionAttributeType `json:"region" required:"true"` +} + +type _OrganizationDeleteResponse OrganizationDeleteResponse + +// NewOrganizationDeleteResponse instantiates a new OrganizationDeleteResponse 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 NewOrganizationDeleteResponse(guid OrganizationDeleteResponseGetGuidArgType, platformId OrganizationDeleteResponseGetPlatformIdArgType, projectId OrganizationDeleteResponseGetProjectIdArgType, region OrganizationDeleteResponseGetRegionArgType) *OrganizationDeleteResponse { + this := OrganizationDeleteResponse{} + setOrganizationDeleteResponseGetGuidAttributeType(&this.Guid, guid) + setOrganizationDeleteResponseGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationDeleteResponseGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationDeleteResponseGetRegionAttributeType(&this.Region, region) + return &this +} + +// NewOrganizationDeleteResponseWithDefaults instantiates a new OrganizationDeleteResponse 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 NewOrganizationDeleteResponseWithDefaults() *OrganizationDeleteResponse { + this := OrganizationDeleteResponse{} + return &this +} + +// GetGuid returns the Guid field value +func (o *OrganizationDeleteResponse) GetGuid() (ret OrganizationDeleteResponseGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrganizationDeleteResponse) GetGuidOk() (ret OrganizationDeleteResponseGetGuidRetType, ok bool) { + return getOrganizationDeleteResponseGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrganizationDeleteResponse) SetGuid(v OrganizationDeleteResponseGetGuidRetType) { + setOrganizationDeleteResponseGetGuidAttributeType(&o.Guid, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrganizationDeleteResponse) GetPlatformId() (ret OrganizationDeleteResponseGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrganizationDeleteResponse) GetPlatformIdOk() (ret OrganizationDeleteResponseGetPlatformIdRetType, ok bool) { + return getOrganizationDeleteResponseGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrganizationDeleteResponse) SetPlatformId(v OrganizationDeleteResponseGetPlatformIdRetType) { + setOrganizationDeleteResponseGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrganizationDeleteResponse) GetProjectId() (ret OrganizationDeleteResponseGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrganizationDeleteResponse) GetProjectIdOk() (ret OrganizationDeleteResponseGetProjectIdRetType, ok bool) { + return getOrganizationDeleteResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrganizationDeleteResponse) SetProjectId(v OrganizationDeleteResponseGetProjectIdRetType) { + setOrganizationDeleteResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrganizationDeleteResponse) GetRegion() (ret OrganizationDeleteResponseGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrganizationDeleteResponse) GetRegionOk() (ret OrganizationDeleteResponseGetRegionRetType, ok bool) { + return getOrganizationDeleteResponseGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrganizationDeleteResponse) SetRegion(v OrganizationDeleteResponseGetRegionRetType) { + setOrganizationDeleteResponseGetRegionAttributeType(&o.Region, v) +} + +func (o OrganizationDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationDeleteResponseGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrganizationDeleteResponseGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationDeleteResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationDeleteResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + return toSerialize, nil +} + +type NullableOrganizationDeleteResponse struct { + value *OrganizationDeleteResponse + isSet bool +} + +func (v NullableOrganizationDeleteResponse) Get() *OrganizationDeleteResponse { + return v.value +} + +func (v *NullableOrganizationDeleteResponse) Set(val *OrganizationDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationDeleteResponse(val *OrganizationDeleteResponse) *NullableOrganizationDeleteResponse { + return &NullableOrganizationDeleteResponse{value: val, isSet: true} +} + +func (v NullableOrganizationDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organization_delete_response_test.go b/services/scf/model_organization_delete_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organization_delete_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organization_quota.go b/services/scf/model_organization_quota.go new file mode 100644 index 000000000..a7eea8e16 --- /dev/null +++ b/services/scf/model_organization_quota.go @@ -0,0 +1,302 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrganizationQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationQuota{} + +/* + types and functions for orgId +*/ + +// isNotNullableString +type OrganizationQuotaGetOrgIdAttributeType = *string + +func getOrganizationQuotaGetOrgIdAttributeTypeOk(arg OrganizationQuotaGetOrgIdAttributeType) (ret OrganizationQuotaGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationQuotaGetOrgIdAttributeType(arg *OrganizationQuotaGetOrgIdAttributeType, val OrganizationQuotaGetOrgIdRetType) { + *arg = &val +} + +type OrganizationQuotaGetOrgIdArgType = string +type OrganizationQuotaGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationQuotaGetPlatformIdAttributeType = *string + +func getOrganizationQuotaGetPlatformIdAttributeTypeOk(arg OrganizationQuotaGetPlatformIdAttributeType) (ret OrganizationQuotaGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationQuotaGetPlatformIdAttributeType(arg *OrganizationQuotaGetPlatformIdAttributeType, val OrganizationQuotaGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationQuotaGetPlatformIdArgType = string +type OrganizationQuotaGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationQuotaGetProjectIdAttributeType = *string + +func getOrganizationQuotaGetProjectIdAttributeTypeOk(arg OrganizationQuotaGetProjectIdAttributeType) (ret OrganizationQuotaGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationQuotaGetProjectIdAttributeType(arg *OrganizationQuotaGetProjectIdAttributeType, val OrganizationQuotaGetProjectIdRetType) { + *arg = &val +} + +type OrganizationQuotaGetProjectIdArgType = string +type OrganizationQuotaGetProjectIdRetType = string + +/* + types and functions for quotaId +*/ + +// isNotNullableString +type OrganizationQuotaGetQuotaIdAttributeType = *string + +func getOrganizationQuotaGetQuotaIdAttributeTypeOk(arg OrganizationQuotaGetQuotaIdAttributeType) (ret OrganizationQuotaGetQuotaIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationQuotaGetQuotaIdAttributeType(arg *OrganizationQuotaGetQuotaIdAttributeType, val OrganizationQuotaGetQuotaIdRetType) { + *arg = &val +} + +type OrganizationQuotaGetQuotaIdArgType = string +type OrganizationQuotaGetQuotaIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationQuotaGetRegionAttributeType = *string + +func getOrganizationQuotaGetRegionAttributeTypeOk(arg OrganizationQuotaGetRegionAttributeType) (ret OrganizationQuotaGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationQuotaGetRegionAttributeType(arg *OrganizationQuotaGetRegionAttributeType, val OrganizationQuotaGetRegionRetType) { + *arg = &val +} + +type OrganizationQuotaGetRegionArgType = string +type OrganizationQuotaGetRegionRetType = string + +// OrganizationQuota struct for OrganizationQuota +type OrganizationQuota struct { + // REQUIRED + OrgId OrganizationQuotaGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + PlatformId OrganizationQuotaGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationQuotaGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + QuotaId OrganizationQuotaGetQuotaIdAttributeType `json:"quotaId" required:"true"` + // REQUIRED + Region OrganizationQuotaGetRegionAttributeType `json:"region" required:"true"` +} + +type _OrganizationQuota OrganizationQuota + +// NewOrganizationQuota instantiates a new OrganizationQuota 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 NewOrganizationQuota(orgId OrganizationQuotaGetOrgIdArgType, platformId OrganizationQuotaGetPlatformIdArgType, projectId OrganizationQuotaGetProjectIdArgType, quotaId OrganizationQuotaGetQuotaIdArgType, region OrganizationQuotaGetRegionArgType) *OrganizationQuota { + this := OrganizationQuota{} + setOrganizationQuotaGetOrgIdAttributeType(&this.OrgId, orgId) + setOrganizationQuotaGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationQuotaGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationQuotaGetQuotaIdAttributeType(&this.QuotaId, quotaId) + setOrganizationQuotaGetRegionAttributeType(&this.Region, region) + return &this +} + +// NewOrganizationQuotaWithDefaults instantiates a new OrganizationQuota 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 NewOrganizationQuotaWithDefaults() *OrganizationQuota { + this := OrganizationQuota{} + return &this +} + +// GetOrgId returns the OrgId field value +func (o *OrganizationQuota) GetOrgId() (ret OrganizationQuotaGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *OrganizationQuota) GetOrgIdOk() (ret OrganizationQuotaGetOrgIdRetType, ok bool) { + return getOrganizationQuotaGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *OrganizationQuota) SetOrgId(v OrganizationQuotaGetOrgIdRetType) { + setOrganizationQuotaGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrganizationQuota) GetPlatformId() (ret OrganizationQuotaGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrganizationQuota) GetPlatformIdOk() (ret OrganizationQuotaGetPlatformIdRetType, ok bool) { + return getOrganizationQuotaGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrganizationQuota) SetPlatformId(v OrganizationQuotaGetPlatformIdRetType) { + setOrganizationQuotaGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrganizationQuota) GetProjectId() (ret OrganizationQuotaGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrganizationQuota) GetProjectIdOk() (ret OrganizationQuotaGetProjectIdRetType, ok bool) { + return getOrganizationQuotaGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrganizationQuota) SetProjectId(v OrganizationQuotaGetProjectIdRetType) { + setOrganizationQuotaGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetQuotaId returns the QuotaId field value +func (o *OrganizationQuota) GetQuotaId() (ret OrganizationQuotaGetQuotaIdRetType) { + ret, _ = o.GetQuotaIdOk() + return ret +} + +// GetQuotaIdOk returns a tuple with the QuotaId field value +// and a boolean to check if the value has been set. +func (o *OrganizationQuota) GetQuotaIdOk() (ret OrganizationQuotaGetQuotaIdRetType, ok bool) { + return getOrganizationQuotaGetQuotaIdAttributeTypeOk(o.QuotaId) +} + +// SetQuotaId sets field value +func (o *OrganizationQuota) SetQuotaId(v OrganizationQuotaGetQuotaIdRetType) { + setOrganizationQuotaGetQuotaIdAttributeType(&o.QuotaId, v) +} + +// GetRegion returns the Region field value +func (o *OrganizationQuota) GetRegion() (ret OrganizationQuotaGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrganizationQuota) GetRegionOk() (ret OrganizationQuotaGetRegionRetType, ok bool) { + return getOrganizationQuotaGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrganizationQuota) SetRegion(v OrganizationQuotaGetRegionRetType) { + setOrganizationQuotaGetRegionAttributeType(&o.Region, v) +} + +func (o OrganizationQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationQuotaGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getOrganizationQuotaGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationQuotaGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationQuotaGetQuotaIdAttributeTypeOk(o.QuotaId); ok { + toSerialize["QuotaId"] = val + } + if val, ok := getOrganizationQuotaGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + return toSerialize, nil +} + +type NullableOrganizationQuota struct { + value *OrganizationQuota + isSet bool +} + +func (v NullableOrganizationQuota) Get() *OrganizationQuota { + return v.value +} + +func (v *NullableOrganizationQuota) Set(val *OrganizationQuota) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationQuota(val *OrganizationQuota) *NullableOrganizationQuota { + return &NullableOrganizationQuota{value: val, isSet: true} +} + +func (v NullableOrganizationQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organization_quota_test.go b/services/scf/model_organization_quota_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organization_quota_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organization_test.go b/services/scf/model_organization_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organization_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organization_usage_summary.go b/services/scf/model_organization_usage_summary.go new file mode 100644 index 000000000..1280708fe --- /dev/null +++ b/services/scf/model_organization_usage_summary.go @@ -0,0 +1,301 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrganizationUsageSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationUsageSummary{} + +/* + types and functions for orgId +*/ + +// isNotNullableString +type OrganizationUsageSummaryGetOrgIdAttributeType = *string + +func getOrganizationUsageSummaryGetOrgIdAttributeTypeOk(arg OrganizationUsageSummaryGetOrgIdAttributeType) (ret OrganizationUsageSummaryGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationUsageSummaryGetOrgIdAttributeType(arg *OrganizationUsageSummaryGetOrgIdAttributeType, val OrganizationUsageSummaryGetOrgIdRetType) { + *arg = &val +} + +type OrganizationUsageSummaryGetOrgIdArgType = string +type OrganizationUsageSummaryGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationUsageSummaryGetPlatformIdAttributeType = *string + +func getOrganizationUsageSummaryGetPlatformIdAttributeTypeOk(arg OrganizationUsageSummaryGetPlatformIdAttributeType) (ret OrganizationUsageSummaryGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationUsageSummaryGetPlatformIdAttributeType(arg *OrganizationUsageSummaryGetPlatformIdAttributeType, val OrganizationUsageSummaryGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationUsageSummaryGetPlatformIdArgType = string +type OrganizationUsageSummaryGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationUsageSummaryGetProjectIdAttributeType = *string + +func getOrganizationUsageSummaryGetProjectIdAttributeTypeOk(arg OrganizationUsageSummaryGetProjectIdAttributeType) (ret OrganizationUsageSummaryGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationUsageSummaryGetProjectIdAttributeType(arg *OrganizationUsageSummaryGetProjectIdAttributeType, val OrganizationUsageSummaryGetProjectIdRetType) { + *arg = &val +} + +type OrganizationUsageSummaryGetProjectIdArgType = string +type OrganizationUsageSummaryGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationUsageSummaryGetRegionAttributeType = *string + +func getOrganizationUsageSummaryGetRegionAttributeTypeOk(arg OrganizationUsageSummaryGetRegionAttributeType) (ret OrganizationUsageSummaryGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationUsageSummaryGetRegionAttributeType(arg *OrganizationUsageSummaryGetRegionAttributeType, val OrganizationUsageSummaryGetRegionRetType) { + *arg = &val +} + +type OrganizationUsageSummaryGetRegionArgType = string +type OrganizationUsageSummaryGetRegionRetType = string + +/* + types and functions for usageSummary +*/ + +// isModel +type OrganizationUsageSummaryGetUsageSummaryAttributeType = *UsageSummary +type OrganizationUsageSummaryGetUsageSummaryArgType = UsageSummary +type OrganizationUsageSummaryGetUsageSummaryRetType = UsageSummary + +func getOrganizationUsageSummaryGetUsageSummaryAttributeTypeOk(arg OrganizationUsageSummaryGetUsageSummaryAttributeType) (ret OrganizationUsageSummaryGetUsageSummaryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationUsageSummaryGetUsageSummaryAttributeType(arg *OrganizationUsageSummaryGetUsageSummaryAttributeType, val OrganizationUsageSummaryGetUsageSummaryRetType) { + *arg = &val +} + +// OrganizationUsageSummary struct for OrganizationUsageSummary +type OrganizationUsageSummary struct { + // REQUIRED + OrgId OrganizationUsageSummaryGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + PlatformId OrganizationUsageSummaryGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationUsageSummaryGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region OrganizationUsageSummaryGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + UsageSummary OrganizationUsageSummaryGetUsageSummaryAttributeType `json:"usageSummary" required:"true"` +} + +type _OrganizationUsageSummary OrganizationUsageSummary + +// NewOrganizationUsageSummary instantiates a new OrganizationUsageSummary 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 NewOrganizationUsageSummary(orgId OrganizationUsageSummaryGetOrgIdArgType, platformId OrganizationUsageSummaryGetPlatformIdArgType, projectId OrganizationUsageSummaryGetProjectIdArgType, region OrganizationUsageSummaryGetRegionArgType, usageSummary OrganizationUsageSummaryGetUsageSummaryArgType) *OrganizationUsageSummary { + this := OrganizationUsageSummary{} + setOrganizationUsageSummaryGetOrgIdAttributeType(&this.OrgId, orgId) + setOrganizationUsageSummaryGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationUsageSummaryGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationUsageSummaryGetRegionAttributeType(&this.Region, region) + setOrganizationUsageSummaryGetUsageSummaryAttributeType(&this.UsageSummary, usageSummary) + return &this +} + +// NewOrganizationUsageSummaryWithDefaults instantiates a new OrganizationUsageSummary 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 NewOrganizationUsageSummaryWithDefaults() *OrganizationUsageSummary { + this := OrganizationUsageSummary{} + return &this +} + +// GetOrgId returns the OrgId field value +func (o *OrganizationUsageSummary) GetOrgId() (ret OrganizationUsageSummaryGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *OrganizationUsageSummary) GetOrgIdOk() (ret OrganizationUsageSummaryGetOrgIdRetType, ok bool) { + return getOrganizationUsageSummaryGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *OrganizationUsageSummary) SetOrgId(v OrganizationUsageSummaryGetOrgIdRetType) { + setOrganizationUsageSummaryGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrganizationUsageSummary) GetPlatformId() (ret OrganizationUsageSummaryGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrganizationUsageSummary) GetPlatformIdOk() (ret OrganizationUsageSummaryGetPlatformIdRetType, ok bool) { + return getOrganizationUsageSummaryGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrganizationUsageSummary) SetPlatformId(v OrganizationUsageSummaryGetPlatformIdRetType) { + setOrganizationUsageSummaryGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrganizationUsageSummary) GetProjectId() (ret OrganizationUsageSummaryGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrganizationUsageSummary) GetProjectIdOk() (ret OrganizationUsageSummaryGetProjectIdRetType, ok bool) { + return getOrganizationUsageSummaryGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrganizationUsageSummary) SetProjectId(v OrganizationUsageSummaryGetProjectIdRetType) { + setOrganizationUsageSummaryGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *OrganizationUsageSummary) GetRegion() (ret OrganizationUsageSummaryGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrganizationUsageSummary) GetRegionOk() (ret OrganizationUsageSummaryGetRegionRetType, ok bool) { + return getOrganizationUsageSummaryGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrganizationUsageSummary) SetRegion(v OrganizationUsageSummaryGetRegionRetType) { + setOrganizationUsageSummaryGetRegionAttributeType(&o.Region, v) +} + +// GetUsageSummary returns the UsageSummary field value +func (o *OrganizationUsageSummary) GetUsageSummary() (ret OrganizationUsageSummaryGetUsageSummaryRetType) { + ret, _ = o.GetUsageSummaryOk() + return ret +} + +// GetUsageSummaryOk returns a tuple with the UsageSummary field value +// and a boolean to check if the value has been set. +func (o *OrganizationUsageSummary) GetUsageSummaryOk() (ret OrganizationUsageSummaryGetUsageSummaryRetType, ok bool) { + return getOrganizationUsageSummaryGetUsageSummaryAttributeTypeOk(o.UsageSummary) +} + +// SetUsageSummary sets field value +func (o *OrganizationUsageSummary) SetUsageSummary(v OrganizationUsageSummaryGetUsageSummaryRetType) { + setOrganizationUsageSummaryGetUsageSummaryAttributeType(&o.UsageSummary, v) +} + +func (o OrganizationUsageSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationUsageSummaryGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getOrganizationUsageSummaryGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationUsageSummaryGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationUsageSummaryGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrganizationUsageSummaryGetUsageSummaryAttributeTypeOk(o.UsageSummary); ok { + toSerialize["UsageSummary"] = val + } + return toSerialize, nil +} + +type NullableOrganizationUsageSummary struct { + value *OrganizationUsageSummary + isSet bool +} + +func (v NullableOrganizationUsageSummary) Get() *OrganizationUsageSummary { + return v.value +} + +func (v *NullableOrganizationUsageSummary) Set(val *OrganizationUsageSummary) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationUsageSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationUsageSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationUsageSummary(val *OrganizationUsageSummary) *NullableOrganizationUsageSummary { + return &NullableOrganizationUsageSummary{value: val, isSet: true} +} + +func (v NullableOrganizationUsageSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationUsageSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organization_usage_summary_test.go b/services/scf/model_organization_usage_summary_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organization_usage_summary_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organizations_list.go b/services/scf/model_organizations_list.go new file mode 100644 index 000000000..6e10f6bc9 --- /dev/null +++ b/services/scf/model_organizations_list.go @@ -0,0 +1,168 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the OrganizationsList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationsList{} + +/* + types and functions for pagination +*/ + +// isModel +type OrganizationsListGetPaginationAttributeType = *Pagination +type OrganizationsListGetPaginationArgType = Pagination +type OrganizationsListGetPaginationRetType = Pagination + +func getOrganizationsListGetPaginationAttributeTypeOk(arg OrganizationsListGetPaginationAttributeType) (ret OrganizationsListGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListGetPaginationAttributeType(arg *OrganizationsListGetPaginationAttributeType, val OrganizationsListGetPaginationRetType) { + *arg = &val +} + +/* + types and functions for resources +*/ + +// isArray +type OrganizationsListGetResourcesAttributeType = *[]OrganizationsListItem +type OrganizationsListGetResourcesArgType = []OrganizationsListItem +type OrganizationsListGetResourcesRetType = []OrganizationsListItem + +func getOrganizationsListGetResourcesAttributeTypeOk(arg OrganizationsListGetResourcesAttributeType) (ret OrganizationsListGetResourcesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListGetResourcesAttributeType(arg *OrganizationsListGetResourcesAttributeType, val OrganizationsListGetResourcesRetType) { + *arg = &val +} + +// OrganizationsList struct for OrganizationsList +type OrganizationsList struct { + // REQUIRED + Pagination OrganizationsListGetPaginationAttributeType `json:"pagination" required:"true"` + // REQUIRED + Resources OrganizationsListGetResourcesAttributeType `json:"resources" required:"true"` +} + +type _OrganizationsList OrganizationsList + +// NewOrganizationsList instantiates a new OrganizationsList 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 NewOrganizationsList(pagination OrganizationsListGetPaginationArgType, resources OrganizationsListGetResourcesArgType) *OrganizationsList { + this := OrganizationsList{} + setOrganizationsListGetPaginationAttributeType(&this.Pagination, pagination) + setOrganizationsListGetResourcesAttributeType(&this.Resources, resources) + return &this +} + +// NewOrganizationsListWithDefaults instantiates a new OrganizationsList 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 NewOrganizationsListWithDefaults() *OrganizationsList { + this := OrganizationsList{} + return &this +} + +// GetPagination returns the Pagination field value +func (o *OrganizationsList) GetPagination() (ret OrganizationsListGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *OrganizationsList) GetPaginationOk() (ret OrganizationsListGetPaginationRetType, ok bool) { + return getOrganizationsListGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +func (o *OrganizationsList) SetPagination(v OrganizationsListGetPaginationRetType) { + setOrganizationsListGetPaginationAttributeType(&o.Pagination, v) +} + +// GetResources returns the Resources field value +func (o *OrganizationsList) GetResources() (ret OrganizationsListGetResourcesRetType) { + ret, _ = o.GetResourcesOk() + return ret +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *OrganizationsList) GetResourcesOk() (ret OrganizationsListGetResourcesRetType, ok bool) { + return getOrganizationsListGetResourcesAttributeTypeOk(o.Resources) +} + +// SetResources sets field value +func (o *OrganizationsList) SetResources(v OrganizationsListGetResourcesRetType) { + setOrganizationsListGetResourcesAttributeType(&o.Resources, v) +} + +func (o OrganizationsList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationsListGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } + if val, ok := getOrganizationsListGetResourcesAttributeTypeOk(o.Resources); ok { + toSerialize["Resources"] = val + } + return toSerialize, nil +} + +type NullableOrganizationsList struct { + value *OrganizationsList + isSet bool +} + +func (v NullableOrganizationsList) Get() *OrganizationsList { + return v.value +} + +func (v *NullableOrganizationsList) Set(val *OrganizationsList) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationsList) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationsList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationsList(val *OrganizationsList) *NullableOrganizationsList { + return &NullableOrganizationsList{value: val, isSet: true} +} + +func (v NullableOrganizationsList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationsList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organizations_list_item.go b/services/scf/model_organizations_list_item.go new file mode 100644 index 000000000..ef86abdfc --- /dev/null +++ b/services/scf/model_organizations_list_item.go @@ -0,0 +1,541 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the OrganizationsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationsListItem{} + +/* + types and functions for createdAt +*/ + +// isDateTime +type OrganizationsListItemGetCreatedAtAttributeType = *time.Time +type OrganizationsListItemGetCreatedAtArgType = time.Time +type OrganizationsListItemGetCreatedAtRetType = time.Time + +func getOrganizationsListItemGetCreatedAtAttributeTypeOk(arg OrganizationsListItemGetCreatedAtAttributeType) (ret OrganizationsListItemGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetCreatedAtAttributeType(arg *OrganizationsListItemGetCreatedAtAttributeType, val OrganizationsListItemGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type OrganizationsListItemGetGuidAttributeType = *string + +func getOrganizationsListItemGetGuidAttributeTypeOk(arg OrganizationsListItemGetGuidAttributeType) (ret OrganizationsListItemGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetGuidAttributeType(arg *OrganizationsListItemGetGuidAttributeType, val OrganizationsListItemGetGuidRetType) { + *arg = &val +} + +type OrganizationsListItemGetGuidArgType = string +type OrganizationsListItemGetGuidRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type OrganizationsListItemGetNameAttributeType = *string + +func getOrganizationsListItemGetNameAttributeTypeOk(arg OrganizationsListItemGetNameAttributeType) (ret OrganizationsListItemGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetNameAttributeType(arg *OrganizationsListItemGetNameAttributeType, val OrganizationsListItemGetNameRetType) { + *arg = &val +} + +type OrganizationsListItemGetNameArgType = string +type OrganizationsListItemGetNameRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type OrganizationsListItemGetPlatformIdAttributeType = *string + +func getOrganizationsListItemGetPlatformIdAttributeTypeOk(arg OrganizationsListItemGetPlatformIdAttributeType) (ret OrganizationsListItemGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetPlatformIdAttributeType(arg *OrganizationsListItemGetPlatformIdAttributeType, val OrganizationsListItemGetPlatformIdRetType) { + *arg = &val +} + +type OrganizationsListItemGetPlatformIdArgType = string +type OrganizationsListItemGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type OrganizationsListItemGetProjectIdAttributeType = *string + +func getOrganizationsListItemGetProjectIdAttributeTypeOk(arg OrganizationsListItemGetProjectIdAttributeType) (ret OrganizationsListItemGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetProjectIdAttributeType(arg *OrganizationsListItemGetProjectIdAttributeType, val OrganizationsListItemGetProjectIdRetType) { + *arg = &val +} + +type OrganizationsListItemGetProjectIdArgType = string +type OrganizationsListItemGetProjectIdRetType = string + +/* + types and functions for quotaId +*/ + +// isNotNullableString +type OrganizationsListItemGetQuotaIdAttributeType = *string + +func getOrganizationsListItemGetQuotaIdAttributeTypeOk(arg OrganizationsListItemGetQuotaIdAttributeType) (ret OrganizationsListItemGetQuotaIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetQuotaIdAttributeType(arg *OrganizationsListItemGetQuotaIdAttributeType, val OrganizationsListItemGetQuotaIdRetType) { + *arg = &val +} + +type OrganizationsListItemGetQuotaIdArgType = string +type OrganizationsListItemGetQuotaIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type OrganizationsListItemGetRegionAttributeType = *string + +func getOrganizationsListItemGetRegionAttributeTypeOk(arg OrganizationsListItemGetRegionAttributeType) (ret OrganizationsListItemGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetRegionAttributeType(arg *OrganizationsListItemGetRegionAttributeType, val OrganizationsListItemGetRegionRetType) { + *arg = &val +} + +type OrganizationsListItemGetRegionArgType = string +type OrganizationsListItemGetRegionRetType = string + +/* + types and functions for status +*/ + +// isNotNullableString +type OrganizationsListItemGetStatusAttributeType = *string + +func getOrganizationsListItemGetStatusAttributeTypeOk(arg OrganizationsListItemGetStatusAttributeType) (ret OrganizationsListItemGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetStatusAttributeType(arg *OrganizationsListItemGetStatusAttributeType, val OrganizationsListItemGetStatusRetType) { + *arg = &val +} + +type OrganizationsListItemGetStatusArgType = string +type OrganizationsListItemGetStatusRetType = string + +/* + types and functions for suspended +*/ + +// isBoolean +type OrganizationsListItemgetSuspendedAttributeType = *bool +type OrganizationsListItemgetSuspendedArgType = bool +type OrganizationsListItemgetSuspendedRetType = bool + +func getOrganizationsListItemgetSuspendedAttributeTypeOk(arg OrganizationsListItemgetSuspendedAttributeType) (ret OrganizationsListItemgetSuspendedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemgetSuspendedAttributeType(arg *OrganizationsListItemgetSuspendedAttributeType, val OrganizationsListItemgetSuspendedRetType) { + *arg = &val +} + +/* + types and functions for updatedAt +*/ + +// isDateTime +type OrganizationsListItemGetUpdatedAtAttributeType = *time.Time +type OrganizationsListItemGetUpdatedAtArgType = time.Time +type OrganizationsListItemGetUpdatedAtRetType = time.Time + +func getOrganizationsListItemGetUpdatedAtAttributeTypeOk(arg OrganizationsListItemGetUpdatedAtAttributeType) (ret OrganizationsListItemGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOrganizationsListItemGetUpdatedAtAttributeType(arg *OrganizationsListItemGetUpdatedAtAttributeType, val OrganizationsListItemGetUpdatedAtRetType) { + *arg = &val +} + +// OrganizationsListItem struct for OrganizationsListItem +type OrganizationsListItem struct { + CreatedAt OrganizationsListItemGetCreatedAtAttributeType `json:"createdAt,omitempty"` + // REQUIRED + Guid OrganizationsListItemGetGuidAttributeType `json:"guid" required:"true"` + Name OrganizationsListItemGetNameAttributeType `json:"name,omitempty"` + // REQUIRED + PlatformId OrganizationsListItemGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId OrganizationsListItemGetProjectIdAttributeType `json:"projectId" required:"true"` + QuotaId OrganizationsListItemGetQuotaIdAttributeType `json:"quotaId,omitempty"` + // REQUIRED + Region OrganizationsListItemGetRegionAttributeType `json:"region" required:"true"` + // The organization's status. The status value starts with `deleting` when a deleting request is in progress. The status value starts with `delete_failed` when the deletion failed. The status value can be different from `deleting` and `delete_failed`. Additional details can be provided in the future. + // REQUIRED + Status OrganizationsListItemGetStatusAttributeType `json:"status" required:"true"` + Suspended OrganizationsListItemgetSuspendedAttributeType `json:"suspended,omitempty"` + UpdatedAt OrganizationsListItemGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` +} + +type _OrganizationsListItem OrganizationsListItem + +// NewOrganizationsListItem instantiates a new OrganizationsListItem 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 NewOrganizationsListItem(guid OrganizationsListItemGetGuidArgType, platformId OrganizationsListItemGetPlatformIdArgType, projectId OrganizationsListItemGetProjectIdArgType, region OrganizationsListItemGetRegionArgType, status OrganizationsListItemGetStatusArgType) *OrganizationsListItem { + this := OrganizationsListItem{} + setOrganizationsListItemGetGuidAttributeType(&this.Guid, guid) + setOrganizationsListItemGetPlatformIdAttributeType(&this.PlatformId, platformId) + setOrganizationsListItemGetProjectIdAttributeType(&this.ProjectId, projectId) + setOrganizationsListItemGetRegionAttributeType(&this.Region, region) + setOrganizationsListItemGetStatusAttributeType(&this.Status, status) + return &this +} + +// NewOrganizationsListItemWithDefaults instantiates a new OrganizationsListItem 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 NewOrganizationsListItemWithDefaults() *OrganizationsListItem { + this := OrganizationsListItem{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OrganizationsListItem) GetCreatedAt() (res OrganizationsListItemGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetCreatedAtOk() (ret OrganizationsListItemGetCreatedAtRetType, ok bool) { + return getOrganizationsListItemGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OrganizationsListItem) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *OrganizationsListItem) SetCreatedAt(v OrganizationsListItemGetCreatedAtRetType) { + setOrganizationsListItemGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetGuid returns the Guid field value +func (o *OrganizationsListItem) GetGuid() (ret OrganizationsListItemGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetGuidOk() (ret OrganizationsListItemGetGuidRetType, ok bool) { + return getOrganizationsListItemGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *OrganizationsListItem) SetGuid(v OrganizationsListItemGetGuidRetType) { + setOrganizationsListItemGetGuidAttributeType(&o.Guid, v) +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *OrganizationsListItem) GetName() (res OrganizationsListItemGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetNameOk() (ret OrganizationsListItemGetNameRetType, ok bool) { + return getOrganizationsListItemGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *OrganizationsListItem) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *OrganizationsListItem) SetName(v OrganizationsListItemGetNameRetType) { + setOrganizationsListItemGetNameAttributeType(&o.Name, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *OrganizationsListItem) GetPlatformId() (ret OrganizationsListItemGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetPlatformIdOk() (ret OrganizationsListItemGetPlatformIdRetType, ok bool) { + return getOrganizationsListItemGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *OrganizationsListItem) SetPlatformId(v OrganizationsListItemGetPlatformIdRetType) { + setOrganizationsListItemGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *OrganizationsListItem) GetProjectId() (ret OrganizationsListItemGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetProjectIdOk() (ret OrganizationsListItemGetProjectIdRetType, ok bool) { + return getOrganizationsListItemGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *OrganizationsListItem) SetProjectId(v OrganizationsListItemGetProjectIdRetType) { + setOrganizationsListItemGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetQuotaId returns the QuotaId field value if set, zero value otherwise. +func (o *OrganizationsListItem) GetQuotaId() (res OrganizationsListItemGetQuotaIdRetType) { + res, _ = o.GetQuotaIdOk() + return +} + +// GetQuotaIdOk returns a tuple with the QuotaId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetQuotaIdOk() (ret OrganizationsListItemGetQuotaIdRetType, ok bool) { + return getOrganizationsListItemGetQuotaIdAttributeTypeOk(o.QuotaId) +} + +// HasQuotaId returns a boolean if a field has been set. +func (o *OrganizationsListItem) HasQuotaId() bool { + _, ok := o.GetQuotaIdOk() + return ok +} + +// SetQuotaId gets a reference to the given string and assigns it to the QuotaId field. +func (o *OrganizationsListItem) SetQuotaId(v OrganizationsListItemGetQuotaIdRetType) { + setOrganizationsListItemGetQuotaIdAttributeType(&o.QuotaId, v) +} + +// GetRegion returns the Region field value +func (o *OrganizationsListItem) GetRegion() (ret OrganizationsListItemGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetRegionOk() (ret OrganizationsListItemGetRegionRetType, ok bool) { + return getOrganizationsListItemGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *OrganizationsListItem) SetRegion(v OrganizationsListItemGetRegionRetType) { + setOrganizationsListItemGetRegionAttributeType(&o.Region, v) +} + +// GetStatus returns the Status field value +func (o *OrganizationsListItem) GetStatus() (ret OrganizationsListItemGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetStatusOk() (ret OrganizationsListItemGetStatusRetType, ok bool) { + return getOrganizationsListItemGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +func (o *OrganizationsListItem) SetStatus(v OrganizationsListItemGetStatusRetType) { + setOrganizationsListItemGetStatusAttributeType(&o.Status, v) +} + +// GetSuspended returns the Suspended field value if set, zero value otherwise. +func (o *OrganizationsListItem) GetSuspended() (res OrganizationsListItemgetSuspendedRetType) { + res, _ = o.GetSuspendedOk() + return +} + +// GetSuspendedOk returns a tuple with the Suspended field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetSuspendedOk() (ret OrganizationsListItemgetSuspendedRetType, ok bool) { + return getOrganizationsListItemgetSuspendedAttributeTypeOk(o.Suspended) +} + +// HasSuspended returns a boolean if a field has been set. +func (o *OrganizationsListItem) HasSuspended() bool { + _, ok := o.GetSuspendedOk() + return ok +} + +// SetSuspended gets a reference to the given bool and assigns it to the Suspended field. +func (o *OrganizationsListItem) SetSuspended(v OrganizationsListItemgetSuspendedRetType) { + setOrganizationsListItemgetSuspendedAttributeType(&o.Suspended, v) +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *OrganizationsListItem) GetUpdatedAt() (res OrganizationsListItemGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrganizationsListItem) GetUpdatedAtOk() (ret OrganizationsListItemGetUpdatedAtRetType, ok bool) { + return getOrganizationsListItemGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *OrganizationsListItem) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *OrganizationsListItem) SetUpdatedAt(v OrganizationsListItemGetUpdatedAtRetType) { + setOrganizationsListItemGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +func (o OrganizationsListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getOrganizationsListItemGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getOrganizationsListItemGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getOrganizationsListItemGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getOrganizationsListItemGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getOrganizationsListItemGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getOrganizationsListItemGetQuotaIdAttributeTypeOk(o.QuotaId); ok { + toSerialize["QuotaId"] = val + } + if val, ok := getOrganizationsListItemGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getOrganizationsListItemGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getOrganizationsListItemgetSuspendedAttributeTypeOk(o.Suspended); ok { + toSerialize["Suspended"] = val + } + if val, ok := getOrganizationsListItemGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + return toSerialize, nil +} + +type NullableOrganizationsListItem struct { + value *OrganizationsListItem + isSet bool +} + +func (v NullableOrganizationsListItem) Get() *OrganizationsListItem { + return v.value +} + +func (v *NullableOrganizationsListItem) Set(val *OrganizationsListItem) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationsListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationsListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationsListItem(val *OrganizationsListItem) *NullableOrganizationsListItem { + return &NullableOrganizationsListItem{value: val, isSet: true} +} + +func (v NullableOrganizationsListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationsListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_organizations_list_item_test.go b/services/scf/model_organizations_list_item_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organizations_list_item_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_organizations_list_test.go b/services/scf/model_organizations_list_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_organizations_list_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_pagination.go b/services/scf/model_pagination.go new file mode 100644 index 000000000..5a5f51a65 --- /dev/null +++ b/services/scf/model_pagination.go @@ -0,0 +1,174 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + +/* + types and functions for totalPages +*/ + +// isLong +type PaginationGetTotalPagesAttributeType = *int64 +type PaginationGetTotalPagesArgType = int64 +type PaginationGetTotalPagesRetType = int64 + +func getPaginationGetTotalPagesAttributeTypeOk(arg PaginationGetTotalPagesAttributeType) (ret PaginationGetTotalPagesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPaginationGetTotalPagesAttributeType(arg *PaginationGetTotalPagesAttributeType, val PaginationGetTotalPagesRetType) { + *arg = &val +} + +/* + types and functions for totalResults +*/ + +// isLong +type PaginationGetTotalResultsAttributeType = *int64 +type PaginationGetTotalResultsArgType = int64 +type PaginationGetTotalResultsRetType = int64 + +func getPaginationGetTotalResultsAttributeTypeOk(arg PaginationGetTotalResultsAttributeType) (ret PaginationGetTotalResultsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPaginationGetTotalResultsAttributeType(arg *PaginationGetTotalResultsAttributeType, val PaginationGetTotalResultsRetType) { + *arg = &val +} + +// Pagination struct for Pagination +type Pagination struct { + TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages,omitempty"` + TotalResults PaginationGetTotalResultsAttributeType `json:"totalResults,omitempty"` +} + +// NewPagination instantiates a new Pagination 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 NewPagination() *Pagination { + this := Pagination{} + return &this +} + +// NewPaginationWithDefaults instantiates a new Pagination 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 NewPaginationWithDefaults() *Pagination { + this := Pagination{} + return &this +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *Pagination) GetTotalPages() (res PaginationGetTotalPagesRetType) { + res, _ = o.GetTotalPagesOk() + return +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalPagesOk() (ret PaginationGetTotalPagesRetType, ok bool) { + return getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages) +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *Pagination) HasTotalPages() bool { + _, ok := o.GetTotalPagesOk() + return ok +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *Pagination) SetTotalPages(v PaginationGetTotalPagesRetType) { + setPaginationGetTotalPagesAttributeType(&o.TotalPages, v) +} + +// GetTotalResults returns the TotalResults field value if set, zero value otherwise. +func (o *Pagination) GetTotalResults() (res PaginationGetTotalResultsRetType) { + res, _ = o.GetTotalResultsOk() + return +} + +// GetTotalResultsOk returns a tuple with the TotalResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalResultsOk() (ret PaginationGetTotalResultsRetType, ok bool) { + return getPaginationGetTotalResultsAttributeTypeOk(o.TotalResults) +} + +// HasTotalResults returns a boolean if a field has been set. +func (o *Pagination) HasTotalResults() bool { + _, ok := o.GetTotalResultsOk() + return ok +} + +// SetTotalResults gets a reference to the given int64 and assigns it to the TotalResults field. +func (o *Pagination) SetTotalResults(v PaginationGetTotalResultsRetType) { + setPaginationGetTotalResultsAttributeType(&o.TotalResults, v) +} + +func (o Pagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages); ok { + toSerialize["TotalPages"] = val + } + if val, ok := getPaginationGetTotalResultsAttributeTypeOk(o.TotalResults); ok { + toSerialize["TotalResults"] = val + } + return toSerialize, nil +} + +type NullablePagination struct { + value *Pagination + isSet bool +} + +func (v NullablePagination) Get() *Pagination { + return v.value +} + +func (v *NullablePagination) Set(val *Pagination) { + v.value = val + v.isSet = true +} + +func (v NullablePagination) IsSet() bool { + return v.isSet +} + +func (v *NullablePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePagination(val *Pagination) *NullablePagination { + return &NullablePagination{value: val, isSet: true} +} + +func (v NullablePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_pagination_test.go b/services/scf/model_pagination_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_pagination_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_platform_list.go b/services/scf/model_platform_list.go new file mode 100644 index 000000000..bcf07c901 --- /dev/null +++ b/services/scf/model_platform_list.go @@ -0,0 +1,168 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the PlatformList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlatformList{} + +/* + types and functions for pagination +*/ + +// isModel +type PlatformListGetPaginationAttributeType = *Pagination +type PlatformListGetPaginationArgType = Pagination +type PlatformListGetPaginationRetType = Pagination + +func getPlatformListGetPaginationAttributeTypeOk(arg PlatformListGetPaginationAttributeType) (ret PlatformListGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformListGetPaginationAttributeType(arg *PlatformListGetPaginationAttributeType, val PlatformListGetPaginationRetType) { + *arg = &val +} + +/* + types and functions for resources +*/ + +// isArray +type PlatformListGetResourcesAttributeType = *[]Platforms +type PlatformListGetResourcesArgType = []Platforms +type PlatformListGetResourcesRetType = []Platforms + +func getPlatformListGetResourcesAttributeTypeOk(arg PlatformListGetResourcesAttributeType) (ret PlatformListGetResourcesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformListGetResourcesAttributeType(arg *PlatformListGetResourcesAttributeType, val PlatformListGetResourcesRetType) { + *arg = &val +} + +// PlatformList struct for PlatformList +type PlatformList struct { + // REQUIRED + Pagination PlatformListGetPaginationAttributeType `json:"pagination" required:"true"` + // REQUIRED + Resources PlatformListGetResourcesAttributeType `json:"resources" required:"true"` +} + +type _PlatformList PlatformList + +// NewPlatformList instantiates a new PlatformList 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 NewPlatformList(pagination PlatformListGetPaginationArgType, resources PlatformListGetResourcesArgType) *PlatformList { + this := PlatformList{} + setPlatformListGetPaginationAttributeType(&this.Pagination, pagination) + setPlatformListGetResourcesAttributeType(&this.Resources, resources) + return &this +} + +// NewPlatformListWithDefaults instantiates a new PlatformList 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 NewPlatformListWithDefaults() *PlatformList { + this := PlatformList{} + return &this +} + +// GetPagination returns the Pagination field value +func (o *PlatformList) GetPagination() (ret PlatformListGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *PlatformList) GetPaginationOk() (ret PlatformListGetPaginationRetType, ok bool) { + return getPlatformListGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +func (o *PlatformList) SetPagination(v PlatformListGetPaginationRetType) { + setPlatformListGetPaginationAttributeType(&o.Pagination, v) +} + +// GetResources returns the Resources field value +func (o *PlatformList) GetResources() (ret PlatformListGetResourcesRetType) { + ret, _ = o.GetResourcesOk() + return ret +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *PlatformList) GetResourcesOk() (ret PlatformListGetResourcesRetType, ok bool) { + return getPlatformListGetResourcesAttributeTypeOk(o.Resources) +} + +// SetResources sets field value +func (o *PlatformList) SetResources(v PlatformListGetResourcesRetType) { + setPlatformListGetResourcesAttributeType(&o.Resources, v) +} + +func (o PlatformList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPlatformListGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } + if val, ok := getPlatformListGetResourcesAttributeTypeOk(o.Resources); ok { + toSerialize["Resources"] = val + } + return toSerialize, nil +} + +type NullablePlatformList struct { + value *PlatformList + isSet bool +} + +func (v NullablePlatformList) Get() *PlatformList { + return v.value +} + +func (v *NullablePlatformList) Set(val *PlatformList) { + v.value = val + v.isSet = true +} + +func (v NullablePlatformList) IsSet() bool { + return v.isSet +} + +func (v *NullablePlatformList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlatformList(val *PlatformList) *NullablePlatformList { + return &NullablePlatformList{value: val, isSet: true} +} + +func (v NullablePlatformList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlatformList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_platform_list_test.go b/services/scf/model_platform_list_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_platform_list_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_platforms.go b/services/scf/model_platforms.go new file mode 100644 index 000000000..42e638d54 --- /dev/null +++ b/services/scf/model_platforms.go @@ -0,0 +1,350 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the Platforms type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Platforms{} + +/* + types and functions for apiUrl +*/ + +// isNotNullableString +type PlatformsGetApiUrlAttributeType = *string + +func getPlatformsGetApiUrlAttributeTypeOk(arg PlatformsGetApiUrlAttributeType) (ret PlatformsGetApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetApiUrlAttributeType(arg *PlatformsGetApiUrlAttributeType, val PlatformsGetApiUrlRetType) { + *arg = &val +} + +type PlatformsGetApiUrlArgType = string +type PlatformsGetApiUrlRetType = string + +/* + types and functions for consoleUrl +*/ + +// isNotNullableString +type PlatformsGetConsoleUrlAttributeType = *string + +func getPlatformsGetConsoleUrlAttributeTypeOk(arg PlatformsGetConsoleUrlAttributeType) (ret PlatformsGetConsoleUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetConsoleUrlAttributeType(arg *PlatformsGetConsoleUrlAttributeType, val PlatformsGetConsoleUrlRetType) { + *arg = &val +} + +type PlatformsGetConsoleUrlArgType = string +type PlatformsGetConsoleUrlRetType = string + +/* + types and functions for displayName +*/ + +// isNotNullableString +type PlatformsGetDisplayNameAttributeType = *string + +func getPlatformsGetDisplayNameAttributeTypeOk(arg PlatformsGetDisplayNameAttributeType) (ret PlatformsGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetDisplayNameAttributeType(arg *PlatformsGetDisplayNameAttributeType, val PlatformsGetDisplayNameRetType) { + *arg = &val +} + +type PlatformsGetDisplayNameArgType = string +type PlatformsGetDisplayNameRetType = string + +/* + types and functions for guid +*/ + +// isNotNullableString +type PlatformsGetGuidAttributeType = *string + +func getPlatformsGetGuidAttributeTypeOk(arg PlatformsGetGuidAttributeType) (ret PlatformsGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetGuidAttributeType(arg *PlatformsGetGuidAttributeType, val PlatformsGetGuidRetType) { + *arg = &val +} + +type PlatformsGetGuidArgType = string +type PlatformsGetGuidRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type PlatformsGetRegionAttributeType = *string + +func getPlatformsGetRegionAttributeTypeOk(arg PlatformsGetRegionAttributeType) (ret PlatformsGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetRegionAttributeType(arg *PlatformsGetRegionAttributeType, val PlatformsGetRegionRetType) { + *arg = &val +} + +type PlatformsGetRegionArgType = string +type PlatformsGetRegionRetType = string + +/* + types and functions for systemId +*/ + +// isNotNullableString +type PlatformsGetSystemIdAttributeType = *string + +func getPlatformsGetSystemIdAttributeTypeOk(arg PlatformsGetSystemIdAttributeType) (ret PlatformsGetSystemIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlatformsGetSystemIdAttributeType(arg *PlatformsGetSystemIdAttributeType, val PlatformsGetSystemIdRetType) { + *arg = &val +} + +type PlatformsGetSystemIdArgType = string +type PlatformsGetSystemIdRetType = string + +// Platforms struct for Platforms +type Platforms struct { + // REQUIRED + ApiUrl PlatformsGetApiUrlAttributeType `json:"apiUrl" required:"true"` + ConsoleUrl PlatformsGetConsoleUrlAttributeType `json:"consoleUrl,omitempty"` + // REQUIRED + DisplayName PlatformsGetDisplayNameAttributeType `json:"displayName" required:"true"` + // REQUIRED + Guid PlatformsGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + Region PlatformsGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + SystemId PlatformsGetSystemIdAttributeType `json:"systemId" required:"true"` +} + +type _Platforms Platforms + +// NewPlatforms instantiates a new Platforms 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 NewPlatforms(apiUrl PlatformsGetApiUrlArgType, displayName PlatformsGetDisplayNameArgType, guid PlatformsGetGuidArgType, region PlatformsGetRegionArgType, systemId PlatformsGetSystemIdArgType) *Platforms { + this := Platforms{} + setPlatformsGetApiUrlAttributeType(&this.ApiUrl, apiUrl) + setPlatformsGetDisplayNameAttributeType(&this.DisplayName, displayName) + setPlatformsGetGuidAttributeType(&this.Guid, guid) + setPlatformsGetRegionAttributeType(&this.Region, region) + setPlatformsGetSystemIdAttributeType(&this.SystemId, systemId) + return &this +} + +// NewPlatformsWithDefaults instantiates a new Platforms 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 NewPlatformsWithDefaults() *Platforms { + this := Platforms{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *Platforms) GetApiUrl() (ret PlatformsGetApiUrlRetType) { + ret, _ = o.GetApiUrlOk() + return ret +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *Platforms) GetApiUrlOk() (ret PlatformsGetApiUrlRetType, ok bool) { + return getPlatformsGetApiUrlAttributeTypeOk(o.ApiUrl) +} + +// SetApiUrl sets field value +func (o *Platforms) SetApiUrl(v PlatformsGetApiUrlRetType) { + setPlatformsGetApiUrlAttributeType(&o.ApiUrl, v) +} + +// GetConsoleUrl returns the ConsoleUrl field value if set, zero value otherwise. +func (o *Platforms) GetConsoleUrl() (res PlatformsGetConsoleUrlRetType) { + res, _ = o.GetConsoleUrlOk() + return +} + +// GetConsoleUrlOk returns a tuple with the ConsoleUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Platforms) GetConsoleUrlOk() (ret PlatformsGetConsoleUrlRetType, ok bool) { + return getPlatformsGetConsoleUrlAttributeTypeOk(o.ConsoleUrl) +} + +// HasConsoleUrl returns a boolean if a field has been set. +func (o *Platforms) HasConsoleUrl() bool { + _, ok := o.GetConsoleUrlOk() + return ok +} + +// SetConsoleUrl gets a reference to the given string and assigns it to the ConsoleUrl field. +func (o *Platforms) SetConsoleUrl(v PlatformsGetConsoleUrlRetType) { + setPlatformsGetConsoleUrlAttributeType(&o.ConsoleUrl, v) +} + +// GetDisplayName returns the DisplayName field value +func (o *Platforms) GetDisplayName() (ret PlatformsGetDisplayNameRetType) { + 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 *Platforms) GetDisplayNameOk() (ret PlatformsGetDisplayNameRetType, ok bool) { + return getPlatformsGetDisplayNameAttributeTypeOk(o.DisplayName) +} + +// SetDisplayName sets field value +func (o *Platforms) SetDisplayName(v PlatformsGetDisplayNameRetType) { + setPlatformsGetDisplayNameAttributeType(&o.DisplayName, v) +} + +// GetGuid returns the Guid field value +func (o *Platforms) GetGuid() (ret PlatformsGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *Platforms) GetGuidOk() (ret PlatformsGetGuidRetType, ok bool) { + return getPlatformsGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *Platforms) SetGuid(v PlatformsGetGuidRetType) { + setPlatformsGetGuidAttributeType(&o.Guid, v) +} + +// GetRegion returns the Region field value +func (o *Platforms) GetRegion() (ret PlatformsGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *Platforms) GetRegionOk() (ret PlatformsGetRegionRetType, ok bool) { + return getPlatformsGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *Platforms) SetRegion(v PlatformsGetRegionRetType) { + setPlatformsGetRegionAttributeType(&o.Region, v) +} + +// GetSystemId returns the SystemId field value +func (o *Platforms) GetSystemId() (ret PlatformsGetSystemIdRetType) { + ret, _ = o.GetSystemIdOk() + return ret +} + +// GetSystemIdOk returns a tuple with the SystemId field value +// and a boolean to check if the value has been set. +func (o *Platforms) GetSystemIdOk() (ret PlatformsGetSystemIdRetType, ok bool) { + return getPlatformsGetSystemIdAttributeTypeOk(o.SystemId) +} + +// SetSystemId sets field value +func (o *Platforms) SetSystemId(v PlatformsGetSystemIdRetType) { + setPlatformsGetSystemIdAttributeType(&o.SystemId, v) +} + +func (o Platforms) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPlatformsGetApiUrlAttributeTypeOk(o.ApiUrl); ok { + toSerialize["ApiUrl"] = val + } + if val, ok := getPlatformsGetConsoleUrlAttributeTypeOk(o.ConsoleUrl); ok { + toSerialize["ConsoleUrl"] = val + } + if val, ok := getPlatformsGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getPlatformsGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getPlatformsGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getPlatformsGetSystemIdAttributeTypeOk(o.SystemId); ok { + toSerialize["SystemId"] = val + } + return toSerialize, nil +} + +type NullablePlatforms struct { + value *Platforms + isSet bool +} + +func (v NullablePlatforms) Get() *Platforms { + return v.value +} + +func (v *NullablePlatforms) Set(val *Platforms) { + v.value = val + v.isSet = true +} + +func (v NullablePlatforms) IsSet() bool { + return v.isSet +} + +func (v *NullablePlatforms) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlatforms(val *Platforms) *NullablePlatforms { + return &NullablePlatforms{value: val, isSet: true} +} + +func (v NullablePlatforms) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlatforms) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_platforms_test.go b/services/scf/model_platforms_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_platforms_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_quota.go b/services/scf/model_quota.go new file mode 100644 index 000000000..fb235e63b --- /dev/null +++ b/services/scf/model_quota.go @@ -0,0 +1,609 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the Quota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Quota{} + +/* + types and functions for apps +*/ + +// isModel +type QuotaGetAppsAttributeType = *QuotaApps +type QuotaGetAppsArgType = QuotaApps +type QuotaGetAppsRetType = QuotaApps + +func getQuotaGetAppsAttributeTypeOk(arg QuotaGetAppsAttributeType) (ret QuotaGetAppsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetAppsAttributeType(arg *QuotaGetAppsAttributeType, val QuotaGetAppsRetType) { + *arg = &val +} + +/* + types and functions for createdAt +*/ + +// isDateTime +type QuotaGetCreatedAtAttributeType = *time.Time +type QuotaGetCreatedAtArgType = time.Time +type QuotaGetCreatedAtRetType = time.Time + +func getQuotaGetCreatedAtAttributeTypeOk(arg QuotaGetCreatedAtAttributeType) (ret QuotaGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetCreatedAtAttributeType(arg *QuotaGetCreatedAtAttributeType, val QuotaGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for domains +*/ + +// isModel +type QuotaGetDomainsAttributeType = *QuotaDomains +type QuotaGetDomainsArgType = QuotaDomains +type QuotaGetDomainsRetType = QuotaDomains + +func getQuotaGetDomainsAttributeTypeOk(arg QuotaGetDomainsAttributeType) (ret QuotaGetDomainsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetDomainsAttributeType(arg *QuotaGetDomainsAttributeType, val QuotaGetDomainsRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type QuotaGetGuidAttributeType = *string + +func getQuotaGetGuidAttributeTypeOk(arg QuotaGetGuidAttributeType) (ret QuotaGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetGuidAttributeType(arg *QuotaGetGuidAttributeType, val QuotaGetGuidRetType) { + *arg = &val +} + +type QuotaGetGuidArgType = string +type QuotaGetGuidRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type QuotaGetNameAttributeType = *string + +func getQuotaGetNameAttributeTypeOk(arg QuotaGetNameAttributeType) (ret QuotaGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetNameAttributeType(arg *QuotaGetNameAttributeType, val QuotaGetNameRetType) { + *arg = &val +} + +type QuotaGetNameArgType = string +type QuotaGetNameRetType = string + +/* + types and functions for orgId +*/ + +// isNotNullableString +type QuotaGetOrgIdAttributeType = *string + +func getQuotaGetOrgIdAttributeTypeOk(arg QuotaGetOrgIdAttributeType) (ret QuotaGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetOrgIdAttributeType(arg *QuotaGetOrgIdAttributeType, val QuotaGetOrgIdRetType) { + *arg = &val +} + +type QuotaGetOrgIdArgType = string +type QuotaGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type QuotaGetPlatformIdAttributeType = *string + +func getQuotaGetPlatformIdAttributeTypeOk(arg QuotaGetPlatformIdAttributeType) (ret QuotaGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetPlatformIdAttributeType(arg *QuotaGetPlatformIdAttributeType, val QuotaGetPlatformIdRetType) { + *arg = &val +} + +type QuotaGetPlatformIdArgType = string +type QuotaGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type QuotaGetProjectIdAttributeType = *string + +func getQuotaGetProjectIdAttributeTypeOk(arg QuotaGetProjectIdAttributeType) (ret QuotaGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetProjectIdAttributeType(arg *QuotaGetProjectIdAttributeType, val QuotaGetProjectIdRetType) { + *arg = &val +} + +type QuotaGetProjectIdArgType = string +type QuotaGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type QuotaGetRegionAttributeType = *string + +func getQuotaGetRegionAttributeTypeOk(arg QuotaGetRegionAttributeType) (ret QuotaGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetRegionAttributeType(arg *QuotaGetRegionAttributeType, val QuotaGetRegionRetType) { + *arg = &val +} + +type QuotaGetRegionArgType = string +type QuotaGetRegionRetType = string + +/* + types and functions for routes +*/ + +// isModel +type QuotaGetRoutesAttributeType = *QuotaRoutes +type QuotaGetRoutesArgType = QuotaRoutes +type QuotaGetRoutesRetType = QuotaRoutes + +func getQuotaGetRoutesAttributeTypeOk(arg QuotaGetRoutesAttributeType) (ret QuotaGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetRoutesAttributeType(arg *QuotaGetRoutesAttributeType, val QuotaGetRoutesRetType) { + *arg = &val +} + +/* + types and functions for services +*/ + +// isModel +type QuotaGetServicesAttributeType = *QuotaServices +type QuotaGetServicesArgType = QuotaServices +type QuotaGetServicesRetType = QuotaServices + +func getQuotaGetServicesAttributeTypeOk(arg QuotaGetServicesAttributeType) (ret QuotaGetServicesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetServicesAttributeType(arg *QuotaGetServicesAttributeType, val QuotaGetServicesRetType) { + *arg = &val +} + +/* + types and functions for updatedAt +*/ + +// isDateTime +type QuotaGetUpdatedAtAttributeType = *time.Time +type QuotaGetUpdatedAtArgType = time.Time +type QuotaGetUpdatedAtRetType = time.Time + +func getQuotaGetUpdatedAtAttributeTypeOk(arg QuotaGetUpdatedAtAttributeType) (ret QuotaGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaGetUpdatedAtAttributeType(arg *QuotaGetUpdatedAtAttributeType, val QuotaGetUpdatedAtRetType) { + *arg = &val +} + +// Quota struct for Quota +type Quota struct { + // REQUIRED + Apps QuotaGetAppsAttributeType `json:"apps" required:"true"` + // REQUIRED + CreatedAt QuotaGetCreatedAtAttributeType `json:"createdAt" required:"true"` + // REQUIRED + Domains QuotaGetDomainsAttributeType `json:"domains" required:"true"` + // REQUIRED + Guid QuotaGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + Name QuotaGetNameAttributeType `json:"name" required:"true"` + OrgId QuotaGetOrgIdAttributeType `json:"orgId,omitempty"` + // REQUIRED + PlatformId QuotaGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId QuotaGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region QuotaGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + Routes QuotaGetRoutesAttributeType `json:"routes" required:"true"` + // REQUIRED + Services QuotaGetServicesAttributeType `json:"services" required:"true"` + // REQUIRED + UpdatedAt QuotaGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` +} + +type _Quota Quota + +// NewQuota instantiates a new Quota 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 NewQuota(apps QuotaGetAppsArgType, createdAt QuotaGetCreatedAtArgType, domains QuotaGetDomainsArgType, guid QuotaGetGuidArgType, name QuotaGetNameArgType, platformId QuotaGetPlatformIdArgType, projectId QuotaGetProjectIdArgType, region QuotaGetRegionArgType, routes QuotaGetRoutesArgType, services QuotaGetServicesArgType, updatedAt QuotaGetUpdatedAtArgType) *Quota { + this := Quota{} + setQuotaGetAppsAttributeType(&this.Apps, apps) + setQuotaGetCreatedAtAttributeType(&this.CreatedAt, createdAt) + setQuotaGetDomainsAttributeType(&this.Domains, domains) + setQuotaGetGuidAttributeType(&this.Guid, guid) + setQuotaGetNameAttributeType(&this.Name, name) + setQuotaGetPlatformIdAttributeType(&this.PlatformId, platformId) + setQuotaGetProjectIdAttributeType(&this.ProjectId, projectId) + setQuotaGetRegionAttributeType(&this.Region, region) + setQuotaGetRoutesAttributeType(&this.Routes, routes) + setQuotaGetServicesAttributeType(&this.Services, services) + setQuotaGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) + return &this +} + +// NewQuotaWithDefaults instantiates a new Quota 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 NewQuotaWithDefaults() *Quota { + this := Quota{} + return &this +} + +// GetApps returns the Apps field value +func (o *Quota) GetApps() (ret QuotaGetAppsRetType) { + ret, _ = o.GetAppsOk() + return ret +} + +// GetAppsOk returns a tuple with the Apps field value +// and a boolean to check if the value has been set. +func (o *Quota) GetAppsOk() (ret QuotaGetAppsRetType, ok bool) { + return getQuotaGetAppsAttributeTypeOk(o.Apps) +} + +// SetApps sets field value +func (o *Quota) SetApps(v QuotaGetAppsRetType) { + setQuotaGetAppsAttributeType(&o.Apps, v) +} + +// GetCreatedAt returns the CreatedAt field value +func (o *Quota) GetCreatedAt() (ret QuotaGetCreatedAtRetType) { + ret, _ = o.GetCreatedAtOk() + return ret +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *Quota) GetCreatedAtOk() (ret QuotaGetCreatedAtRetType, ok bool) { + return getQuotaGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// SetCreatedAt sets field value +func (o *Quota) SetCreatedAt(v QuotaGetCreatedAtRetType) { + setQuotaGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetDomains returns the Domains field value +func (o *Quota) GetDomains() (ret QuotaGetDomainsRetType) { + ret, _ = o.GetDomainsOk() + return ret +} + +// GetDomainsOk returns a tuple with the Domains field value +// and a boolean to check if the value has been set. +func (o *Quota) GetDomainsOk() (ret QuotaGetDomainsRetType, ok bool) { + return getQuotaGetDomainsAttributeTypeOk(o.Domains) +} + +// SetDomains sets field value +func (o *Quota) SetDomains(v QuotaGetDomainsRetType) { + setQuotaGetDomainsAttributeType(&o.Domains, v) +} + +// GetGuid returns the Guid field value +func (o *Quota) GetGuid() (ret QuotaGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *Quota) GetGuidOk() (ret QuotaGetGuidRetType, ok bool) { + return getQuotaGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *Quota) SetGuid(v QuotaGetGuidRetType) { + setQuotaGetGuidAttributeType(&o.Guid, v) +} + +// GetName returns the Name field value +func (o *Quota) GetName() (ret QuotaGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Quota) GetNameOk() (ret QuotaGetNameRetType, ok bool) { + return getQuotaGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *Quota) SetName(v QuotaGetNameRetType) { + setQuotaGetNameAttributeType(&o.Name, v) +} + +// GetOrgId returns the OrgId field value if set, zero value otherwise. +func (o *Quota) GetOrgId() (res QuotaGetOrgIdRetType) { + res, _ = o.GetOrgIdOk() + return +} + +// GetOrgIdOk returns a tuple with the OrgId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Quota) GetOrgIdOk() (ret QuotaGetOrgIdRetType, ok bool) { + return getQuotaGetOrgIdAttributeTypeOk(o.OrgId) +} + +// HasOrgId returns a boolean if a field has been set. +func (o *Quota) HasOrgId() bool { + _, ok := o.GetOrgIdOk() + return ok +} + +// SetOrgId gets a reference to the given string and assigns it to the OrgId field. +func (o *Quota) SetOrgId(v QuotaGetOrgIdRetType) { + setQuotaGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *Quota) GetPlatformId() (ret QuotaGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *Quota) GetPlatformIdOk() (ret QuotaGetPlatformIdRetType, ok bool) { + return getQuotaGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *Quota) SetPlatformId(v QuotaGetPlatformIdRetType) { + setQuotaGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *Quota) GetProjectId() (ret QuotaGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *Quota) GetProjectIdOk() (ret QuotaGetProjectIdRetType, ok bool) { + return getQuotaGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *Quota) SetProjectId(v QuotaGetProjectIdRetType) { + setQuotaGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *Quota) GetRegion() (ret QuotaGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *Quota) GetRegionOk() (ret QuotaGetRegionRetType, ok bool) { + return getQuotaGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *Quota) SetRegion(v QuotaGetRegionRetType) { + setQuotaGetRegionAttributeType(&o.Region, v) +} + +// GetRoutes returns the Routes field value +func (o *Quota) GetRoutes() (ret QuotaGetRoutesRetType) { + ret, _ = o.GetRoutesOk() + return ret +} + +// GetRoutesOk returns a tuple with the Routes field value +// and a boolean to check if the value has been set. +func (o *Quota) GetRoutesOk() (ret QuotaGetRoutesRetType, ok bool) { + return getQuotaGetRoutesAttributeTypeOk(o.Routes) +} + +// SetRoutes sets field value +func (o *Quota) SetRoutes(v QuotaGetRoutesRetType) { + setQuotaGetRoutesAttributeType(&o.Routes, v) +} + +// GetServices returns the Services field value +func (o *Quota) GetServices() (ret QuotaGetServicesRetType) { + ret, _ = o.GetServicesOk() + return ret +} + +// GetServicesOk returns a tuple with the Services field value +// and a boolean to check if the value has been set. +func (o *Quota) GetServicesOk() (ret QuotaGetServicesRetType, ok bool) { + return getQuotaGetServicesAttributeTypeOk(o.Services) +} + +// SetServices sets field value +func (o *Quota) SetServices(v QuotaGetServicesRetType) { + setQuotaGetServicesAttributeType(&o.Services, v) +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *Quota) GetUpdatedAt() (ret QuotaGetUpdatedAtRetType) { + ret, _ = o.GetUpdatedAtOk() + return ret +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *Quota) GetUpdatedAtOk() (ret QuotaGetUpdatedAtRetType, ok bool) { + return getQuotaGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// SetUpdatedAt sets field value +func (o *Quota) SetUpdatedAt(v QuotaGetUpdatedAtRetType) { + setQuotaGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +func (o Quota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotaGetAppsAttributeTypeOk(o.Apps); ok { + toSerialize["Apps"] = val + } + if val, ok := getQuotaGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getQuotaGetDomainsAttributeTypeOk(o.Domains); ok { + toSerialize["Domains"] = val + } + if val, ok := getQuotaGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getQuotaGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getQuotaGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getQuotaGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getQuotaGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getQuotaGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getQuotaGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val + } + if val, ok := getQuotaGetServicesAttributeTypeOk(o.Services); ok { + toSerialize["Services"] = val + } + if val, ok := getQuotaGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + return toSerialize, nil +} + +type NullableQuota struct { + value *Quota + isSet bool +} + +func (v NullableQuota) Get() *Quota { + return v.value +} + +func (v *NullableQuota) Set(val *Quota) { + v.value = val + v.isSet = true +} + +func (v NullableQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuota(val *Quota) *NullableQuota { + return &NullableQuota{value: val, isSet: true} +} + +func (v NullableQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_quota_apps.go b/services/scf/model_quota_apps.go new file mode 100644 index 000000000..57a7e6df1 --- /dev/null +++ b/services/scf/model_quota_apps.go @@ -0,0 +1,312 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the QuotaApps type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QuotaApps{} + +/* + types and functions for logRateLimitInBytesPerSecond +*/ + +// isLong +type QuotaAppsGetLogRateLimitInBytesPerSecondAttributeType = *int64 +type QuotaAppsGetLogRateLimitInBytesPerSecondArgType = *int64 +type QuotaAppsGetLogRateLimitInBytesPerSecondRetType = *int64 + +func getQuotaAppsGetLogRateLimitInBytesPerSecondAttributeTypeOk(arg QuotaAppsGetLogRateLimitInBytesPerSecondAttributeType) (ret QuotaAppsGetLogRateLimitInBytesPerSecondRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaAppsGetLogRateLimitInBytesPerSecondAttributeType(arg *QuotaAppsGetLogRateLimitInBytesPerSecondAttributeType, val QuotaAppsGetLogRateLimitInBytesPerSecondRetType) { + *arg = val +} + +/* + types and functions for perAppTasks +*/ + +// isLong +type QuotaAppsGetPerAppTasksAttributeType = *int64 +type QuotaAppsGetPerAppTasksArgType = *int64 +type QuotaAppsGetPerAppTasksRetType = *int64 + +func getQuotaAppsGetPerAppTasksAttributeTypeOk(arg QuotaAppsGetPerAppTasksAttributeType) (ret QuotaAppsGetPerAppTasksRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaAppsGetPerAppTasksAttributeType(arg *QuotaAppsGetPerAppTasksAttributeType, val QuotaAppsGetPerAppTasksRetType) { + *arg = val +} + +/* + types and functions for perProcessMemoryInMb +*/ + +// isLong +type QuotaAppsGetPerProcessMemoryInMbAttributeType = *int64 +type QuotaAppsGetPerProcessMemoryInMbArgType = *int64 +type QuotaAppsGetPerProcessMemoryInMbRetType = *int64 + +func getQuotaAppsGetPerProcessMemoryInMbAttributeTypeOk(arg QuotaAppsGetPerProcessMemoryInMbAttributeType) (ret QuotaAppsGetPerProcessMemoryInMbRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaAppsGetPerProcessMemoryInMbAttributeType(arg *QuotaAppsGetPerProcessMemoryInMbAttributeType, val QuotaAppsGetPerProcessMemoryInMbRetType) { + *arg = val +} + +/* + types and functions for totalInstances +*/ + +// isLong +type QuotaAppsGetTotalInstancesAttributeType = *int64 +type QuotaAppsGetTotalInstancesArgType = *int64 +type QuotaAppsGetTotalInstancesRetType = *int64 + +func getQuotaAppsGetTotalInstancesAttributeTypeOk(arg QuotaAppsGetTotalInstancesAttributeType) (ret QuotaAppsGetTotalInstancesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaAppsGetTotalInstancesAttributeType(arg *QuotaAppsGetTotalInstancesAttributeType, val QuotaAppsGetTotalInstancesRetType) { + *arg = val +} + +/* + types and functions for totalMemoryInMb +*/ + +// isLong +type QuotaAppsGetTotalMemoryInMbAttributeType = *int64 +type QuotaAppsGetTotalMemoryInMbArgType = *int64 +type QuotaAppsGetTotalMemoryInMbRetType = *int64 + +func getQuotaAppsGetTotalMemoryInMbAttributeTypeOk(arg QuotaAppsGetTotalMemoryInMbAttributeType) (ret QuotaAppsGetTotalMemoryInMbRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaAppsGetTotalMemoryInMbAttributeType(arg *QuotaAppsGetTotalMemoryInMbAttributeType, val QuotaAppsGetTotalMemoryInMbRetType) { + *arg = val +} + +// QuotaApps struct for QuotaApps +type QuotaApps struct { + // The value `null` means `unlimited`. + // REQUIRED + LogRateLimitInBytesPerSecond QuotaAppsGetLogRateLimitInBytesPerSecondAttributeType `json:"logRateLimitInBytesPerSecond" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + PerAppTasks QuotaAppsGetPerAppTasksAttributeType `json:"perAppTasks" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + PerProcessMemoryInMb QuotaAppsGetPerProcessMemoryInMbAttributeType `json:"perProcessMemoryInMb" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + TotalInstances QuotaAppsGetTotalInstancesAttributeType `json:"totalInstances" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + TotalMemoryInMb QuotaAppsGetTotalMemoryInMbAttributeType `json:"totalMemoryInMb" required:"true"` +} + +type _QuotaApps QuotaApps + +// NewQuotaApps instantiates a new QuotaApps 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 NewQuotaApps(logRateLimitInBytesPerSecond QuotaAppsGetLogRateLimitInBytesPerSecondArgType, perAppTasks QuotaAppsGetPerAppTasksArgType, perProcessMemoryInMb QuotaAppsGetPerProcessMemoryInMbArgType, totalInstances QuotaAppsGetTotalInstancesArgType, totalMemoryInMb QuotaAppsGetTotalMemoryInMbArgType) *QuotaApps { + this := QuotaApps{} + setQuotaAppsGetLogRateLimitInBytesPerSecondAttributeType(&this.LogRateLimitInBytesPerSecond, logRateLimitInBytesPerSecond) + setQuotaAppsGetPerAppTasksAttributeType(&this.PerAppTasks, perAppTasks) + setQuotaAppsGetPerProcessMemoryInMbAttributeType(&this.PerProcessMemoryInMb, perProcessMemoryInMb) + setQuotaAppsGetTotalInstancesAttributeType(&this.TotalInstances, totalInstances) + setQuotaAppsGetTotalMemoryInMbAttributeType(&this.TotalMemoryInMb, totalMemoryInMb) + return &this +} + +// NewQuotaAppsWithDefaults instantiates a new QuotaApps 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 NewQuotaAppsWithDefaults() *QuotaApps { + this := QuotaApps{} + return &this +} + +// GetLogRateLimitInBytesPerSecond returns the LogRateLimitInBytesPerSecond field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaApps) GetLogRateLimitInBytesPerSecond() (ret QuotaAppsGetLogRateLimitInBytesPerSecondRetType) { + ret, _ = o.GetLogRateLimitInBytesPerSecondOk() + return ret +} + +// GetLogRateLimitInBytesPerSecondOk returns a tuple with the LogRateLimitInBytesPerSecond field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaApps) GetLogRateLimitInBytesPerSecondOk() (ret QuotaAppsGetLogRateLimitInBytesPerSecondRetType, ok bool) { + return getQuotaAppsGetLogRateLimitInBytesPerSecondAttributeTypeOk(o.LogRateLimitInBytesPerSecond) +} + +// SetLogRateLimitInBytesPerSecond sets field value +func (o *QuotaApps) SetLogRateLimitInBytesPerSecond(v QuotaAppsGetLogRateLimitInBytesPerSecondRetType) { + setQuotaAppsGetLogRateLimitInBytesPerSecondAttributeType(&o.LogRateLimitInBytesPerSecond, v) +} + +// GetPerAppTasks returns the PerAppTasks field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaApps) GetPerAppTasks() (ret QuotaAppsGetPerAppTasksRetType) { + ret, _ = o.GetPerAppTasksOk() + return ret +} + +// GetPerAppTasksOk returns a tuple with the PerAppTasks field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaApps) GetPerAppTasksOk() (ret QuotaAppsGetPerAppTasksRetType, ok bool) { + return getQuotaAppsGetPerAppTasksAttributeTypeOk(o.PerAppTasks) +} + +// SetPerAppTasks sets field value +func (o *QuotaApps) SetPerAppTasks(v QuotaAppsGetPerAppTasksRetType) { + setQuotaAppsGetPerAppTasksAttributeType(&o.PerAppTasks, v) +} + +// GetPerProcessMemoryInMb returns the PerProcessMemoryInMb field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaApps) GetPerProcessMemoryInMb() (ret QuotaAppsGetPerProcessMemoryInMbRetType) { + ret, _ = o.GetPerProcessMemoryInMbOk() + return ret +} + +// GetPerProcessMemoryInMbOk returns a tuple with the PerProcessMemoryInMb field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaApps) GetPerProcessMemoryInMbOk() (ret QuotaAppsGetPerProcessMemoryInMbRetType, ok bool) { + return getQuotaAppsGetPerProcessMemoryInMbAttributeTypeOk(o.PerProcessMemoryInMb) +} + +// SetPerProcessMemoryInMb sets field value +func (o *QuotaApps) SetPerProcessMemoryInMb(v QuotaAppsGetPerProcessMemoryInMbRetType) { + setQuotaAppsGetPerProcessMemoryInMbAttributeType(&o.PerProcessMemoryInMb, v) +} + +// GetTotalInstances returns the TotalInstances field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaApps) GetTotalInstances() (ret QuotaAppsGetTotalInstancesRetType) { + ret, _ = o.GetTotalInstancesOk() + return ret +} + +// GetTotalInstancesOk returns a tuple with the TotalInstances field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaApps) GetTotalInstancesOk() (ret QuotaAppsGetTotalInstancesRetType, ok bool) { + return getQuotaAppsGetTotalInstancesAttributeTypeOk(o.TotalInstances) +} + +// SetTotalInstances sets field value +func (o *QuotaApps) SetTotalInstances(v QuotaAppsGetTotalInstancesRetType) { + setQuotaAppsGetTotalInstancesAttributeType(&o.TotalInstances, v) +} + +// GetTotalMemoryInMb returns the TotalMemoryInMb field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaApps) GetTotalMemoryInMb() (ret QuotaAppsGetTotalMemoryInMbRetType) { + ret, _ = o.GetTotalMemoryInMbOk() + return ret +} + +// GetTotalMemoryInMbOk returns a tuple with the TotalMemoryInMb field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaApps) GetTotalMemoryInMbOk() (ret QuotaAppsGetTotalMemoryInMbRetType, ok bool) { + return getQuotaAppsGetTotalMemoryInMbAttributeTypeOk(o.TotalMemoryInMb) +} + +// SetTotalMemoryInMb sets field value +func (o *QuotaApps) SetTotalMemoryInMb(v QuotaAppsGetTotalMemoryInMbRetType) { + setQuotaAppsGetTotalMemoryInMbAttributeType(&o.TotalMemoryInMb, v) +} + +func (o QuotaApps) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotaAppsGetLogRateLimitInBytesPerSecondAttributeTypeOk(o.LogRateLimitInBytesPerSecond); ok { + toSerialize["LogRateLimitInBytesPerSecond"] = val + } + if val, ok := getQuotaAppsGetPerAppTasksAttributeTypeOk(o.PerAppTasks); ok { + toSerialize["PerAppTasks"] = val + } + if val, ok := getQuotaAppsGetPerProcessMemoryInMbAttributeTypeOk(o.PerProcessMemoryInMb); ok { + toSerialize["PerProcessMemoryInMb"] = val + } + if val, ok := getQuotaAppsGetTotalInstancesAttributeTypeOk(o.TotalInstances); ok { + toSerialize["TotalInstances"] = val + } + if val, ok := getQuotaAppsGetTotalMemoryInMbAttributeTypeOk(o.TotalMemoryInMb); ok { + toSerialize["TotalMemoryInMb"] = val + } + return toSerialize, nil +} + +type NullableQuotaApps struct { + value *QuotaApps + isSet bool +} + +func (v NullableQuotaApps) Get() *QuotaApps { + return v.value +} + +func (v *NullableQuotaApps) Set(val *QuotaApps) { + v.value = val + v.isSet = true +} + +func (v NullableQuotaApps) IsSet() bool { + return v.isSet +} + +func (v *NullableQuotaApps) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuotaApps(val *QuotaApps) *NullableQuotaApps { + return &NullableQuotaApps{value: val, isSet: true} +} + +func (v NullableQuotaApps) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuotaApps) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_quota_apps_test.go b/services/scf/model_quota_apps_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_quota_apps_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_quota_domains.go b/services/scf/model_quota_domains.go new file mode 100644 index 000000000..afb0c89cd --- /dev/null +++ b/services/scf/model_quota_domains.go @@ -0,0 +1,128 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the QuotaDomains type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QuotaDomains{} + +/* + types and functions for totalDomains +*/ + +// isLong +type QuotaDomainsGetTotalDomainsAttributeType = *int64 +type QuotaDomainsGetTotalDomainsArgType = *int64 +type QuotaDomainsGetTotalDomainsRetType = *int64 + +func getQuotaDomainsGetTotalDomainsAttributeTypeOk(arg QuotaDomainsGetTotalDomainsAttributeType) (ret QuotaDomainsGetTotalDomainsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaDomainsGetTotalDomainsAttributeType(arg *QuotaDomainsGetTotalDomainsAttributeType, val QuotaDomainsGetTotalDomainsRetType) { + *arg = val +} + +// QuotaDomains struct for QuotaDomains +type QuotaDomains struct { + // The value `null` means `unlimited`. + // REQUIRED + TotalDomains QuotaDomainsGetTotalDomainsAttributeType `json:"totalDomains" required:"true"` +} + +type _QuotaDomains QuotaDomains + +// NewQuotaDomains instantiates a new QuotaDomains 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 NewQuotaDomains(totalDomains QuotaDomainsGetTotalDomainsArgType) *QuotaDomains { + this := QuotaDomains{} + setQuotaDomainsGetTotalDomainsAttributeType(&this.TotalDomains, totalDomains) + return &this +} + +// NewQuotaDomainsWithDefaults instantiates a new QuotaDomains 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 NewQuotaDomainsWithDefaults() *QuotaDomains { + this := QuotaDomains{} + return &this +} + +// GetTotalDomains returns the TotalDomains field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaDomains) GetTotalDomains() (ret QuotaDomainsGetTotalDomainsRetType) { + ret, _ = o.GetTotalDomainsOk() + return ret +} + +// GetTotalDomainsOk returns a tuple with the TotalDomains field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaDomains) GetTotalDomainsOk() (ret QuotaDomainsGetTotalDomainsRetType, ok bool) { + return getQuotaDomainsGetTotalDomainsAttributeTypeOk(o.TotalDomains) +} + +// SetTotalDomains sets field value +func (o *QuotaDomains) SetTotalDomains(v QuotaDomainsGetTotalDomainsRetType) { + setQuotaDomainsGetTotalDomainsAttributeType(&o.TotalDomains, v) +} + +func (o QuotaDomains) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotaDomainsGetTotalDomainsAttributeTypeOk(o.TotalDomains); ok { + toSerialize["TotalDomains"] = val + } + return toSerialize, nil +} + +type NullableQuotaDomains struct { + value *QuotaDomains + isSet bool +} + +func (v NullableQuotaDomains) Get() *QuotaDomains { + return v.value +} + +func (v *NullableQuotaDomains) Set(val *QuotaDomains) { + v.value = val + v.isSet = true +} + +func (v NullableQuotaDomains) IsSet() bool { + return v.isSet +} + +func (v *NullableQuotaDomains) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuotaDomains(val *QuotaDomains) *NullableQuotaDomains { + return &NullableQuotaDomains{value: val, isSet: true} +} + +func (v NullableQuotaDomains) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuotaDomains) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_quota_domains_test.go b/services/scf/model_quota_domains_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_quota_domains_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_quota_routes.go b/services/scf/model_quota_routes.go new file mode 100644 index 000000000..2f1dea54b --- /dev/null +++ b/services/scf/model_quota_routes.go @@ -0,0 +1,174 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the QuotaRoutes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QuotaRoutes{} + +/* + types and functions for totalReservedPorts +*/ + +// isLong +type QuotaRoutesGetTotalReservedPortsAttributeType = *int64 +type QuotaRoutesGetTotalReservedPortsArgType = *int64 +type QuotaRoutesGetTotalReservedPortsRetType = *int64 + +func getQuotaRoutesGetTotalReservedPortsAttributeTypeOk(arg QuotaRoutesGetTotalReservedPortsAttributeType) (ret QuotaRoutesGetTotalReservedPortsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaRoutesGetTotalReservedPortsAttributeType(arg *QuotaRoutesGetTotalReservedPortsAttributeType, val QuotaRoutesGetTotalReservedPortsRetType) { + *arg = val +} + +/* + types and functions for totalRoutes +*/ + +// isLong +type QuotaRoutesGetTotalRoutesAttributeType = *int64 +type QuotaRoutesGetTotalRoutesArgType = *int64 +type QuotaRoutesGetTotalRoutesRetType = *int64 + +func getQuotaRoutesGetTotalRoutesAttributeTypeOk(arg QuotaRoutesGetTotalRoutesAttributeType) (ret QuotaRoutesGetTotalRoutesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaRoutesGetTotalRoutesAttributeType(arg *QuotaRoutesGetTotalRoutesAttributeType, val QuotaRoutesGetTotalRoutesRetType) { + *arg = val +} + +// QuotaRoutes struct for QuotaRoutes +type QuotaRoutes struct { + // The value `null` means `unlimited`. + // REQUIRED + TotalReservedPorts QuotaRoutesGetTotalReservedPortsAttributeType `json:"totalReservedPorts" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + TotalRoutes QuotaRoutesGetTotalRoutesAttributeType `json:"totalRoutes" required:"true"` +} + +type _QuotaRoutes QuotaRoutes + +// NewQuotaRoutes instantiates a new QuotaRoutes 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 NewQuotaRoutes(totalReservedPorts QuotaRoutesGetTotalReservedPortsArgType, totalRoutes QuotaRoutesGetTotalRoutesArgType) *QuotaRoutes { + this := QuotaRoutes{} + setQuotaRoutesGetTotalReservedPortsAttributeType(&this.TotalReservedPorts, totalReservedPorts) + setQuotaRoutesGetTotalRoutesAttributeType(&this.TotalRoutes, totalRoutes) + return &this +} + +// NewQuotaRoutesWithDefaults instantiates a new QuotaRoutes 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 NewQuotaRoutesWithDefaults() *QuotaRoutes { + this := QuotaRoutes{} + return &this +} + +// GetTotalReservedPorts returns the TotalReservedPorts field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaRoutes) GetTotalReservedPorts() (ret QuotaRoutesGetTotalReservedPortsRetType) { + ret, _ = o.GetTotalReservedPortsOk() + return ret +} + +// GetTotalReservedPortsOk returns a tuple with the TotalReservedPorts field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaRoutes) GetTotalReservedPortsOk() (ret QuotaRoutesGetTotalReservedPortsRetType, ok bool) { + return getQuotaRoutesGetTotalReservedPortsAttributeTypeOk(o.TotalReservedPorts) +} + +// SetTotalReservedPorts sets field value +func (o *QuotaRoutes) SetTotalReservedPorts(v QuotaRoutesGetTotalReservedPortsRetType) { + setQuotaRoutesGetTotalReservedPortsAttributeType(&o.TotalReservedPorts, v) +} + +// GetTotalRoutes returns the TotalRoutes field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaRoutes) GetTotalRoutes() (ret QuotaRoutesGetTotalRoutesRetType) { + ret, _ = o.GetTotalRoutesOk() + return ret +} + +// GetTotalRoutesOk returns a tuple with the TotalRoutes field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaRoutes) GetTotalRoutesOk() (ret QuotaRoutesGetTotalRoutesRetType, ok bool) { + return getQuotaRoutesGetTotalRoutesAttributeTypeOk(o.TotalRoutes) +} + +// SetTotalRoutes sets field value +func (o *QuotaRoutes) SetTotalRoutes(v QuotaRoutesGetTotalRoutesRetType) { + setQuotaRoutesGetTotalRoutesAttributeType(&o.TotalRoutes, v) +} + +func (o QuotaRoutes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotaRoutesGetTotalReservedPortsAttributeTypeOk(o.TotalReservedPorts); ok { + toSerialize["TotalReservedPorts"] = val + } + if val, ok := getQuotaRoutesGetTotalRoutesAttributeTypeOk(o.TotalRoutes); ok { + toSerialize["TotalRoutes"] = val + } + return toSerialize, nil +} + +type NullableQuotaRoutes struct { + value *QuotaRoutes + isSet bool +} + +func (v NullableQuotaRoutes) Get() *QuotaRoutes { + return v.value +} + +func (v *NullableQuotaRoutes) Set(val *QuotaRoutes) { + v.value = val + v.isSet = true +} + +func (v NullableQuotaRoutes) IsSet() bool { + return v.isSet +} + +func (v *NullableQuotaRoutes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuotaRoutes(val *QuotaRoutes) *NullableQuotaRoutes { + return &NullableQuotaRoutes{value: val, isSet: true} +} + +func (v NullableQuotaRoutes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuotaRoutes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_quota_routes_test.go b/services/scf/model_quota_routes_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_quota_routes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_quota_services.go b/services/scf/model_quota_services.go new file mode 100644 index 000000000..0dfc172f5 --- /dev/null +++ b/services/scf/model_quota_services.go @@ -0,0 +1,217 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the QuotaServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QuotaServices{} + +/* + types and functions for paidServicesAllowed +*/ + +// isBoolean +type QuotaServicesgetPaidServicesAllowedAttributeType = *bool +type QuotaServicesgetPaidServicesAllowedArgType = bool +type QuotaServicesgetPaidServicesAllowedRetType = bool + +func getQuotaServicesgetPaidServicesAllowedAttributeTypeOk(arg QuotaServicesgetPaidServicesAllowedAttributeType) (ret QuotaServicesgetPaidServicesAllowedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQuotaServicesgetPaidServicesAllowedAttributeType(arg *QuotaServicesgetPaidServicesAllowedAttributeType, val QuotaServicesgetPaidServicesAllowedRetType) { + *arg = &val +} + +/* + types and functions for totalServiceInstances +*/ + +// isLong +type QuotaServicesGetTotalServiceInstancesAttributeType = *int64 +type QuotaServicesGetTotalServiceInstancesArgType = *int64 +type QuotaServicesGetTotalServiceInstancesRetType = *int64 + +func getQuotaServicesGetTotalServiceInstancesAttributeTypeOk(arg QuotaServicesGetTotalServiceInstancesAttributeType) (ret QuotaServicesGetTotalServiceInstancesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaServicesGetTotalServiceInstancesAttributeType(arg *QuotaServicesGetTotalServiceInstancesAttributeType, val QuotaServicesGetTotalServiceInstancesRetType) { + *arg = val +} + +/* + types and functions for totalServiceKeys +*/ + +// isLong +type QuotaServicesGetTotalServiceKeysAttributeType = *int64 +type QuotaServicesGetTotalServiceKeysArgType = *int64 +type QuotaServicesGetTotalServiceKeysRetType = *int64 + +func getQuotaServicesGetTotalServiceKeysAttributeTypeOk(arg QuotaServicesGetTotalServiceKeysAttributeType) (ret QuotaServicesGetTotalServiceKeysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setQuotaServicesGetTotalServiceKeysAttributeType(arg *QuotaServicesGetTotalServiceKeysAttributeType, val QuotaServicesGetTotalServiceKeysRetType) { + *arg = val +} + +// QuotaServices struct for QuotaServices +type QuotaServices struct { + // REQUIRED + PaidServicesAllowed QuotaServicesgetPaidServicesAllowedAttributeType `json:"paidServicesAllowed" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + TotalServiceInstances QuotaServicesGetTotalServiceInstancesAttributeType `json:"totalServiceInstances" required:"true"` + // The value `null` means `unlimited`. + // REQUIRED + TotalServiceKeys QuotaServicesGetTotalServiceKeysAttributeType `json:"totalServiceKeys" required:"true"` +} + +type _QuotaServices QuotaServices + +// NewQuotaServices instantiates a new QuotaServices 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 NewQuotaServices(paidServicesAllowed QuotaServicesgetPaidServicesAllowedArgType, totalServiceInstances QuotaServicesGetTotalServiceInstancesArgType, totalServiceKeys QuotaServicesGetTotalServiceKeysArgType) *QuotaServices { + this := QuotaServices{} + setQuotaServicesgetPaidServicesAllowedAttributeType(&this.PaidServicesAllowed, paidServicesAllowed) + setQuotaServicesGetTotalServiceInstancesAttributeType(&this.TotalServiceInstances, totalServiceInstances) + setQuotaServicesGetTotalServiceKeysAttributeType(&this.TotalServiceKeys, totalServiceKeys) + return &this +} + +// NewQuotaServicesWithDefaults instantiates a new QuotaServices 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 NewQuotaServicesWithDefaults() *QuotaServices { + this := QuotaServices{} + return &this +} + +// GetPaidServicesAllowed returns the PaidServicesAllowed field value +func (o *QuotaServices) GetPaidServicesAllowed() (ret QuotaServicesgetPaidServicesAllowedRetType) { + ret, _ = o.GetPaidServicesAllowedOk() + return ret +} + +// GetPaidServicesAllowedOk returns a tuple with the PaidServicesAllowed field value +// and a boolean to check if the value has been set. +func (o *QuotaServices) GetPaidServicesAllowedOk() (ret QuotaServicesgetPaidServicesAllowedRetType, ok bool) { + return getQuotaServicesgetPaidServicesAllowedAttributeTypeOk(o.PaidServicesAllowed) +} + +// SetPaidServicesAllowed sets field value +func (o *QuotaServices) SetPaidServicesAllowed(v QuotaServicesgetPaidServicesAllowedRetType) { + setQuotaServicesgetPaidServicesAllowedAttributeType(&o.PaidServicesAllowed, v) +} + +// GetTotalServiceInstances returns the TotalServiceInstances field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaServices) GetTotalServiceInstances() (ret QuotaServicesGetTotalServiceInstancesRetType) { + ret, _ = o.GetTotalServiceInstancesOk() + return ret +} + +// GetTotalServiceInstancesOk returns a tuple with the TotalServiceInstances field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaServices) GetTotalServiceInstancesOk() (ret QuotaServicesGetTotalServiceInstancesRetType, ok bool) { + return getQuotaServicesGetTotalServiceInstancesAttributeTypeOk(o.TotalServiceInstances) +} + +// SetTotalServiceInstances sets field value +func (o *QuotaServices) SetTotalServiceInstances(v QuotaServicesGetTotalServiceInstancesRetType) { + setQuotaServicesGetTotalServiceInstancesAttributeType(&o.TotalServiceInstances, v) +} + +// GetTotalServiceKeys returns the TotalServiceKeys field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *QuotaServices) GetTotalServiceKeys() (ret QuotaServicesGetTotalServiceKeysRetType) { + ret, _ = o.GetTotalServiceKeysOk() + return ret +} + +// GetTotalServiceKeysOk returns a tuple with the TotalServiceKeys field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QuotaServices) GetTotalServiceKeysOk() (ret QuotaServicesGetTotalServiceKeysRetType, ok bool) { + return getQuotaServicesGetTotalServiceKeysAttributeTypeOk(o.TotalServiceKeys) +} + +// SetTotalServiceKeys sets field value +func (o *QuotaServices) SetTotalServiceKeys(v QuotaServicesGetTotalServiceKeysRetType) { + setQuotaServicesGetTotalServiceKeysAttributeType(&o.TotalServiceKeys, v) +} + +func (o QuotaServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getQuotaServicesgetPaidServicesAllowedAttributeTypeOk(o.PaidServicesAllowed); ok { + toSerialize["PaidServicesAllowed"] = val + } + if val, ok := getQuotaServicesGetTotalServiceInstancesAttributeTypeOk(o.TotalServiceInstances); ok { + toSerialize["TotalServiceInstances"] = val + } + if val, ok := getQuotaServicesGetTotalServiceKeysAttributeTypeOk(o.TotalServiceKeys); ok { + toSerialize["TotalServiceKeys"] = val + } + return toSerialize, nil +} + +type NullableQuotaServices struct { + value *QuotaServices + isSet bool +} + +func (v NullableQuotaServices) Get() *QuotaServices { + return v.value +} + +func (v *NullableQuotaServices) Set(val *QuotaServices) { + v.value = val + v.isSet = true +} + +func (v NullableQuotaServices) IsSet() bool { + return v.isSet +} + +func (v *NullableQuotaServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuotaServices(val *QuotaServices) *NullableQuotaServices { + return &NullableQuotaServices{value: val, isSet: true} +} + +func (v NullableQuotaServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuotaServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_quota_services_test.go b/services/scf/model_quota_services_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_quota_services_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_quota_test.go b/services/scf/model_quota_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_quota_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space.go b/services/scf/model_space.go new file mode 100644 index 000000000..68752239f --- /dev/null +++ b/services/scf/model_space.go @@ -0,0 +1,433 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "time" +) + +// checks if the Space type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Space{} + +/* + types and functions for createdAt +*/ + +// isDateTime +type SpaceGetCreatedAtAttributeType = *time.Time +type SpaceGetCreatedAtArgType = time.Time +type SpaceGetCreatedAtRetType = time.Time + +func getSpaceGetCreatedAtAttributeTypeOk(arg SpaceGetCreatedAtAttributeType) (ret SpaceGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetCreatedAtAttributeType(arg *SpaceGetCreatedAtAttributeType, val SpaceGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for guid +*/ + +// isNotNullableString +type SpaceGetGuidAttributeType = *string + +func getSpaceGetGuidAttributeTypeOk(arg SpaceGetGuidAttributeType) (ret SpaceGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetGuidAttributeType(arg *SpaceGetGuidAttributeType, val SpaceGetGuidRetType) { + *arg = &val +} + +type SpaceGetGuidArgType = string +type SpaceGetGuidRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type SpaceGetNameAttributeType = *string + +func getSpaceGetNameAttributeTypeOk(arg SpaceGetNameAttributeType) (ret SpaceGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetNameAttributeType(arg *SpaceGetNameAttributeType, val SpaceGetNameRetType) { + *arg = &val +} + +type SpaceGetNameArgType = string +type SpaceGetNameRetType = string + +/* + types and functions for orgId +*/ + +// isNotNullableString +type SpaceGetOrgIdAttributeType = *string + +func getSpaceGetOrgIdAttributeTypeOk(arg SpaceGetOrgIdAttributeType) (ret SpaceGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetOrgIdAttributeType(arg *SpaceGetOrgIdAttributeType, val SpaceGetOrgIdRetType) { + *arg = &val +} + +type SpaceGetOrgIdArgType = string +type SpaceGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type SpaceGetPlatformIdAttributeType = *string + +func getSpaceGetPlatformIdAttributeTypeOk(arg SpaceGetPlatformIdAttributeType) (ret SpaceGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetPlatformIdAttributeType(arg *SpaceGetPlatformIdAttributeType, val SpaceGetPlatformIdRetType) { + *arg = &val +} + +type SpaceGetPlatformIdArgType = string +type SpaceGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type SpaceGetProjectIdAttributeType = *string + +func getSpaceGetProjectIdAttributeTypeOk(arg SpaceGetProjectIdAttributeType) (ret SpaceGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetProjectIdAttributeType(arg *SpaceGetProjectIdAttributeType, val SpaceGetProjectIdRetType) { + *arg = &val +} + +type SpaceGetProjectIdArgType = string +type SpaceGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type SpaceGetRegionAttributeType = *string + +func getSpaceGetRegionAttributeTypeOk(arg SpaceGetRegionAttributeType) (ret SpaceGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetRegionAttributeType(arg *SpaceGetRegionAttributeType, val SpaceGetRegionRetType) { + *arg = &val +} + +type SpaceGetRegionArgType = string +type SpaceGetRegionRetType = string + +/* + types and functions for updatedAt +*/ + +// isDateTime +type SpaceGetUpdatedAtAttributeType = *time.Time +type SpaceGetUpdatedAtArgType = time.Time +type SpaceGetUpdatedAtRetType = time.Time + +func getSpaceGetUpdatedAtAttributeTypeOk(arg SpaceGetUpdatedAtAttributeType) (ret SpaceGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceGetUpdatedAtAttributeType(arg *SpaceGetUpdatedAtAttributeType, val SpaceGetUpdatedAtRetType) { + *arg = &val +} + +// Space struct for Space +type Space struct { + // REQUIRED + CreatedAt SpaceGetCreatedAtAttributeType `json:"createdAt" required:"true"` + // REQUIRED + Guid SpaceGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + Name SpaceGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + OrgId SpaceGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + PlatformId SpaceGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId SpaceGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region SpaceGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + UpdatedAt SpaceGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` +} + +type _Space Space + +// NewSpace instantiates a new Space 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 NewSpace(createdAt SpaceGetCreatedAtArgType, guid SpaceGetGuidArgType, name SpaceGetNameArgType, orgId SpaceGetOrgIdArgType, platformId SpaceGetPlatformIdArgType, projectId SpaceGetProjectIdArgType, region SpaceGetRegionArgType, updatedAt SpaceGetUpdatedAtArgType) *Space { + this := Space{} + setSpaceGetCreatedAtAttributeType(&this.CreatedAt, createdAt) + setSpaceGetGuidAttributeType(&this.Guid, guid) + setSpaceGetNameAttributeType(&this.Name, name) + setSpaceGetOrgIdAttributeType(&this.OrgId, orgId) + setSpaceGetPlatformIdAttributeType(&this.PlatformId, platformId) + setSpaceGetProjectIdAttributeType(&this.ProjectId, projectId) + setSpaceGetRegionAttributeType(&this.Region, region) + setSpaceGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) + return &this +} + +// NewSpaceWithDefaults instantiates a new Space 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 NewSpaceWithDefaults() *Space { + this := Space{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *Space) GetCreatedAt() (ret SpaceGetCreatedAtRetType) { + ret, _ = o.GetCreatedAtOk() + return ret +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *Space) GetCreatedAtOk() (ret SpaceGetCreatedAtRetType, ok bool) { + return getSpaceGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// SetCreatedAt sets field value +func (o *Space) SetCreatedAt(v SpaceGetCreatedAtRetType) { + setSpaceGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetGuid returns the Guid field value +func (o *Space) GetGuid() (ret SpaceGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *Space) GetGuidOk() (ret SpaceGetGuidRetType, ok bool) { + return getSpaceGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *Space) SetGuid(v SpaceGetGuidRetType) { + setSpaceGetGuidAttributeType(&o.Guid, v) +} + +// GetName returns the Name field value +func (o *Space) GetName() (ret SpaceGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Space) GetNameOk() (ret SpaceGetNameRetType, ok bool) { + return getSpaceGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *Space) SetName(v SpaceGetNameRetType) { + setSpaceGetNameAttributeType(&o.Name, v) +} + +// GetOrgId returns the OrgId field value +func (o *Space) GetOrgId() (ret SpaceGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *Space) GetOrgIdOk() (ret SpaceGetOrgIdRetType, ok bool) { + return getSpaceGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *Space) SetOrgId(v SpaceGetOrgIdRetType) { + setSpaceGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *Space) GetPlatformId() (ret SpaceGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *Space) GetPlatformIdOk() (ret SpaceGetPlatformIdRetType, ok bool) { + return getSpaceGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *Space) SetPlatformId(v SpaceGetPlatformIdRetType) { + setSpaceGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *Space) GetProjectId() (ret SpaceGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *Space) GetProjectIdOk() (ret SpaceGetProjectIdRetType, ok bool) { + return getSpaceGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *Space) SetProjectId(v SpaceGetProjectIdRetType) { + setSpaceGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *Space) GetRegion() (ret SpaceGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *Space) GetRegionOk() (ret SpaceGetRegionRetType, ok bool) { + return getSpaceGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *Space) SetRegion(v SpaceGetRegionRetType) { + setSpaceGetRegionAttributeType(&o.Region, v) +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *Space) GetUpdatedAt() (ret SpaceGetUpdatedAtRetType) { + ret, _ = o.GetUpdatedAtOk() + return ret +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *Space) GetUpdatedAtOk() (ret SpaceGetUpdatedAtRetType, ok bool) { + return getSpaceGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// SetUpdatedAt sets field value +func (o *Space) SetUpdatedAt(v SpaceGetUpdatedAtRetType) { + setSpaceGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +func (o Space) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpaceGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getSpaceGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getSpaceGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getSpaceGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getSpaceGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getSpaceGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getSpaceGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getSpaceGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + return toSerialize, nil +} + +type NullableSpace struct { + value *Space + isSet bool +} + +func (v NullableSpace) Get() *Space { + return v.value +} + +func (v *NullableSpace) Set(val *Space) { + v.value = val + v.isSet = true +} + +func (v NullableSpace) IsSet() bool { + return v.isSet +} + +func (v *NullableSpace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpace(val *Space) *NullableSpace { + return &NullableSpace{value: val, isSet: true} +} + +func (v NullableSpace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_delete_response.go b/services/scf/model_space_delete_response.go new file mode 100644 index 000000000..8c79bc094 --- /dev/null +++ b/services/scf/model_space_delete_response.go @@ -0,0 +1,126 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the SpaceDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpaceDeleteResponse{} + +/* + types and functions for message +*/ + +// isNotNullableString +type SpaceDeleteResponseGetMessageAttributeType = *string + +func getSpaceDeleteResponseGetMessageAttributeTypeOk(arg SpaceDeleteResponseGetMessageAttributeType) (ret SpaceDeleteResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceDeleteResponseGetMessageAttributeType(arg *SpaceDeleteResponseGetMessageAttributeType, val SpaceDeleteResponseGetMessageRetType) { + *arg = &val +} + +type SpaceDeleteResponseGetMessageArgType = string +type SpaceDeleteResponseGetMessageRetType = string + +// SpaceDeleteResponse struct for SpaceDeleteResponse +type SpaceDeleteResponse struct { + // REQUIRED + Message SpaceDeleteResponseGetMessageAttributeType `json:"message" required:"true"` +} + +type _SpaceDeleteResponse SpaceDeleteResponse + +// NewSpaceDeleteResponse instantiates a new SpaceDeleteResponse 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 NewSpaceDeleteResponse(message SpaceDeleteResponseGetMessageArgType) *SpaceDeleteResponse { + this := SpaceDeleteResponse{} + setSpaceDeleteResponseGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewSpaceDeleteResponseWithDefaults instantiates a new SpaceDeleteResponse 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 NewSpaceDeleteResponseWithDefaults() *SpaceDeleteResponse { + this := SpaceDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *SpaceDeleteResponse) GetMessage() (ret SpaceDeleteResponseGetMessageRetType) { + 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 *SpaceDeleteResponse) GetMessageOk() (ret SpaceDeleteResponseGetMessageRetType, ok bool) { + return getSpaceDeleteResponseGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *SpaceDeleteResponse) SetMessage(v SpaceDeleteResponseGetMessageRetType) { + setSpaceDeleteResponseGetMessageAttributeType(&o.Message, v) +} + +func (o SpaceDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpaceDeleteResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableSpaceDeleteResponse struct { + value *SpaceDeleteResponse + isSet bool +} + +func (v NullableSpaceDeleteResponse) Get() *SpaceDeleteResponse { + return v.value +} + +func (v *NullableSpaceDeleteResponse) Set(val *SpaceDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSpaceDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSpaceDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpaceDeleteResponse(val *SpaceDeleteResponse) *NullableSpaceDeleteResponse { + return &NullableSpaceDeleteResponse{value: val, isSet: true} +} + +func (v NullableSpaceDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpaceDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_delete_response_test.go b/services/scf/model_space_delete_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_delete_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space_role_create_bff_request.go b/services/scf/model_space_role_create_bff_request.go new file mode 100644 index 000000000..7e2a92d59 --- /dev/null +++ b/services/scf/model_space_role_create_bff_request.go @@ -0,0 +1,125 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the SpaceRoleCreateBffRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpaceRoleCreateBffRequest{} + +/* + types and functions for type +*/ + +// isEnumRef +type SpaceRoleCreateBffRequestGetTypeAttributeType = *SpaceRoleType +type SpaceRoleCreateBffRequestGetTypeArgType = SpaceRoleType +type SpaceRoleCreateBffRequestGetTypeRetType = SpaceRoleType + +func getSpaceRoleCreateBffRequestGetTypeAttributeTypeOk(arg SpaceRoleCreateBffRequestGetTypeAttributeType) (ret SpaceRoleCreateBffRequestGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateBffRequestGetTypeAttributeType(arg *SpaceRoleCreateBffRequestGetTypeAttributeType, val SpaceRoleCreateBffRequestGetTypeRetType) { + *arg = &val +} + +// SpaceRoleCreateBffRequest struct for SpaceRoleCreateBffRequest +type SpaceRoleCreateBffRequest struct { + // REQUIRED + Type SpaceRoleCreateBffRequestGetTypeAttributeType `json:"type" required:"true"` +} + +type _SpaceRoleCreateBffRequest SpaceRoleCreateBffRequest + +// NewSpaceRoleCreateBffRequest instantiates a new SpaceRoleCreateBffRequest 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 NewSpaceRoleCreateBffRequest(types SpaceRoleCreateBffRequestGetTypeArgType) *SpaceRoleCreateBffRequest { + this := SpaceRoleCreateBffRequest{} + setSpaceRoleCreateBffRequestGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewSpaceRoleCreateBffRequestWithDefaults instantiates a new SpaceRoleCreateBffRequest 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 NewSpaceRoleCreateBffRequestWithDefaults() *SpaceRoleCreateBffRequest { + this := SpaceRoleCreateBffRequest{} + return &this +} + +// GetType returns the Type field value +func (o *SpaceRoleCreateBffRequest) GetType() (ret SpaceRoleCreateBffRequestGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateBffRequest) GetTypeOk() (ret SpaceRoleCreateBffRequestGetTypeRetType, ok bool) { + return getSpaceRoleCreateBffRequestGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *SpaceRoleCreateBffRequest) SetType(v SpaceRoleCreateBffRequestGetTypeRetType) { + setSpaceRoleCreateBffRequestGetTypeAttributeType(&o.Type, v) +} + +func (o SpaceRoleCreateBffRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpaceRoleCreateBffRequestGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableSpaceRoleCreateBffRequest struct { + value *SpaceRoleCreateBffRequest + isSet bool +} + +func (v NullableSpaceRoleCreateBffRequest) Get() *SpaceRoleCreateBffRequest { + return v.value +} + +func (v *NullableSpaceRoleCreateBffRequest) Set(val *SpaceRoleCreateBffRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSpaceRoleCreateBffRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSpaceRoleCreateBffRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpaceRoleCreateBffRequest(val *SpaceRoleCreateBffRequest) *NullableSpaceRoleCreateBffRequest { + return &NullableSpaceRoleCreateBffRequest{value: val, isSet: true} +} + +func (v NullableSpaceRoleCreateBffRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpaceRoleCreateBffRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_role_create_bff_request_test.go b/services/scf/model_space_role_create_bff_request_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_role_create_bff_request_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space_role_create_bff_response.go b/services/scf/model_space_role_create_bff_response.go new file mode 100644 index 000000000..66aaea57c --- /dev/null +++ b/services/scf/model_space_role_create_bff_response.go @@ -0,0 +1,172 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the SpaceRoleCreateBffResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpaceRoleCreateBffResponse{} + +/* + types and functions for orgRole +*/ + +// isModel +type SpaceRoleCreateBffResponseGetOrgRoleAttributeType = *OrgRoleResponse +type SpaceRoleCreateBffResponseGetOrgRoleArgType = OrgRoleResponse +type SpaceRoleCreateBffResponseGetOrgRoleRetType = OrgRoleResponse + +func getSpaceRoleCreateBffResponseGetOrgRoleAttributeTypeOk(arg SpaceRoleCreateBffResponseGetOrgRoleAttributeType) (ret SpaceRoleCreateBffResponseGetOrgRoleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateBffResponseGetOrgRoleAttributeType(arg *SpaceRoleCreateBffResponseGetOrgRoleAttributeType, val SpaceRoleCreateBffResponseGetOrgRoleRetType) { + *arg = &val +} + +/* + types and functions for spaceRole +*/ + +// isModel +type SpaceRoleCreateBffResponseGetSpaceRoleAttributeType = *SpaceRoleCreateResponse +type SpaceRoleCreateBffResponseGetSpaceRoleArgType = SpaceRoleCreateResponse +type SpaceRoleCreateBffResponseGetSpaceRoleRetType = SpaceRoleCreateResponse + +func getSpaceRoleCreateBffResponseGetSpaceRoleAttributeTypeOk(arg SpaceRoleCreateBffResponseGetSpaceRoleAttributeType) (ret SpaceRoleCreateBffResponseGetSpaceRoleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateBffResponseGetSpaceRoleAttributeType(arg *SpaceRoleCreateBffResponseGetSpaceRoleAttributeType, val SpaceRoleCreateBffResponseGetSpaceRoleRetType) { + *arg = &val +} + +// SpaceRoleCreateBffResponse struct for SpaceRoleCreateBffResponse +type SpaceRoleCreateBffResponse struct { + OrgRole SpaceRoleCreateBffResponseGetOrgRoleAttributeType `json:"orgRole,omitempty"` + // REQUIRED + SpaceRole SpaceRoleCreateBffResponseGetSpaceRoleAttributeType `json:"spaceRole" required:"true"` +} + +type _SpaceRoleCreateBffResponse SpaceRoleCreateBffResponse + +// NewSpaceRoleCreateBffResponse instantiates a new SpaceRoleCreateBffResponse 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 NewSpaceRoleCreateBffResponse(spaceRole SpaceRoleCreateBffResponseGetSpaceRoleArgType) *SpaceRoleCreateBffResponse { + this := SpaceRoleCreateBffResponse{} + setSpaceRoleCreateBffResponseGetSpaceRoleAttributeType(&this.SpaceRole, spaceRole) + return &this +} + +// NewSpaceRoleCreateBffResponseWithDefaults instantiates a new SpaceRoleCreateBffResponse 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 NewSpaceRoleCreateBffResponseWithDefaults() *SpaceRoleCreateBffResponse { + this := SpaceRoleCreateBffResponse{} + return &this +} + +// GetOrgRole returns the OrgRole field value if set, zero value otherwise. +func (o *SpaceRoleCreateBffResponse) GetOrgRole() (res SpaceRoleCreateBffResponseGetOrgRoleRetType) { + res, _ = o.GetOrgRoleOk() + return +} + +// GetOrgRoleOk returns a tuple with the OrgRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateBffResponse) GetOrgRoleOk() (ret SpaceRoleCreateBffResponseGetOrgRoleRetType, ok bool) { + return getSpaceRoleCreateBffResponseGetOrgRoleAttributeTypeOk(o.OrgRole) +} + +// HasOrgRole returns a boolean if a field has been set. +func (o *SpaceRoleCreateBffResponse) HasOrgRole() bool { + _, ok := o.GetOrgRoleOk() + return ok +} + +// SetOrgRole gets a reference to the given OrgRoleResponse and assigns it to the OrgRole field. +func (o *SpaceRoleCreateBffResponse) SetOrgRole(v SpaceRoleCreateBffResponseGetOrgRoleRetType) { + setSpaceRoleCreateBffResponseGetOrgRoleAttributeType(&o.OrgRole, v) +} + +// GetSpaceRole returns the SpaceRole field value +func (o *SpaceRoleCreateBffResponse) GetSpaceRole() (ret SpaceRoleCreateBffResponseGetSpaceRoleRetType) { + ret, _ = o.GetSpaceRoleOk() + return ret +} + +// GetSpaceRoleOk returns a tuple with the SpaceRole field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateBffResponse) GetSpaceRoleOk() (ret SpaceRoleCreateBffResponseGetSpaceRoleRetType, ok bool) { + return getSpaceRoleCreateBffResponseGetSpaceRoleAttributeTypeOk(o.SpaceRole) +} + +// SetSpaceRole sets field value +func (o *SpaceRoleCreateBffResponse) SetSpaceRole(v SpaceRoleCreateBffResponseGetSpaceRoleRetType) { + setSpaceRoleCreateBffResponseGetSpaceRoleAttributeType(&o.SpaceRole, v) +} + +func (o SpaceRoleCreateBffResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpaceRoleCreateBffResponseGetOrgRoleAttributeTypeOk(o.OrgRole); ok { + toSerialize["OrgRole"] = val + } + if val, ok := getSpaceRoleCreateBffResponseGetSpaceRoleAttributeTypeOk(o.SpaceRole); ok { + toSerialize["SpaceRole"] = val + } + return toSerialize, nil +} + +type NullableSpaceRoleCreateBffResponse struct { + value *SpaceRoleCreateBffResponse + isSet bool +} + +func (v NullableSpaceRoleCreateBffResponse) Get() *SpaceRoleCreateBffResponse { + return v.value +} + +func (v *NullableSpaceRoleCreateBffResponse) Set(val *SpaceRoleCreateBffResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSpaceRoleCreateBffResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSpaceRoleCreateBffResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpaceRoleCreateBffResponse(val *SpaceRoleCreateBffResponse) *NullableSpaceRoleCreateBffResponse { + return &NullableSpaceRoleCreateBffResponse{value: val, isSet: true} +} + +func (v NullableSpaceRoleCreateBffResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpaceRoleCreateBffResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_role_create_bff_response_test.go b/services/scf/model_space_role_create_bff_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_role_create_bff_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space_role_create_response.go b/services/scf/model_space_role_create_response.go new file mode 100644 index 000000000..55a2d0071 --- /dev/null +++ b/services/scf/model_space_role_create_response.go @@ -0,0 +1,389 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the SpaceRoleCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpaceRoleCreateResponse{} + +/* + types and functions for guid +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetGuidAttributeType = *string + +func getSpaceRoleCreateResponseGetGuidAttributeTypeOk(arg SpaceRoleCreateResponseGetGuidAttributeType) (ret SpaceRoleCreateResponseGetGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetGuidAttributeType(arg *SpaceRoleCreateResponseGetGuidAttributeType, val SpaceRoleCreateResponseGetGuidRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetGuidArgType = string +type SpaceRoleCreateResponseGetGuidRetType = string + +/* + types and functions for orgId +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetOrgIdAttributeType = *string + +func getSpaceRoleCreateResponseGetOrgIdAttributeTypeOk(arg SpaceRoleCreateResponseGetOrgIdAttributeType) (ret SpaceRoleCreateResponseGetOrgIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetOrgIdAttributeType(arg *SpaceRoleCreateResponseGetOrgIdAttributeType, val SpaceRoleCreateResponseGetOrgIdRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetOrgIdArgType = string +type SpaceRoleCreateResponseGetOrgIdRetType = string + +/* + types and functions for platformId +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetPlatformIdAttributeType = *string + +func getSpaceRoleCreateResponseGetPlatformIdAttributeTypeOk(arg SpaceRoleCreateResponseGetPlatformIdAttributeType) (ret SpaceRoleCreateResponseGetPlatformIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetPlatformIdAttributeType(arg *SpaceRoleCreateResponseGetPlatformIdAttributeType, val SpaceRoleCreateResponseGetPlatformIdRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetPlatformIdArgType = string +type SpaceRoleCreateResponseGetPlatformIdRetType = string + +/* + types and functions for projectId +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetProjectIdAttributeType = *string + +func getSpaceRoleCreateResponseGetProjectIdAttributeTypeOk(arg SpaceRoleCreateResponseGetProjectIdAttributeType) (ret SpaceRoleCreateResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetProjectIdAttributeType(arg *SpaceRoleCreateResponseGetProjectIdAttributeType, val SpaceRoleCreateResponseGetProjectIdRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetProjectIdArgType = string +type SpaceRoleCreateResponseGetProjectIdRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetRegionAttributeType = *string + +func getSpaceRoleCreateResponseGetRegionAttributeTypeOk(arg SpaceRoleCreateResponseGetRegionAttributeType) (ret SpaceRoleCreateResponseGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetRegionAttributeType(arg *SpaceRoleCreateResponseGetRegionAttributeType, val SpaceRoleCreateResponseGetRegionRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetRegionArgType = string +type SpaceRoleCreateResponseGetRegionRetType = string + +/* + types and functions for spaceId +*/ + +// isNotNullableString +type SpaceRoleCreateResponseGetSpaceIdAttributeType = *string + +func getSpaceRoleCreateResponseGetSpaceIdAttributeTypeOk(arg SpaceRoleCreateResponseGetSpaceIdAttributeType) (ret SpaceRoleCreateResponseGetSpaceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetSpaceIdAttributeType(arg *SpaceRoleCreateResponseGetSpaceIdAttributeType, val SpaceRoleCreateResponseGetSpaceIdRetType) { + *arg = &val +} + +type SpaceRoleCreateResponseGetSpaceIdArgType = string +type SpaceRoleCreateResponseGetSpaceIdRetType = string + +/* + types and functions for type +*/ + +// isEnumRef +type SpaceRoleCreateResponseGetTypeAttributeType = *SpaceRoleType +type SpaceRoleCreateResponseGetTypeArgType = SpaceRoleType +type SpaceRoleCreateResponseGetTypeRetType = SpaceRoleType + +func getSpaceRoleCreateResponseGetTypeAttributeTypeOk(arg SpaceRoleCreateResponseGetTypeAttributeType) (ret SpaceRoleCreateResponseGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpaceRoleCreateResponseGetTypeAttributeType(arg *SpaceRoleCreateResponseGetTypeAttributeType, val SpaceRoleCreateResponseGetTypeRetType) { + *arg = &val +} + +// SpaceRoleCreateResponse struct for SpaceRoleCreateResponse +type SpaceRoleCreateResponse struct { + // REQUIRED + Guid SpaceRoleCreateResponseGetGuidAttributeType `json:"guid" required:"true"` + // REQUIRED + OrgId SpaceRoleCreateResponseGetOrgIdAttributeType `json:"orgId" required:"true"` + // REQUIRED + PlatformId SpaceRoleCreateResponseGetPlatformIdAttributeType `json:"platformId" required:"true"` + // REQUIRED + ProjectId SpaceRoleCreateResponseGetProjectIdAttributeType `json:"projectId" required:"true"` + // REQUIRED + Region SpaceRoleCreateResponseGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + SpaceId SpaceRoleCreateResponseGetSpaceIdAttributeType `json:"spaceId" required:"true"` + // REQUIRED + Type SpaceRoleCreateResponseGetTypeAttributeType `json:"type" required:"true"` +} + +type _SpaceRoleCreateResponse SpaceRoleCreateResponse + +// NewSpaceRoleCreateResponse instantiates a new SpaceRoleCreateResponse 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 NewSpaceRoleCreateResponse(guid SpaceRoleCreateResponseGetGuidArgType, orgId SpaceRoleCreateResponseGetOrgIdArgType, platformId SpaceRoleCreateResponseGetPlatformIdArgType, projectId SpaceRoleCreateResponseGetProjectIdArgType, region SpaceRoleCreateResponseGetRegionArgType, spaceId SpaceRoleCreateResponseGetSpaceIdArgType, types SpaceRoleCreateResponseGetTypeArgType) *SpaceRoleCreateResponse { + this := SpaceRoleCreateResponse{} + setSpaceRoleCreateResponseGetGuidAttributeType(&this.Guid, guid) + setSpaceRoleCreateResponseGetOrgIdAttributeType(&this.OrgId, orgId) + setSpaceRoleCreateResponseGetPlatformIdAttributeType(&this.PlatformId, platformId) + setSpaceRoleCreateResponseGetProjectIdAttributeType(&this.ProjectId, projectId) + setSpaceRoleCreateResponseGetRegionAttributeType(&this.Region, region) + setSpaceRoleCreateResponseGetSpaceIdAttributeType(&this.SpaceId, spaceId) + setSpaceRoleCreateResponseGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewSpaceRoleCreateResponseWithDefaults instantiates a new SpaceRoleCreateResponse 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 NewSpaceRoleCreateResponseWithDefaults() *SpaceRoleCreateResponse { + this := SpaceRoleCreateResponse{} + return &this +} + +// GetGuid returns the Guid field value +func (o *SpaceRoleCreateResponse) GetGuid() (ret SpaceRoleCreateResponseGetGuidRetType) { + ret, _ = o.GetGuidOk() + return ret +} + +// GetGuidOk returns a tuple with the Guid field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetGuidOk() (ret SpaceRoleCreateResponseGetGuidRetType, ok bool) { + return getSpaceRoleCreateResponseGetGuidAttributeTypeOk(o.Guid) +} + +// SetGuid sets field value +func (o *SpaceRoleCreateResponse) SetGuid(v SpaceRoleCreateResponseGetGuidRetType) { + setSpaceRoleCreateResponseGetGuidAttributeType(&o.Guid, v) +} + +// GetOrgId returns the OrgId field value +func (o *SpaceRoleCreateResponse) GetOrgId() (ret SpaceRoleCreateResponseGetOrgIdRetType) { + ret, _ = o.GetOrgIdOk() + return ret +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetOrgIdOk() (ret SpaceRoleCreateResponseGetOrgIdRetType, ok bool) { + return getSpaceRoleCreateResponseGetOrgIdAttributeTypeOk(o.OrgId) +} + +// SetOrgId sets field value +func (o *SpaceRoleCreateResponse) SetOrgId(v SpaceRoleCreateResponseGetOrgIdRetType) { + setSpaceRoleCreateResponseGetOrgIdAttributeType(&o.OrgId, v) +} + +// GetPlatformId returns the PlatformId field value +func (o *SpaceRoleCreateResponse) GetPlatformId() (ret SpaceRoleCreateResponseGetPlatformIdRetType) { + ret, _ = o.GetPlatformIdOk() + return ret +} + +// GetPlatformIdOk returns a tuple with the PlatformId field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetPlatformIdOk() (ret SpaceRoleCreateResponseGetPlatformIdRetType, ok bool) { + return getSpaceRoleCreateResponseGetPlatformIdAttributeTypeOk(o.PlatformId) +} + +// SetPlatformId sets field value +func (o *SpaceRoleCreateResponse) SetPlatformId(v SpaceRoleCreateResponseGetPlatformIdRetType) { + setSpaceRoleCreateResponseGetPlatformIdAttributeType(&o.PlatformId, v) +} + +// GetProjectId returns the ProjectId field value +func (o *SpaceRoleCreateResponse) GetProjectId() (ret SpaceRoleCreateResponseGetProjectIdRetType) { + ret, _ = o.GetProjectIdOk() + return ret +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetProjectIdOk() (ret SpaceRoleCreateResponseGetProjectIdRetType, ok bool) { + return getSpaceRoleCreateResponseGetProjectIdAttributeTypeOk(o.ProjectId) +} + +// SetProjectId sets field value +func (o *SpaceRoleCreateResponse) SetProjectId(v SpaceRoleCreateResponseGetProjectIdRetType) { + setSpaceRoleCreateResponseGetProjectIdAttributeType(&o.ProjectId, v) +} + +// GetRegion returns the Region field value +func (o *SpaceRoleCreateResponse) GetRegion() (ret SpaceRoleCreateResponseGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetRegionOk() (ret SpaceRoleCreateResponseGetRegionRetType, ok bool) { + return getSpaceRoleCreateResponseGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *SpaceRoleCreateResponse) SetRegion(v SpaceRoleCreateResponseGetRegionRetType) { + setSpaceRoleCreateResponseGetRegionAttributeType(&o.Region, v) +} + +// GetSpaceId returns the SpaceId field value +func (o *SpaceRoleCreateResponse) GetSpaceId() (ret SpaceRoleCreateResponseGetSpaceIdRetType) { + ret, _ = o.GetSpaceIdOk() + return ret +} + +// GetSpaceIdOk returns a tuple with the SpaceId field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetSpaceIdOk() (ret SpaceRoleCreateResponseGetSpaceIdRetType, ok bool) { + return getSpaceRoleCreateResponseGetSpaceIdAttributeTypeOk(o.SpaceId) +} + +// SetSpaceId sets field value +func (o *SpaceRoleCreateResponse) SetSpaceId(v SpaceRoleCreateResponseGetSpaceIdRetType) { + setSpaceRoleCreateResponseGetSpaceIdAttributeType(&o.SpaceId, v) +} + +// GetType returns the Type field value +func (o *SpaceRoleCreateResponse) GetType() (ret SpaceRoleCreateResponseGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SpaceRoleCreateResponse) GetTypeOk() (ret SpaceRoleCreateResponseGetTypeRetType, ok bool) { + return getSpaceRoleCreateResponseGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *SpaceRoleCreateResponse) SetType(v SpaceRoleCreateResponseGetTypeRetType) { + setSpaceRoleCreateResponseGetTypeAttributeType(&o.Type, v) +} + +func (o SpaceRoleCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpaceRoleCreateResponseGetGuidAttributeTypeOk(o.Guid); ok { + toSerialize["Guid"] = val + } + if val, ok := getSpaceRoleCreateResponseGetOrgIdAttributeTypeOk(o.OrgId); ok { + toSerialize["OrgId"] = val + } + if val, ok := getSpaceRoleCreateResponseGetPlatformIdAttributeTypeOk(o.PlatformId); ok { + toSerialize["PlatformId"] = val + } + if val, ok := getSpaceRoleCreateResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val + } + if val, ok := getSpaceRoleCreateResponseGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getSpaceRoleCreateResponseGetSpaceIdAttributeTypeOk(o.SpaceId); ok { + toSerialize["SpaceId"] = val + } + if val, ok := getSpaceRoleCreateResponseGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableSpaceRoleCreateResponse struct { + value *SpaceRoleCreateResponse + isSet bool +} + +func (v NullableSpaceRoleCreateResponse) Get() *SpaceRoleCreateResponse { + return v.value +} + +func (v *NullableSpaceRoleCreateResponse) Set(val *SpaceRoleCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSpaceRoleCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSpaceRoleCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpaceRoleCreateResponse(val *SpaceRoleCreateResponse) *NullableSpaceRoleCreateResponse { + return &NullableSpaceRoleCreateResponse{value: val, isSet: true} +} + +func (v NullableSpaceRoleCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpaceRoleCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_role_create_response_test.go b/services/scf/model_space_role_create_response_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_role_create_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space_role_type.go b/services/scf/model_space_role_type.go new file mode 100644 index 000000000..7908d4d73 --- /dev/null +++ b/services/scf/model_space_role_type.go @@ -0,0 +1,119 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "fmt" +) + +// SpaceRoleType the model 'SpaceRoleType' +type SpaceRoleType string + +// List of SpaceRoleType +const ( + SPACEROLETYPE_AUDITOR SpaceRoleType = "space_auditor" + SPACEROLETYPE_DEVELOPER SpaceRoleType = "space_developer" + SPACEROLETYPE_MANAGER SpaceRoleType = "space_manager" + SPACEROLETYPE_SUPPORTER SpaceRoleType = "space_supporter" +) + +// All allowed values of SpaceRoleType enum +var AllowedSpaceRoleTypeEnumValues = []SpaceRoleType{ + "space_auditor", + "space_developer", + "space_manager", + "space_supporter", +} + +func (v *SpaceRoleType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := SpaceRoleType(value) + for _, existing := range AllowedSpaceRoleTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SpaceRoleType", value) +} + +// NewSpaceRoleTypeFromValue returns a pointer to a valid SpaceRoleType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSpaceRoleTypeFromValue(v string) (*SpaceRoleType, error) { + ev := SpaceRoleType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SpaceRoleType: valid values are %v", v, AllowedSpaceRoleTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SpaceRoleType) IsValid() bool { + for _, existing := range AllowedSpaceRoleTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SpaceRoleType value +func (v SpaceRoleType) Ptr() *SpaceRoleType { + return &v +} + +type NullableSpaceRoleType struct { + value *SpaceRoleType + isSet bool +} + +func (v NullableSpaceRoleType) Get() *SpaceRoleType { + return v.value +} + +func (v *NullableSpaceRoleType) Set(val *SpaceRoleType) { + v.value = val + v.isSet = true +} + +func (v NullableSpaceRoleType) IsSet() bool { + return v.isSet +} + +func (v *NullableSpaceRoleType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpaceRoleType(val *SpaceRoleType) *NullableSpaceRoleType { + return &NullableSpaceRoleType{value: val, isSet: true} +} + +func (v NullableSpaceRoleType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpaceRoleType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_space_role_type_test.go b/services/scf/model_space_role_type_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_role_type_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_space_test.go b/services/scf/model_space_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_space_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_spaces_list.go b/services/scf/model_spaces_list.go new file mode 100644 index 000000000..e53eee2a7 --- /dev/null +++ b/services/scf/model_spaces_list.go @@ -0,0 +1,168 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the SpacesList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpacesList{} + +/* + types and functions for pagination +*/ + +// isModel +type SpacesListGetPaginationAttributeType = *Pagination +type SpacesListGetPaginationArgType = Pagination +type SpacesListGetPaginationRetType = Pagination + +func getSpacesListGetPaginationAttributeTypeOk(arg SpacesListGetPaginationAttributeType) (ret SpacesListGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpacesListGetPaginationAttributeType(arg *SpacesListGetPaginationAttributeType, val SpacesListGetPaginationRetType) { + *arg = &val +} + +/* + types and functions for resources +*/ + +// isArray +type SpacesListGetResourcesAttributeType = *[]Space +type SpacesListGetResourcesArgType = []Space +type SpacesListGetResourcesRetType = []Space + +func getSpacesListGetResourcesAttributeTypeOk(arg SpacesListGetResourcesAttributeType) (ret SpacesListGetResourcesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSpacesListGetResourcesAttributeType(arg *SpacesListGetResourcesAttributeType, val SpacesListGetResourcesRetType) { + *arg = &val +} + +// SpacesList struct for SpacesList +type SpacesList struct { + // REQUIRED + Pagination SpacesListGetPaginationAttributeType `json:"pagination" required:"true"` + // REQUIRED + Resources SpacesListGetResourcesAttributeType `json:"resources" required:"true"` +} + +type _SpacesList SpacesList + +// NewSpacesList instantiates a new SpacesList 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 NewSpacesList(pagination SpacesListGetPaginationArgType, resources SpacesListGetResourcesArgType) *SpacesList { + this := SpacesList{} + setSpacesListGetPaginationAttributeType(&this.Pagination, pagination) + setSpacesListGetResourcesAttributeType(&this.Resources, resources) + return &this +} + +// NewSpacesListWithDefaults instantiates a new SpacesList 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 NewSpacesListWithDefaults() *SpacesList { + this := SpacesList{} + return &this +} + +// GetPagination returns the Pagination field value +func (o *SpacesList) GetPagination() (ret SpacesListGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *SpacesList) GetPaginationOk() (ret SpacesListGetPaginationRetType, ok bool) { + return getSpacesListGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +func (o *SpacesList) SetPagination(v SpacesListGetPaginationRetType) { + setSpacesListGetPaginationAttributeType(&o.Pagination, v) +} + +// GetResources returns the Resources field value +func (o *SpacesList) GetResources() (ret SpacesListGetResourcesRetType) { + ret, _ = o.GetResourcesOk() + return ret +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *SpacesList) GetResourcesOk() (ret SpacesListGetResourcesRetType, ok bool) { + return getSpacesListGetResourcesAttributeTypeOk(o.Resources) +} + +// SetResources sets field value +func (o *SpacesList) SetResources(v SpacesListGetResourcesRetType) { + setSpacesListGetResourcesAttributeType(&o.Resources, v) +} + +func (o SpacesList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSpacesListGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } + if val, ok := getSpacesListGetResourcesAttributeTypeOk(o.Resources); ok { + toSerialize["Resources"] = val + } + return toSerialize, nil +} + +type NullableSpacesList struct { + value *SpacesList + isSet bool +} + +func (v NullableSpacesList) Get() *SpacesList { + return v.value +} + +func (v *NullableSpacesList) Set(val *SpacesList) { + v.value = val + v.isSet = true +} + +func (v NullableSpacesList) IsSet() bool { + return v.isSet +} + +func (v *NullableSpacesList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpacesList(val *SpacesList) *NullableSpacesList { + return &NullableSpacesList{value: val, isSet: true} +} + +func (v NullableSpacesList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpacesList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_spaces_list_test.go b/services/scf/model_spaces_list_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_spaces_list_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_update_organization_payload.go b/services/scf/model_update_organization_payload.go new file mode 100644 index 000000000..b29289c52 --- /dev/null +++ b/services/scf/model_update_organization_payload.go @@ -0,0 +1,176 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the UpdateOrganizationPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrganizationPayload{} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateOrganizationPayloadGetNameAttributeType = *string + +func getUpdateOrganizationPayloadGetNameAttributeTypeOk(arg UpdateOrganizationPayloadGetNameAttributeType) (ret UpdateOrganizationPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateOrganizationPayloadGetNameAttributeType(arg *UpdateOrganizationPayloadGetNameAttributeType, val UpdateOrganizationPayloadGetNameRetType) { + *arg = &val +} + +type UpdateOrganizationPayloadGetNameArgType = string +type UpdateOrganizationPayloadGetNameRetType = string + +/* + types and functions for suspended +*/ + +// isBoolean +type UpdateOrganizationPayloadgetSuspendedAttributeType = *bool +type UpdateOrganizationPayloadgetSuspendedArgType = bool +type UpdateOrganizationPayloadgetSuspendedRetType = bool + +func getUpdateOrganizationPayloadgetSuspendedAttributeTypeOk(arg UpdateOrganizationPayloadgetSuspendedAttributeType) (ret UpdateOrganizationPayloadgetSuspendedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateOrganizationPayloadgetSuspendedAttributeType(arg *UpdateOrganizationPayloadgetSuspendedAttributeType, val UpdateOrganizationPayloadgetSuspendedRetType) { + *arg = &val +} + +// UpdateOrganizationPayload struct for UpdateOrganizationPayload +type UpdateOrganizationPayload struct { + // Name of the organization + Name UpdateOrganizationPayloadGetNameAttributeType `json:"name,omitempty"` + Suspended UpdateOrganizationPayloadgetSuspendedAttributeType `json:"suspended,omitempty"` +} + +// NewUpdateOrganizationPayload instantiates a new UpdateOrganizationPayload 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 NewUpdateOrganizationPayload() *UpdateOrganizationPayload { + this := UpdateOrganizationPayload{} + return &this +} + +// NewUpdateOrganizationPayloadWithDefaults instantiates a new UpdateOrganizationPayload 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 NewUpdateOrganizationPayloadWithDefaults() *UpdateOrganizationPayload { + this := UpdateOrganizationPayload{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateOrganizationPayload) GetName() (res UpdateOrganizationPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrganizationPayload) GetNameOk() (ret UpdateOrganizationPayloadGetNameRetType, ok bool) { + return getUpdateOrganizationPayloadGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateOrganizationPayload) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateOrganizationPayload) SetName(v UpdateOrganizationPayloadGetNameRetType) { + setUpdateOrganizationPayloadGetNameAttributeType(&o.Name, v) +} + +// GetSuspended returns the Suspended field value if set, zero value otherwise. +func (o *UpdateOrganizationPayload) GetSuspended() (res UpdateOrganizationPayloadgetSuspendedRetType) { + res, _ = o.GetSuspendedOk() + return +} + +// GetSuspendedOk returns a tuple with the Suspended field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrganizationPayload) GetSuspendedOk() (ret UpdateOrganizationPayloadgetSuspendedRetType, ok bool) { + return getUpdateOrganizationPayloadgetSuspendedAttributeTypeOk(o.Suspended) +} + +// HasSuspended returns a boolean if a field has been set. +func (o *UpdateOrganizationPayload) HasSuspended() bool { + _, ok := o.GetSuspendedOk() + return ok +} + +// SetSuspended gets a reference to the given bool and assigns it to the Suspended field. +func (o *UpdateOrganizationPayload) SetSuspended(v UpdateOrganizationPayloadgetSuspendedRetType) { + setUpdateOrganizationPayloadgetSuspendedAttributeType(&o.Suspended, v) +} + +func (o UpdateOrganizationPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUpdateOrganizationPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getUpdateOrganizationPayloadgetSuspendedAttributeTypeOk(o.Suspended); ok { + toSerialize["Suspended"] = val + } + return toSerialize, nil +} + +type NullableUpdateOrganizationPayload struct { + value *UpdateOrganizationPayload + isSet bool +} + +func (v NullableUpdateOrganizationPayload) Get() *UpdateOrganizationPayload { + return v.value +} + +func (v *NullableUpdateOrganizationPayload) Set(val *UpdateOrganizationPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateOrganizationPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateOrganizationPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateOrganizationPayload(val *UpdateOrganizationPayload) *NullableUpdateOrganizationPayload { + return &NullableUpdateOrganizationPayload{value: val, isSet: true} +} + +func (v NullableUpdateOrganizationPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateOrganizationPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_update_organization_payload_test.go b/services/scf/model_update_organization_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_update_organization_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_update_space_payload.go b/services/scf/model_update_space_payload.go new file mode 100644 index 000000000..d2266ed0a --- /dev/null +++ b/services/scf/model_update_space_payload.go @@ -0,0 +1,127 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the UpdateSpacePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateSpacePayload{} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateSpacePayloadGetNameAttributeType = *string + +func getUpdateSpacePayloadGetNameAttributeTypeOk(arg UpdateSpacePayloadGetNameAttributeType) (ret UpdateSpacePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateSpacePayloadGetNameAttributeType(arg *UpdateSpacePayloadGetNameAttributeType, val UpdateSpacePayloadGetNameRetType) { + *arg = &val +} + +type UpdateSpacePayloadGetNameArgType = string +type UpdateSpacePayloadGetNameRetType = string + +// UpdateSpacePayload struct for UpdateSpacePayload +type UpdateSpacePayload struct { + // Name of the space + // REQUIRED + Name UpdateSpacePayloadGetNameAttributeType `json:"name" required:"true"` +} + +type _UpdateSpacePayload UpdateSpacePayload + +// NewUpdateSpacePayload instantiates a new UpdateSpacePayload 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 NewUpdateSpacePayload(name UpdateSpacePayloadGetNameArgType) *UpdateSpacePayload { + this := UpdateSpacePayload{} + setUpdateSpacePayloadGetNameAttributeType(&this.Name, name) + return &this +} + +// NewUpdateSpacePayloadWithDefaults instantiates a new UpdateSpacePayload 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 NewUpdateSpacePayloadWithDefaults() *UpdateSpacePayload { + this := UpdateSpacePayload{} + return &this +} + +// GetName returns the Name field value +func (o *UpdateSpacePayload) GetName() (ret UpdateSpacePayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateSpacePayload) GetNameOk() (ret UpdateSpacePayloadGetNameRetType, ok bool) { + return getUpdateSpacePayloadGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *UpdateSpacePayload) SetName(v UpdateSpacePayloadGetNameRetType) { + setUpdateSpacePayloadGetNameAttributeType(&o.Name, v) +} + +func (o UpdateSpacePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUpdateSpacePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + return toSerialize, nil +} + +type NullableUpdateSpacePayload struct { + value *UpdateSpacePayload + isSet bool +} + +func (v NullableUpdateSpacePayload) Get() *UpdateSpacePayload { + return v.value +} + +func (v *NullableUpdateSpacePayload) Set(val *UpdateSpacePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateSpacePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateSpacePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateSpacePayload(val *UpdateSpacePayload) *NullableUpdateSpacePayload { + return &NullableUpdateSpacePayload{value: val, isSet: true} +} + +func (v NullableUpdateSpacePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateSpacePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_update_space_payload_test.go b/services/scf/model_update_space_payload_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_update_space_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/model_usage_summary.go b/services/scf/model_usage_summary.go new file mode 100644 index 000000000..8b3a23b7f --- /dev/null +++ b/services/scf/model_usage_summary.go @@ -0,0 +1,426 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" +) + +// checks if the UsageSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UsageSummary{} + +/* + types and functions for domains +*/ + +// isLong +type UsageSummaryGetDomainsAttributeType = *int64 +type UsageSummaryGetDomainsArgType = int64 +type UsageSummaryGetDomainsRetType = int64 + +func getUsageSummaryGetDomainsAttributeTypeOk(arg UsageSummaryGetDomainsAttributeType) (ret UsageSummaryGetDomainsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetDomainsAttributeType(arg *UsageSummaryGetDomainsAttributeType, val UsageSummaryGetDomainsRetType) { + *arg = &val +} + +/* + types and functions for memoryInMb +*/ + +// isLong +type UsageSummaryGetMemoryInMbAttributeType = *int64 +type UsageSummaryGetMemoryInMbArgType = int64 +type UsageSummaryGetMemoryInMbRetType = int64 + +func getUsageSummaryGetMemoryInMbAttributeTypeOk(arg UsageSummaryGetMemoryInMbAttributeType) (ret UsageSummaryGetMemoryInMbRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetMemoryInMbAttributeType(arg *UsageSummaryGetMemoryInMbAttributeType, val UsageSummaryGetMemoryInMbRetType) { + *arg = &val +} + +/* + types and functions for perAppTasks +*/ + +// isLong +type UsageSummaryGetPerAppTasksAttributeType = *int64 +type UsageSummaryGetPerAppTasksArgType = int64 +type UsageSummaryGetPerAppTasksRetType = int64 + +func getUsageSummaryGetPerAppTasksAttributeTypeOk(arg UsageSummaryGetPerAppTasksAttributeType) (ret UsageSummaryGetPerAppTasksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetPerAppTasksAttributeType(arg *UsageSummaryGetPerAppTasksAttributeType, val UsageSummaryGetPerAppTasksRetType) { + *arg = &val +} + +/* + types and functions for reservedPorts +*/ + +// isLong +type UsageSummaryGetReservedPortsAttributeType = *int64 +type UsageSummaryGetReservedPortsArgType = int64 +type UsageSummaryGetReservedPortsRetType = int64 + +func getUsageSummaryGetReservedPortsAttributeTypeOk(arg UsageSummaryGetReservedPortsAttributeType) (ret UsageSummaryGetReservedPortsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetReservedPortsAttributeType(arg *UsageSummaryGetReservedPortsAttributeType, val UsageSummaryGetReservedPortsRetType) { + *arg = &val +} + +/* + types and functions for routes +*/ + +// isLong +type UsageSummaryGetRoutesAttributeType = *int64 +type UsageSummaryGetRoutesArgType = int64 +type UsageSummaryGetRoutesRetType = int64 + +func getUsageSummaryGetRoutesAttributeTypeOk(arg UsageSummaryGetRoutesAttributeType) (ret UsageSummaryGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetRoutesAttributeType(arg *UsageSummaryGetRoutesAttributeType, val UsageSummaryGetRoutesRetType) { + *arg = &val +} + +/* + types and functions for serviceInstances +*/ + +// isLong +type UsageSummaryGetServiceInstancesAttributeType = *int64 +type UsageSummaryGetServiceInstancesArgType = int64 +type UsageSummaryGetServiceInstancesRetType = int64 + +func getUsageSummaryGetServiceInstancesAttributeTypeOk(arg UsageSummaryGetServiceInstancesAttributeType) (ret UsageSummaryGetServiceInstancesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetServiceInstancesAttributeType(arg *UsageSummaryGetServiceInstancesAttributeType, val UsageSummaryGetServiceInstancesRetType) { + *arg = &val +} + +/* + types and functions for serviceKeys +*/ + +// isLong +type UsageSummaryGetServiceKeysAttributeType = *int64 +type UsageSummaryGetServiceKeysArgType = int64 +type UsageSummaryGetServiceKeysRetType = int64 + +func getUsageSummaryGetServiceKeysAttributeTypeOk(arg UsageSummaryGetServiceKeysAttributeType) (ret UsageSummaryGetServiceKeysRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetServiceKeysAttributeType(arg *UsageSummaryGetServiceKeysAttributeType, val UsageSummaryGetServiceKeysRetType) { + *arg = &val +} + +/* + types and functions for startedInstances +*/ + +// isLong +type UsageSummaryGetStartedInstancesAttributeType = *int64 +type UsageSummaryGetStartedInstancesArgType = int64 +type UsageSummaryGetStartedInstancesRetType = int64 + +func getUsageSummaryGetStartedInstancesAttributeTypeOk(arg UsageSummaryGetStartedInstancesAttributeType) (ret UsageSummaryGetStartedInstancesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUsageSummaryGetStartedInstancesAttributeType(arg *UsageSummaryGetStartedInstancesAttributeType, val UsageSummaryGetStartedInstancesRetType) { + *arg = &val +} + +// UsageSummary struct for UsageSummary +type UsageSummary struct { + // REQUIRED + Domains UsageSummaryGetDomainsAttributeType `json:"domains" required:"true"` + // REQUIRED + MemoryInMb UsageSummaryGetMemoryInMbAttributeType `json:"memoryInMb" required:"true"` + // REQUIRED + PerAppTasks UsageSummaryGetPerAppTasksAttributeType `json:"perAppTasks" required:"true"` + // REQUIRED + ReservedPorts UsageSummaryGetReservedPortsAttributeType `json:"reservedPorts" required:"true"` + // REQUIRED + Routes UsageSummaryGetRoutesAttributeType `json:"routes" required:"true"` + // REQUIRED + ServiceInstances UsageSummaryGetServiceInstancesAttributeType `json:"serviceInstances" required:"true"` + // REQUIRED + ServiceKeys UsageSummaryGetServiceKeysAttributeType `json:"serviceKeys" required:"true"` + // REQUIRED + StartedInstances UsageSummaryGetStartedInstancesAttributeType `json:"startedInstances" required:"true"` +} + +type _UsageSummary UsageSummary + +// NewUsageSummary instantiates a new UsageSummary 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 NewUsageSummary(domains UsageSummaryGetDomainsArgType, memoryInMb UsageSummaryGetMemoryInMbArgType, perAppTasks UsageSummaryGetPerAppTasksArgType, reservedPorts UsageSummaryGetReservedPortsArgType, routes UsageSummaryGetRoutesArgType, serviceInstances UsageSummaryGetServiceInstancesArgType, serviceKeys UsageSummaryGetServiceKeysArgType, startedInstances UsageSummaryGetStartedInstancesArgType) *UsageSummary { + this := UsageSummary{} + setUsageSummaryGetDomainsAttributeType(&this.Domains, domains) + setUsageSummaryGetMemoryInMbAttributeType(&this.MemoryInMb, memoryInMb) + setUsageSummaryGetPerAppTasksAttributeType(&this.PerAppTasks, perAppTasks) + setUsageSummaryGetReservedPortsAttributeType(&this.ReservedPorts, reservedPorts) + setUsageSummaryGetRoutesAttributeType(&this.Routes, routes) + setUsageSummaryGetServiceInstancesAttributeType(&this.ServiceInstances, serviceInstances) + setUsageSummaryGetServiceKeysAttributeType(&this.ServiceKeys, serviceKeys) + setUsageSummaryGetStartedInstancesAttributeType(&this.StartedInstances, startedInstances) + return &this +} + +// NewUsageSummaryWithDefaults instantiates a new UsageSummary 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 NewUsageSummaryWithDefaults() *UsageSummary { + this := UsageSummary{} + return &this +} + +// GetDomains returns the Domains field value +func (o *UsageSummary) GetDomains() (ret UsageSummaryGetDomainsRetType) { + ret, _ = o.GetDomainsOk() + return ret +} + +// GetDomainsOk returns a tuple with the Domains field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetDomainsOk() (ret UsageSummaryGetDomainsRetType, ok bool) { + return getUsageSummaryGetDomainsAttributeTypeOk(o.Domains) +} + +// SetDomains sets field value +func (o *UsageSummary) SetDomains(v UsageSummaryGetDomainsRetType) { + setUsageSummaryGetDomainsAttributeType(&o.Domains, v) +} + +// GetMemoryInMb returns the MemoryInMb field value +func (o *UsageSummary) GetMemoryInMb() (ret UsageSummaryGetMemoryInMbRetType) { + ret, _ = o.GetMemoryInMbOk() + return ret +} + +// GetMemoryInMbOk returns a tuple with the MemoryInMb field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetMemoryInMbOk() (ret UsageSummaryGetMemoryInMbRetType, ok bool) { + return getUsageSummaryGetMemoryInMbAttributeTypeOk(o.MemoryInMb) +} + +// SetMemoryInMb sets field value +func (o *UsageSummary) SetMemoryInMb(v UsageSummaryGetMemoryInMbRetType) { + setUsageSummaryGetMemoryInMbAttributeType(&o.MemoryInMb, v) +} + +// GetPerAppTasks returns the PerAppTasks field value +func (o *UsageSummary) GetPerAppTasks() (ret UsageSummaryGetPerAppTasksRetType) { + ret, _ = o.GetPerAppTasksOk() + return ret +} + +// GetPerAppTasksOk returns a tuple with the PerAppTasks field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetPerAppTasksOk() (ret UsageSummaryGetPerAppTasksRetType, ok bool) { + return getUsageSummaryGetPerAppTasksAttributeTypeOk(o.PerAppTasks) +} + +// SetPerAppTasks sets field value +func (o *UsageSummary) SetPerAppTasks(v UsageSummaryGetPerAppTasksRetType) { + setUsageSummaryGetPerAppTasksAttributeType(&o.PerAppTasks, v) +} + +// GetReservedPorts returns the ReservedPorts field value +func (o *UsageSummary) GetReservedPorts() (ret UsageSummaryGetReservedPortsRetType) { + ret, _ = o.GetReservedPortsOk() + return ret +} + +// GetReservedPortsOk returns a tuple with the ReservedPorts field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetReservedPortsOk() (ret UsageSummaryGetReservedPortsRetType, ok bool) { + return getUsageSummaryGetReservedPortsAttributeTypeOk(o.ReservedPorts) +} + +// SetReservedPorts sets field value +func (o *UsageSummary) SetReservedPorts(v UsageSummaryGetReservedPortsRetType) { + setUsageSummaryGetReservedPortsAttributeType(&o.ReservedPorts, v) +} + +// GetRoutes returns the Routes field value +func (o *UsageSummary) GetRoutes() (ret UsageSummaryGetRoutesRetType) { + ret, _ = o.GetRoutesOk() + return ret +} + +// GetRoutesOk returns a tuple with the Routes field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetRoutesOk() (ret UsageSummaryGetRoutesRetType, ok bool) { + return getUsageSummaryGetRoutesAttributeTypeOk(o.Routes) +} + +// SetRoutes sets field value +func (o *UsageSummary) SetRoutes(v UsageSummaryGetRoutesRetType) { + setUsageSummaryGetRoutesAttributeType(&o.Routes, v) +} + +// GetServiceInstances returns the ServiceInstances field value +func (o *UsageSummary) GetServiceInstances() (ret UsageSummaryGetServiceInstancesRetType) { + ret, _ = o.GetServiceInstancesOk() + return ret +} + +// GetServiceInstancesOk returns a tuple with the ServiceInstances field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetServiceInstancesOk() (ret UsageSummaryGetServiceInstancesRetType, ok bool) { + return getUsageSummaryGetServiceInstancesAttributeTypeOk(o.ServiceInstances) +} + +// SetServiceInstances sets field value +func (o *UsageSummary) SetServiceInstances(v UsageSummaryGetServiceInstancesRetType) { + setUsageSummaryGetServiceInstancesAttributeType(&o.ServiceInstances, v) +} + +// GetServiceKeys returns the ServiceKeys field value +func (o *UsageSummary) GetServiceKeys() (ret UsageSummaryGetServiceKeysRetType) { + ret, _ = o.GetServiceKeysOk() + return ret +} + +// GetServiceKeysOk returns a tuple with the ServiceKeys field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetServiceKeysOk() (ret UsageSummaryGetServiceKeysRetType, ok bool) { + return getUsageSummaryGetServiceKeysAttributeTypeOk(o.ServiceKeys) +} + +// SetServiceKeys sets field value +func (o *UsageSummary) SetServiceKeys(v UsageSummaryGetServiceKeysRetType) { + setUsageSummaryGetServiceKeysAttributeType(&o.ServiceKeys, v) +} + +// GetStartedInstances returns the StartedInstances field value +func (o *UsageSummary) GetStartedInstances() (ret UsageSummaryGetStartedInstancesRetType) { + ret, _ = o.GetStartedInstancesOk() + return ret +} + +// GetStartedInstancesOk returns a tuple with the StartedInstances field value +// and a boolean to check if the value has been set. +func (o *UsageSummary) GetStartedInstancesOk() (ret UsageSummaryGetStartedInstancesRetType, ok bool) { + return getUsageSummaryGetStartedInstancesAttributeTypeOk(o.StartedInstances) +} + +// SetStartedInstances sets field value +func (o *UsageSummary) SetStartedInstances(v UsageSummaryGetStartedInstancesRetType) { + setUsageSummaryGetStartedInstancesAttributeType(&o.StartedInstances, v) +} + +func (o UsageSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUsageSummaryGetDomainsAttributeTypeOk(o.Domains); ok { + toSerialize["Domains"] = val + } + if val, ok := getUsageSummaryGetMemoryInMbAttributeTypeOk(o.MemoryInMb); ok { + toSerialize["MemoryInMb"] = val + } + if val, ok := getUsageSummaryGetPerAppTasksAttributeTypeOk(o.PerAppTasks); ok { + toSerialize["PerAppTasks"] = val + } + if val, ok := getUsageSummaryGetReservedPortsAttributeTypeOk(o.ReservedPorts); ok { + toSerialize["ReservedPorts"] = val + } + if val, ok := getUsageSummaryGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val + } + if val, ok := getUsageSummaryGetServiceInstancesAttributeTypeOk(o.ServiceInstances); ok { + toSerialize["ServiceInstances"] = val + } + if val, ok := getUsageSummaryGetServiceKeysAttributeTypeOk(o.ServiceKeys); ok { + toSerialize["ServiceKeys"] = val + } + if val, ok := getUsageSummaryGetStartedInstancesAttributeTypeOk(o.StartedInstances); ok { + toSerialize["StartedInstances"] = val + } + return toSerialize, nil +} + +type NullableUsageSummary struct { + value *UsageSummary + isSet bool +} + +func (v NullableUsageSummary) Get() *UsageSummary { + return v.value +} + +func (v *NullableUsageSummary) Set(val *UsageSummary) { + v.value = val + v.isSet = true +} + +func (v NullableUsageSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableUsageSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsageSummary(val *UsageSummary) *NullableUsageSummary { + return &NullableUsageSummary{value: val, isSet: true} +} + +func (v NullableUsageSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsageSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/scf/model_usage_summary_test.go b/services/scf/model_usage_summary_test.go new file mode 100644 index 000000000..d96cdf0fe --- /dev/null +++ b/services/scf/model_usage_summary_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf diff --git a/services/scf/utils.go b/services/scf/utils.go new file mode 100644 index 000000000..19b7a5d51 --- /dev/null +++ b/services/scf/utils.go @@ -0,0 +1,385 @@ +/* +STACKIT Cloud Foundry API + +API endpoints for managing STACKIT Cloud Foundry + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package scf + +import ( + "encoding/json" + "math/rand" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableValue[T any] struct { + value *T + isSet bool +} + +func (v NullableValue[T]) Get() *T { + return v.value +} + +func (v *NullableValue[T]) Set(val *T) { + v.value = val + v.isSet = true +} + +func (v NullableValue[T]) IsSet() bool { + return v.isSet +} + +func (v *NullableValue[T]) Unset() { + v.value = nil + v.isSet = false +} + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + if t, ok := i.(interface{ IsSet() bool }); ok { + return !t.IsSet() + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + +// randString returns a random string with a specified length. It panics if n <= 0. +func randString(n int) string { + b := make([]byte, n) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} From 207cd5fa093dd9bb0e29dcaa9d451c65e6e91733 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Tue, 29 Jul 2025 11:21:33 +0200 Subject: [PATCH 2/2] Add changelogs Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 2 + services/scf/CHANGELOG.md | 2 + services/scf/LICENSE.md | 201 ++++++++++++++++++++++++++++++++++++++ services/scf/NOTICE.txt | 2 + services/scf/VERSION | 1 + 5 files changed, 208 insertions(+) create mode 100644 services/scf/CHANGELOG.md create mode 100644 services/scf/LICENSE.md create mode 100644 services/scf/NOTICE.txt create mode 100644 services/scf/VERSION diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cce69881..9440a9020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## Release (2025-XX-XX) +- `scf`: [v0.1.0](services/scf/CHANGELOG.md#v010) + - **New:** STACKIT Cloud Foundry module - `core`: [v0.17.3](core/CHANGELOG.md#v0173) - **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` - `alb`: [v0.6.1](services/alb/CHANGELOG.md#v061) diff --git a/services/scf/CHANGELOG.md b/services/scf/CHANGELOG.md new file mode 100644 index 000000000..e8670bf7f --- /dev/null +++ b/services/scf/CHANGELOG.md @@ -0,0 +1,2 @@ +## v0.1.0 +- **New:** STACKIT Cloud Foundry module \ No newline at end of file diff --git a/services/scf/LICENSE.md b/services/scf/LICENSE.md new file mode 100644 index 000000000..7e2f06484 --- /dev/null +++ b/services/scf/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2025 Schwarz IT KG + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/services/scf/NOTICE.txt b/services/scf/NOTICE.txt new file mode 100644 index 000000000..1e1b796ee --- /dev/null +++ b/services/scf/NOTICE.txt @@ -0,0 +1,2 @@ +STACKIT Cloud Foundry SDK for Go +Copyright 2025 Schwarz IT KG \ No newline at end of file diff --git a/services/scf/VERSION b/services/scf/VERSION new file mode 100644 index 000000000..9ff151c5b --- /dev/null +++ b/services/scf/VERSION @@ -0,0 +1 @@ +v0.1.0 \ No newline at end of file