diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..615dfde --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/settings.yml b/.github/settings.yml deleted file mode 100644 index 24f6f23..0000000 --- a/.github/settings.yml +++ /dev/null @@ -1,144 +0,0 @@ -# These settings are synced to GitHub by https://probot.github.io/apps/settings/ - -repository: - # See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings. - - # The name of the repository. Changing this will rename the repository - name: crossplane-provider-btp-account - - # A short description of the repository that will show up on GitHub - description: Crossplane Provider for managing Accounts in BTP. - - # A URL with more information about the repository - homepage: https://api.sap.com/api/APIAccountsService/overview - - # A comma-separated list of topics to set on the repository - topics: cis, crossplane, inner-source - - # Either `true` to enable issues for this repository, `false` to disable them. - has_issues: true - - # Either `true` to enable projects for this repository, or `false` to disable them. - # If projects are disabled for the organization, passing `true` will cause an API error. - has_projects: false - - # Either `true` to enable the wiki for this repository, `false` to disable it. - has_wiki: false - - # Either `true` to enable downloads for this repository, `false` to disable them. - has_downloads: true - - # Updates the default branch for this repository. - default_branch: main - - # Either `true` to allow squash-merging pull requests, or `false` to prevent - # squash-merging. - allow_squash_merge: true - - # Either `true` to allow merging pull requests with a merge commit, or `false` - # to prevent merging pull requests with merge commits. - allow_merge_commit: false - - # Either `true` to allow rebase-merging pull requests, or `false` to prevent - # rebase-merging. - allow_rebase_merge: false - - # Either `true` to enable automatic deletion of branches on merge, or `false` to disable - delete_branch_on_merge: true - - # Allow users to let gh automatically merge pullrequests in case all requirements are satisified - allow_auto_merge: true - -# Labels: define labels for Issues and Pull Requests -labels: - - name: bug - color: CC0000 - description: An issue with the system. - - - name: feature - # If including a `#`, make sure to wrap it with quotes! - color: '#336699' - description: New functionality. - - - name: renovate - color: '#E0E4CC' - description: Dependencies need to be updated. - -# Milestones: define milestones for Issues and Pull Requests -milestones: -# - title: milestone-title -# description: milestone-description -# # The state of the milestone. Either `open` or `closed` -# state: open - -# Collaborators: give specific users access to this repository. -# See https://docs.github.com/en/rest/reference/repos#add-a-repository-collaborator for available options -collaborators: - # - username: bkeepers - # permission: push - # - username: hubot - # permission: pull - - # Note: `permission` is only valid on organization-owned repositories. - # The permission to grant the collaborator. Can be one of: - # * `pull` - can pull, but not push to or administer this repository. - # * `push` - can pull and push, but not administer this repository. - # * `admin` - can pull, push and administer this repository. - # * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - # * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - - - username: co-hyperspace-serviceuser - permission: admin - -# See https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions for available options -teams: -# - name: core -# # The permission to grant the team. Can be one of: -# # * `pull` - can pull, but not push to or administer this repository. -# # * `push` - can pull and push, but not administer this repository. -# # * `admin` - can pull, push and administer this repository. -# # * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. -# # * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. -# permission: admin -# - name: docs -# permission: push - - - name: developers - permission: push - - name: operators - permission: push - - name: contributors - permission: triage - -branches: - - name: main - # https://docs.github.com/en/rest/reference/repos#update-branch-protection - # Branch Protection settings. Set to null to disable - protection: - # Required. Require at least one approving review on a pull request, before merging. Set to null to disable. - required_pull_request_reviews: - # The number of approvals required. (1-6) - required_approving_review_count: 1 - # Dismiss approved reviews automatically when a new commit is pushed. - dismiss_stale_reviews: true - # Blocks merge until code owners have reviewed. - require_code_owner_reviews: false - # Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories. - #dismissal_restrictions: - # users: [] - # teams: [] - # Required. Require status checks to pass before merging. Set to null to disable - required_status_checks: - # Required. Require branches to be up to date before merging. - strict: false - # Required. The list of status checks to require in order to merge into this branch - contexts: ['continuous-integration/jenkins/pr-merge'] - # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. - enforce_admins: false - # Prevent merge commits from being pushed to matching branches - required_linear_history: false - # Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. - restrictions: null - # apps: [] - # users: [] - # teams: [] diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index 3b07444..0000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: bump version -on: - repository_dispatch: - types: [ bump-version-command ] - -permissions: - contents: write - issues: write - pull-requests: write - -jobs: - generate: - uses: cloud-orchestration/.workflows/.github/workflows/bump-version.yaml@v1.16.7 - secrets: inherit diff --git a/.github/workflows/command_dispatch.yml b/.github/workflows/command_dispatch.yml deleted file mode 100644 index b1ecc0f..0000000 --- a/.github/workflows/command_dispatch.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: Command Dispatch -on: - issue_comment: - types: [ created, edited ] -jobs: - slashCommandDispatch: - uses: cloud-orchestration/.workflows/.github/workflows/dispatch-slash-commands.yaml@v1.16.7 - secrets: inherit diff --git a/.github/workflows/make-reviewable.yml b/.github/workflows/make-reviewable.yml deleted file mode 100644 index 3ca099e..0000000 --- a/.github/workflows/make-reviewable.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: make reviewable - -on: - push: - branches: - - main - pull_request: {} - workflow_dispatch: {} - - -env: - # Common versions - GO_VERSION: '1.21' -jobs: - reviewable: - uses: cloud-orchestration/.workflows/.github/workflows/make-reviewable.yml@v1.16.7 - secrets: inherit - diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4c22a28..56e5a7e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,6 +19,7 @@ on: # GitHub considers creating releases and uploading assets as writing contents. permissions: contents: write + packages: write jobs: run-go-license-check: @@ -110,8 +111,8 @@ jobs: uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: registry: ${{ vars.REGISTRY_URL }} - username: ${{ secrets.TEST_REGISTRY_USER }} - password: ${{ secrets.TEST_REGISTRY_PASSWORD }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Publish Artifacts to DockerHub run: make publish BRANCH_NAME=${GITHUB_REF##*/} diff --git a/.github/workflows/reuse-scan.yaml b/.github/workflows/reuse-scan.yaml index 0d396c2..b8a1d39 100644 --- a/.github/workflows/reuse-scan.yaml +++ b/.github/workflows/reuse-scan.yaml @@ -3,7 +3,6 @@ name: REUSE Compliance Check on: - workflow_dispatch: workflow_call: diff --git a/.github/workflows/reviewable_check_diff.yaml b/.github/workflows/reviewable_check_diff.yaml index a1254f3..566f33e 100644 --- a/.github/workflows/reviewable_check_diff.yaml +++ b/.github/workflows/reviewable_check_diff.yaml @@ -3,7 +3,6 @@ name: Reviewable&Check-Diff on: - workflow_dispatch: workflow_call: env: diff --git a/.github/workflows/unit_test.yaml b/.github/workflows/unit_test.yaml index 32fbcf1..9c6e3c6 100644 --- a/.github/workflows/unit_test.yaml +++ b/.github/workflows/unit_test.yaml @@ -4,7 +4,6 @@ name: Unit Tests on: - workflow_dispatch: workflow_call: jobs: diff --git a/.github/workflows/update-repository-settings.yml b/.github/workflows/update-repository-settings.yml deleted file mode 100644 index 184ce83..0000000 --- a/.github/workflows/update-repository-settings.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Update repository settings - -on: - workflow_dispatch: {} - push: - branches: - - main - paths: - - .github/settings.yml - - .github/workflows/update-repository-settings.yml - - -jobs: - runProbotSettings: - uses: cloud-orchestration/.workflows/.github/workflows/update-repository-settings.yml@main - secrets: inherit diff --git a/.gitignore b/.gitignore index f34eedb..0043adf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ __debug_bin /examples/sample/certs.sh crossplane-provider-btp-account.iml /test/e2e/testdata/secrets + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..3a23868 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,29 @@ +# Visit https://goreleaser.com for documentation on how to customize this +# behavior. +version: 2 + +builds: + - id: binary-build + env: + - CGO_ENABLED=0 + mod_timestamp: "{{ .CommitTimestamp }}" + main: ./cmd/provider + flags: + - -trimpath + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: darwin + goarch: "386" + binary: "{{ .ProjectName }}_v{{ .Version }}" +archives: + - format: zip + builds: + - binary-build + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" +changelog: + use: github-native \ No newline at end of file diff --git a/Makefile b/Makefile index 50251bc..15f53b1 100644 --- a/Makefile +++ b/Makefile @@ -274,3 +274,16 @@ generate-test-crs: envsubst < "$$template" > "$${template}.tmp" && mv "$${template}.tmp" "$$template"; \ done' sh {} + @echo crs generated + + +PUBLISH_IMAGES ?= crossplane/provider-btp crossplane/provider-btp-controller + +.PONY: publish +publish: + @$(INFO) "Publishing images $(PUBLISH_IMAGES) to $(DOCKER_REGISTRY)" + @for image in $(PUBLISH_IMAGES); do \ + echo "Publishing image $(DOCKER_REGISTRY)/$${image}:$(VERSION)"; \ + docker push $(DOCKER_REGISTRY)/$${image}:$(VERSION); \ + done + @$(OK) "Publishing images $(PUBLISH_IMAGES) to $(DOCKER_REGISTRY)" + diff --git a/README.md b/README.md index bab1eae..b176e02 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ ![Golang](https://img.shields.io/badge/Go-1.23-informational) +[![REUSE status](https://api.reuse.software/badge/github.com/SAP/crossplane-provider-btp)](https://api.reuse.software/info/github.com/SAP/crossplane-provider-btp) -# crossplane-provider-btp-account +# Crossplane Provider for SAP BTP ## About this project -`crossplane-provider-btp-account` is a [Crossplane](https://crossplane.io/) Provider that handles the orchestration of Account related resources on [SAP Business Technology Platform](https://www.sap.com/products/technology-platform.html): +`crossplane-provider-btp` is a [Crossplane](https://crossplane.io/) Provider that handles the orchestration of account related resources on [SAP Business Technology Platform](https://www.sap.com/products/technology-platform.html): - Subaccount - User Management @@ -24,9 +25,9 @@ To install this provider in a kubernetes cluster running crossplane, you can use apiVersion: pkg.crossplane.io/v1 kind: Provider metadata: - name: provider-btp-account + name: provider-btp spec: - package: TODO REGISTRY URL/crossplane-provider-btp: + package: ghcr.io/sap/crossplane-provider-btp/crossplane/provider-btp: ``` You should then see the crossplane controller create a deployment for this provider. Once it becomes healthy, you can connect the provider to you BTP global account following the documentation. @@ -53,35 +54,35 @@ The [Crossplane Provider Development][provider-dev] guide may be of use to add n To run the end2end tests, a technical user within the BTP is necessary for creation of environments (Kyma & CF). `.username` & `.password` is necessary for futher actions on `CloudFoundryEnvironment`. BTP_TECHNICAL_USER -``` +```json { - "email": "email", - "username": "PuserId", - "password": "mypass" - } + "email": "email", + "username": "PuserId", + "password": "mypass" +} ``` CIS_CENTRAL_BINDING Contents from the service binding of a `cis-central` service, like -``` +```json { - "endpoints": { - "accounts_service_url": "...", - "cloud_automation_url": "...", - "entitlements_service_url": "...", - "events_service_url": "...", - "external_provider_registry_url": "...", - "metadata_service_url": "...", - "order_processing_url": "...", - "provisioning_service_url": "...", - "saas_registry_service_url": "..." - }, - "grant_type": "client_credentials", - "sap.cloud.service": "com.sap.core.commercial.service.central", - "uaa": { - … - } - } + "endpoints": { + "accounts_service_url": "...", + "cloud_automation_url": "...", + "entitlements_service_url": "...", + "events_service_url": "...", + "external_provider_registry_url": "...", + "metadata_service_url": "...", + "order_processing_url": "...", + "provisioning_service_url": "...", + "saas_registry_service_url": "..." + }, + "grant_type": "client_credentials", + "sap.cloud.service": "com.sap.core.commercial.service.central", + "uaa": { + … + } +} ``` Contains the CLI server URL, for example: ``` @@ -92,13 +93,13 @@ GLOBAL_ACCOUNT Contains the subdomain of the global account. IDP_URL -Contains the URL of an IDP that can be connected to the global account, for example: +Contains the URL of an IDP that can be connected to the global account. SECOND_DIRECTORY_ADMIN_EMAIL -Contains a second email (different from the technical user's email) for the directory admin field, for example: +Contains a second email (different from the technical user's email) for the directory admin field. TECHNICAL_USER_EMAIL -Contains the email of the BTP_TECHNICAL_USER +Contains the email of the BTP_TECHNICAL_USER. ## Support, Feedback, Contributing diff --git a/apis/oidc/v1alpha1/groupversion_info.go b/apis/oidc/v1alpha1/groupversion_info.go index c7c8e50..86e70cf 100644 --- a/apis/oidc/v1alpha1/groupversion_info.go +++ b/apis/oidc/v1alpha1/groupversion_info.go @@ -1,6 +1,6 @@ // Package v1alpha1 contains the v1alpha1 group Sample resources of the btp-account provider. // +kubebuilder:object:generate=true -// +groupName=oidc.orchestrate.cloud.sap +// +groupName=oidc.btp.sap.crossplane.io // +versionName=v1alpha1 package v1alpha1 @@ -11,7 +11,7 @@ import ( // Package type metadata. const ( - Group = "oidc.orchestrate.cloud.sap" + Group = "oidc.btp.sap.crossplane.io" Version = "v1alpha1" ) diff --git a/build b/build new file mode 160000 index 0000000..3b99463 --- /dev/null +++ b/build @@ -0,0 +1 @@ +Subproject commit 3b99463225581259ce39c7d7a45290be12515abb diff --git a/examples/kyma-on-steroids.yaml b/examples/kyma-on-steroids.yaml index 4815092..467045c 100644 --- a/examples/kyma-on-steroids.yaml +++ b/examples/kyma-on-steroids.yaml @@ -101,7 +101,7 @@ spec: globalAccountRef: name: co-ga-canary displayName: test-max-kyma-oidc - region: eu12 + region: eu10 subdomain: test-max-kyma-oidc subaccountAdmins: - @@ -118,7 +118,7 @@ spec: providerConfigRef: name: default --- -apiVersion: oidc.orchestrate.cloud.sap/v1alpha1 +apiVersion: oidc.btp.sap.crossplane.io/v1alpha1 kind: CertBasedOIDCLogin metadata: name: kyma-oidc @@ -142,7 +142,7 @@ spec: name: example-login-pass-secret namespace: default --- -apiVersion: oidc.orchestrate.cloud.sap/v1alpha1 +apiVersion: oidc.btp.sap.crossplane.io/v1alpha1 kind: KubeConfigGenerator metadata: name: kyma-oidc diff --git a/examples/kyma.yaml b/examples/kyma.yaml index c93beaa..84badc7 100644 --- a/examples/kyma.yaml +++ b/examples/kyma.yaml @@ -18,7 +18,7 @@ spec: globalAccountRef: name: co-ga-canary displayName: kyma-test - region: eu12 + region: eu10 subdomain: test-1234q342645asd subaccountAdmins: - diff --git a/examples/sample/cert-based-oidc.yaml b/examples/sample/cert-based-oidc.yaml index d1593f9..05e0c45 100644 --- a/examples/sample/cert-based-oidc.yaml +++ b/examples/sample/cert-based-oidc.yaml @@ -1,4 +1,4 @@ -apiVersion: oidc.orchestrate.cloud.sap/v1alpha1 +apiVersion: oidc.btp.sap.crossplane.io/v1alpha1 kind: CertBasedOIDCLogin metadata: name: example-login diff --git a/examples/sample/cf-environment.yaml b/examples/sample/cf-environment.yaml index e9d9c66..454ce5e 100644 --- a/examples/sample/cf-environment.yaml +++ b/examples/sample/cf-environment.yaml @@ -9,6 +9,6 @@ # name: cis-local # initialOrgManagers: # - -# landscape: cf-eu12 +# landscape: cf-eu10 # SubaccountRef: # name: test-123455 diff --git a/examples/sample/globalaccount_trustconfiguration.yaml b/examples/sample/globalaccount_trustconfiguration.yaml index 84f0257..f820b80 100644 --- a/examples/sample/globalaccount_trustconfiguration.yaml +++ b/examples/sample/globalaccount_trustconfiguration.yaml @@ -6,5 +6,5 @@ spec: forProvider: name: simple-global-trust description: "my-descriptions" - identityProvider: "ax1tkejxl.accounts400.ondemand.com" + identityProvider: "" diff --git a/examples/sample/kubeconfig-generator.yaml b/examples/sample/kubeconfig-generator.yaml index af98ca0..8cefa1d 100644 --- a/examples/sample/kubeconfig-generator.yaml +++ b/examples/sample/kubeconfig-generator.yaml @@ -1,4 +1,4 @@ -apiVersion: oidc.orchestrate.cloud.sap/v1alpha1 +apiVersion: oidc.btp.sap.crossplane.io/v1alpha1 kind: KubeConfigGenerator metadata: name: example-kubeconfig diff --git a/examples/sample/subaccount-log.yaml b/examples/sample/subaccount-log.yaml index aa92e18..886e408 100644 --- a/examples/sample/subaccount-log.yaml +++ b/examples/sample/subaccount-log.yaml @@ -8,7 +8,7 @@ spec: name: account-provider-config forProvider: displayName: e2e-test-sa-entx - region: eu12 + region: eu10 subdomain: e2e-test-sa-entx labels: safe-to-delete: [ "yes" ] diff --git a/examples/sample/subaccount.yaml b/examples/sample/subaccount.yaml index ed0106f..f673df8 100644 --- a/examples/sample/subaccount.yaml +++ b/examples/sample/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: test-12345 - region: eu12 + region: eu10 subdomain: test-1234q342645asd subaccountAdmins: - diff --git a/examples/sample/subaccount_trustconfiguration.yaml b/examples/sample/subaccount_trustconfiguration.yaml index addbc75..faa6d36 100644 --- a/examples/sample/subaccount_trustconfiguration.yaml +++ b/examples/sample/subaccount_trustconfiguration.yaml @@ -8,5 +8,5 @@ spec: description: "my-descriptions" subaccountRef: name: stephan-trust-test - identityProvider: "aedxvzfuh.accounts400.ondemand.com" + identityProvider: "" diff --git a/internal/clients/servicemanager/service_instance_proxy_client.go b/internal/clients/servicemanager/service_instance_proxy_client.go index 664240e..806791f 100644 --- a/internal/clients/servicemanager/service_instance_proxy_client.go +++ b/internal/clients/servicemanager/service_instance_proxy_client.go @@ -84,7 +84,7 @@ func (t ServiceManagerInstanceProxyClient) describeAdminBinding(ctx context.Cont return nil, nil } - return (*BindingCredentials)(response), err + return mapBindingCredentialTypes(response), err } func (t ServiceManagerInstanceProxyClient) createAdminBinding(ctx context.Context, subaccountGuid string) (*BindingCredentials, error) { @@ -92,10 +92,24 @@ func (t ServiceManagerInstanceProxyClient) createAdminBinding(ctx context.Contex if err != nil { return nil, err } - return (*BindingCredentials)(result), err + return mapBindingCredentialTypes(result), err } func (t ServiceManagerInstanceProxyClient) deleteAdminBinding(ctx context.Context, subaccountGuid string) error { _, err := t.DeleteServiceManagementBindingOfSubaccount(ctx, subaccountGuid).Execute() return err } + +// mapBindingCredentialTypes is a helper function to convert ServiceManagerBindingResponseObject to BindingCredentials by mapping each value individually +func mapBindingCredentialTypes(in *accountsserviceclient.ServiceManagerBindingResponseObject) *BindingCredentials { + if in == nil { + return nil + } + out := new(BindingCredentials) + out.Clientid = in.Clientid + out.Clientsecret = in.Clientsecret + out.Url = in.Url + out.SmUrl = in.SmUrl + out.Xsappname = in.Xsappname + return out +} diff --git a/internal/openapi_clients/btp-accounts-service-api-go/README.md b/internal/openapi_clients/btp-accounts-service-api-go/README.md index 38d2e0b..3375826 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/README.md +++ b/internal/openapi_clients/btp-accounts-service-api-go/README.md @@ -9,7 +9,7 @@ for other OS see [official guide](https://openapi-generator.tech/docs/installati ### How to regenerate ```bash -openapi-generator generate -i swagger-patched.json -g go -o pkg/ --additional-properties=generateInterfaces=true +openapi-generator generate -i swagger-patched.json -g go -o pkg/ --additional-properties=generateInterfaces=true,disallowAdditionalPropertiesIfNotPresent=false go mod tidy -v ``` diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/api/openapi.yaml b/internal/openapi_clients/btp-accounts-service-api-go/pkg/api/openapi.yaml index 282ba04..f4c07a8 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/api/openapi.yaml +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/api/openapi.yaml @@ -4777,7 +4777,6 @@ components: - displayName - globalAccountGUID - guid - - parentFeatures - parentGUID - region - state diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_add_property_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_add_property_request_payload.go index 287401e..da26280 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_add_property_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_add_property_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type AddPropertyRequestPayload struct { Key string `json:"key"` // An optional value for the corresponding label key up to 63 characters. Attribute is case-sensitive -- try to avoid creating duplicate variants of the same value with a different casing. Value map[string]interface{} `json:"value"` + AdditionalProperties map[string]interface{} } type _AddPropertyRequestPayload AddPropertyRequestPayload @@ -108,6 +108,11 @@ func (o AddPropertyRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["key"] = o.Key toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *AddPropertyRequestPayload) UnmarshalJSON(data []byte) (err error) { varAddPropertyRequestPayload := _AddPropertyRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddPropertyRequestPayload) + err = json.Unmarshal(data, &varAddPropertyRequestPayload) if err != nil { return err @@ -146,6 +149,14 @@ func (o *AddPropertyRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = AddPropertyRequestPayload(varAddPropertyRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object.go index 70e8be6..d4acd48 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -22,6 +21,7 @@ var _ MappedNullable = &ApiExceptionResponseObject{} // ApiExceptionResponseObject struct for ApiExceptionResponseObject type ApiExceptionResponseObject struct { Error ApiExceptionResponseObjectError `json:"error"` + AdditionalProperties map[string]interface{} } type _ApiExceptionResponseObject ApiExceptionResponseObject @@ -79,6 +79,11 @@ func (o ApiExceptionResponseObject) MarshalJSON() ([]byte, error) { func (o ApiExceptionResponseObject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error"] = o.Error + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *ApiExceptionResponseObject) UnmarshalJSON(data []byte) (err error) { varApiExceptionResponseObject := _ApiExceptionResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varApiExceptionResponseObject) + err = json.Unmarshal(data, &varApiExceptionResponseObject) if err != nil { return err @@ -116,6 +119,13 @@ func (o *ApiExceptionResponseObject) UnmarshalJSON(data []byte) (err error) { *o = ApiExceptionResponseObject(varApiExceptionResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object_error.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object_error.go index 1633d4f..2f06f4a 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object_error.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_api_exception_response_object_error.go @@ -27,8 +27,11 @@ type ApiExceptionResponseObjectError struct { Message *string `json:"message,omitempty"` // The susppect. Target *string `json:"target,omitempty"` + AdditionalProperties map[string]interface{} } +type _ApiExceptionResponseObjectError ApiExceptionResponseObjectError + // NewApiExceptionResponseObjectError instantiates a new ApiExceptionResponseObjectError 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 @@ -196,9 +199,38 @@ func (o ApiExceptionResponseObjectError) ToMap() (map[string]interface{}, error) if !IsNil(o.Target) { toSerialize["target"] = o.Target } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ApiExceptionResponseObjectError) UnmarshalJSON(data []byte) (err error) { + varApiExceptionResponseObjectError := _ApiExceptionResponseObjectError{} + + err = json.Unmarshal(data, &varApiExceptionResponseObjectError) + + if err != nil { + return err + } + + *o = ApiExceptionResponseObjectError(varApiExceptionResponseObjectError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "correlationID") + delete(additionalProperties, "message") + delete(additionalProperties, "target") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableApiExceptionResponseObjectError struct { value *ApiExceptionResponseObjectError isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_clone_neo_subaccount_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_clone_neo_subaccount_request_payload.go index 9ffc85d..89f6aea 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_clone_neo_subaccount_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_clone_neo_subaccount_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -46,6 +45,7 @@ type CloneNeoSubaccountRequestPayload struct { Subdomain *string `json:"subdomain,omitempty"` // Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate action when handling incidents that are related to mission-critical accounts in production systems. Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos. Applying this setting this does not modify the subaccount. * NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes. * USED_FOR_PRODUCTION: Subaccount is used for production purposes. UsedForProduction *string `json:"usedForProduction,omitempty"` + AdditionalProperties map[string]interface{} } type _CloneNeoSubaccountRequestPayload CloneNeoSubaccountRequestPayload @@ -482,6 +482,11 @@ func (o CloneNeoSubaccountRequestPayload) ToMap() (map[string]interface{}, error if !IsNil(o.UsedForProduction) { toSerialize["usedForProduction"] = o.UsedForProduction } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -510,9 +515,7 @@ func (o *CloneNeoSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error varCloneNeoSubaccountRequestPayload := _CloneNeoSubaccountRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCloneNeoSubaccountRequestPayload) + err = json.Unmarshal(data, &varCloneNeoSubaccountRequestPayload) if err != nil { return err @@ -520,6 +523,24 @@ func (o *CloneNeoSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error *o = CloneNeoSubaccountRequestPayload(varCloneNeoSubaccountRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "betaEnabled") + delete(additionalProperties, "cloneConfigurations") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + delete(additionalProperties, "origin") + delete(additionalProperties, "parentGUID") + delete(additionalProperties, "region") + delete(additionalProperties, "subaccountAdmins") + delete(additionalProperties, "subdomain") + delete(additionalProperties, "usedForProduction") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_directory_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_directory_request_payload.go index 41bb911..66c0c0b 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_directory_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_directory_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -36,6 +35,7 @@ type CreateDirectoryRequestPayload struct { Labels *map[string][]string `json:"labels,omitempty"` // Applies only to directories that have the user authorization management feature enabled. The subdomain becomes part of the path used to access the authorization tenant of the directory. Must be unique in the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at start or end). Maximum length is 63 characters. Cannot be changed after the directory has been created. Subdomain *string `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateDirectoryRequestPayload CreateDirectoryRequestPayload @@ -306,6 +306,11 @@ func (o CreateDirectoryRequestPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Subdomain) { toSerialize["subdomain"] = o.Subdomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -333,9 +338,7 @@ func (o *CreateDirectoryRequestPayload) UnmarshalJSON(data []byte) (err error) { varCreateDirectoryRequestPayload := _CreateDirectoryRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDirectoryRequestPayload) + err = json.Unmarshal(data, &varCreateDirectoryRequestPayload) if err != nil { return err @@ -343,6 +346,19 @@ func (o *CreateDirectoryRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = CreateDirectoryRequestPayload(varCreateDirectoryRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "directoryAdmins") + delete(additionalProperties, "directoryFeatures") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + delete(additionalProperties, "subdomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_service_manager_binding_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_service_manager_binding_request_payload.go index cdcf27e..76795db 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_service_manager_binding_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_service_manager_binding_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type CreateServiceManagerBindingRequestPayload struct { Name string `json:"name"` // Service-specific configuration parameters. For example, mTLS authentication-type parameters. Parameters map[string]map[string]interface{} `json:"parameters,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateServiceManagerBindingRequestPayload CreateServiceManagerBindingRequestPayload @@ -117,6 +117,11 @@ func (o CreateServiceManagerBindingRequestPayload) ToMap() (map[string]interface if !IsNil(o.Parameters) { toSerialize["parameters"] = o.Parameters } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -144,9 +149,7 @@ func (o *CreateServiceManagerBindingRequestPayload) UnmarshalJSON(data []byte) ( varCreateServiceManagerBindingRequestPayload := _CreateServiceManagerBindingRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateServiceManagerBindingRequestPayload) + err = json.Unmarshal(data, &varCreateServiceManagerBindingRequestPayload) if err != nil { return err @@ -154,6 +157,14 @@ func (o *CreateServiceManagerBindingRequestPayload) UnmarshalJSON(data []byte) ( *o = CreateServiceManagerBindingRequestPayload(varCreateServiceManagerBindingRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_subaccount_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_subaccount_request_payload.go index 8aea778..ff50516 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_subaccount_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_create_subaccount_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -44,6 +43,7 @@ type CreateSubaccountRequestPayload struct { Subdomain *string `json:"subdomain,omitempty"` // Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate action when handling incidents that are related to mission-critical accounts in production systems. Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos. Applying this setting this does not modify the subaccount. * NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes. * USED_FOR_PRODUCTION: Subaccount is used for production purposes. UsedForProduction *string `json:"usedForProduction,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateSubaccountRequestPayload CreateSubaccountRequestPayload @@ -445,6 +445,11 @@ func (o CreateSubaccountRequestPayload) ToMap() (map[string]interface{}, error) if !IsNil(o.UsedForProduction) { toSerialize["usedForProduction"] = o.UsedForProduction } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -473,9 +478,7 @@ func (o *CreateSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) varCreateSubaccountRequestPayload := _CreateSubaccountRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateSubaccountRequestPayload) + err = json.Unmarshal(data, &varCreateSubaccountRequestPayload) if err != nil { return err @@ -483,6 +486,23 @@ func (o *CreateSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) *o = CreateSubaccountRequestPayload(varCreateSubaccountRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "betaEnabled") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + delete(additionalProperties, "origin") + delete(additionalProperties, "parentGUID") + delete(additionalProperties, "region") + delete(additionalProperties, "subaccountAdmins") + delete(additionalProperties, "subdomain") + delete(additionalProperties, "usedForProduction") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_data_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_data_response_object.go index 97e9c0a..df12072 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_data_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_data_response_object.go @@ -21,8 +21,11 @@ var _ MappedNullable = &DataResponseObject{} type DataResponseObject struct { // The response object containing information about the data. Values []PropertyDataResponseObject `json:"values,omitempty"` + AdditionalProperties map[string]interface{} } +type _DataResponseObject DataResponseObject + // NewDataResponseObject instantiates a new DataResponseObject 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 @@ -85,9 +88,35 @@ func (o DataResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.Values) { toSerialize["values"] = o.Values } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DataResponseObject) UnmarshalJSON(data []byte) (err error) { + varDataResponseObject := _DataResponseObject{} + + err = json.Unmarshal(data, &varDataResponseObject) + + if err != nil { + return err + } + + *o = DataResponseObject(varDataResponseObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "values") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDataResponseObject struct { value *DataResponseObject isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_directory_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_directory_response_object.go index cb22cc8..a1ee92b 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_directory_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_directory_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -56,6 +55,7 @@ type DirectoryResponseObject struct { Subaccounts []SubaccountResponseObject `json:"subaccounts,omitempty"` // Applies only to directories that have the user authorization management feature enabled. The subdomain becomes part of the path used to access the authorization tenant of the directory. Unique within the defined region. Subdomain *string `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} } type _DirectoryResponseObject DirectoryResponseObject @@ -654,6 +654,11 @@ func (o DirectoryResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.Subdomain) { toSerialize["subdomain"] = o.Subdomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -687,9 +692,7 @@ func (o *DirectoryResponseObject) UnmarshalJSON(data []byte) (err error) { varDirectoryResponseObject := _DirectoryResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDirectoryResponseObject) + err = json.Unmarshal(data, &varDirectoryResponseObject) if err != nil { return err @@ -697,6 +700,30 @@ func (o *DirectoryResponseObject) UnmarshalJSON(data []byte) (err error) { *o = DirectoryResponseObject(varDirectoryResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "children") + delete(additionalProperties, "contractStatus") + delete(additionalProperties, "createdBy") + delete(additionalProperties, "createdDate") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "directoryFeatures") + delete(additionalProperties, "displayName") + delete(additionalProperties, "entityState") + delete(additionalProperties, "globalAccountGUID") + delete(additionalProperties, "guid") + delete(additionalProperties, "labels") + delete(additionalProperties, "legalLinks") + delete(additionalProperties, "modifiedDate") + delete(additionalProperties, "parentGUID") + delete(additionalProperties, "stateMessage") + delete(additionalProperties, "subaccounts") + delete(additionalProperties, "subdomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_entity_settings_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_entity_settings_request_payload.go index c90a9ad..bd1e6e7 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_entity_settings_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_entity_settings_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &EntitySettingsRequestPayload{} type EntitySettingsRequestPayload struct { // Additional properties for the settings. EntitySettings []UpdateEntitySettingsRequestPayload `json:"entitySettings"` + AdditionalProperties map[string]interface{} } type _EntitySettingsRequestPayload EntitySettingsRequestPayload @@ -80,6 +80,11 @@ func (o EntitySettingsRequestPayload) MarshalJSON() ([]byte, error) { func (o EntitySettingsRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["entitySettings"] = o.EntitySettings + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *EntitySettingsRequestPayload) UnmarshalJSON(data []byte) (err error) { varEntitySettingsRequestPayload := _EntitySettingsRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varEntitySettingsRequestPayload) + err = json.Unmarshal(data, &varEntitySettingsRequestPayload) if err != nil { return err @@ -117,6 +120,13 @@ func (o *EntitySettingsRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = EntitySettingsRequestPayload(varEntitySettingsRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entitySettings") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_global_account_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_global_account_response_object.go index 6325f3c..2eea7f7 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_global_account_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_global_account_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -89,6 +88,7 @@ type GlobalAccountResponseObject struct { TerminationNotificationStatus *string `json:"terminationNotificationStatus,omitempty"` // For internal accounts, the intended purpose of the global account. Possible purposes: * Development: For development of a service. * Testing: For testing development. * Demo: For creating demos. * Production: For delivering a service in a production landscape. UseFor *string `json:"useFor,omitempty"` + AdditionalProperties map[string]interface{} } type _GlobalAccountResponseObject GlobalAccountResponseObject @@ -1214,6 +1214,11 @@ func (o GlobalAccountResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.UseFor) { toSerialize["useFor"] = o.UseFor } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -1251,9 +1256,7 @@ func (o *GlobalAccountResponseObject) UnmarshalJSON(data []byte) (err error) { varGlobalAccountResponseObject := _GlobalAccountResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGlobalAccountResponseObject) + err = json.Unmarshal(data, &varGlobalAccountResponseObject) if err != nil { return err @@ -1261,6 +1264,46 @@ func (o *GlobalAccountResponseObject) UnmarshalJSON(data []byte) (err error) { *o = GlobalAccountResponseObject(varGlobalAccountResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backwardCompliantEU") + delete(additionalProperties, "bpoCustomerId") + delete(additionalProperties, "children") + delete(additionalProperties, "commercialModel") + delete(additionalProperties, "consumptionBased") + delete(additionalProperties, "contractStatus") + delete(additionalProperties, "costCenter") + delete(additionalProperties, "costObjectId") + delete(additionalProperties, "costObjectType") + delete(additionalProperties, "createdDate") + delete(additionalProperties, "crmCustomerId") + delete(additionalProperties, "crmTenantId") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "entityState") + delete(additionalProperties, "expiryDate") + delete(additionalProperties, "geoAccess") + delete(additionalProperties, "globalAccountGUID") + delete(additionalProperties, "guid") + delete(additionalProperties, "labels") + delete(additionalProperties, "legalLinks") + delete(additionalProperties, "licenseType") + delete(additionalProperties, "modifiedDate") + delete(additionalProperties, "origin") + delete(additionalProperties, "parentGUID") + delete(additionalProperties, "parentType") + delete(additionalProperties, "renewalDate") + delete(additionalProperties, "serviceId") + delete(additionalProperties, "stateMessage") + delete(additionalProperties, "subaccounts") + delete(additionalProperties, "subdomain") + delete(additionalProperties, "terminationNotificationStatus") + delete(additionalProperties, "useFor") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_label_assignment_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_label_assignment_request_payload.go index c8b5f9d..3e0bc26 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_label_assignment_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_label_assignment_request_payload.go @@ -21,8 +21,11 @@ var _ MappedNullable = &LabelAssignmentRequestPayload{} type LabelAssignmentRequestPayload struct { // Labels as key-value pairs in JSON format. An entity is allowed up to 10 labels. The key of each label is mandatory and is limited to 63 characters. Standard labels can have any name (key) that you define, with only a single optional value assigned per key. To define a special type of label, called tags, specify the key with the name 'tags' and associate up to 10 values per tag in the array. The key 'tags' (in any casing variation) can only be used once per entity. Note that label values (not keys) are case-sensitive -- be careful not to create duplicate variants of the same value with a different casing (example: \"myValue\" and \"MyValue\"). For example: { \"Cost Center\":\"2624061970\" \"Department\":\"Sales\" \"tags\": [\"Green\", \"Pharma\", \"Audited\"] } Labels *map[string][]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} } +type _LabelAssignmentRequestPayload LabelAssignmentRequestPayload + // NewLabelAssignmentRequestPayload instantiates a new LabelAssignmentRequestPayload 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 @@ -85,9 +88,35 @@ func (o LabelAssignmentRequestPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Labels) { toSerialize["labels"] = o.Labels } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *LabelAssignmentRequestPayload) UnmarshalJSON(data []byte) (err error) { + varLabelAssignmentRequestPayload := _LabelAssignmentRequestPayload{} + + err = json.Unmarshal(data, &varLabelAssignmentRequestPayload) + + if err != nil { + return err + } + + *o = LabelAssignmentRequestPayload(varLabelAssignmentRequestPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableLabelAssignmentRequestPayload struct { value *LabelAssignmentRequestPayload isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_labels_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_labels_response_object.go index 822fe35..0d711e8 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_labels_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_labels_response_object.go @@ -21,8 +21,11 @@ var _ MappedNullable = &LabelsResponseObject{} type LabelsResponseObject struct { // User-defined labels that are assigned as key-value pairs in a JSON array to the entity. Example: { \"Cost Center\": [\"19700626\"], \"Department\": [\"Sales\"], \"Contacts\": [\"name1@example.com\",\"name2@example.com\"], \"EMEA\":[] } Labels *map[string][]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} } +type _LabelsResponseObject LabelsResponseObject + // NewLabelsResponseObject instantiates a new LabelsResponseObject 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 @@ -85,9 +88,35 @@ func (o LabelsResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.Labels) { toSerialize["labels"] = o.Labels } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *LabelsResponseObject) UnmarshalJSON(data []byte) (err error) { + varLabelsResponseObject := _LabelsResponseObject{} + + err = json.Unmarshal(data, &varLabelsResponseObject) + + if err != nil { + return err + } + + *o = LabelsResponseObject(varLabelsResponseObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableLabelsResponseObject struct { value *LabelsResponseObject isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_legal_links_dto.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_legal_links_dto.go index fe2c110..3d9ba86 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_legal_links_dto.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_legal_links_dto.go @@ -20,8 +20,11 @@ var _ MappedNullable = &LegalLinksDTO{} // LegalLinksDTO struct for LegalLinksDTO type LegalLinksDTO struct { Privacy *string `json:"privacy,omitempty"` + AdditionalProperties map[string]interface{} } +type _LegalLinksDTO LegalLinksDTO + // NewLegalLinksDTO instantiates a new LegalLinksDTO 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 @@ -84,9 +87,35 @@ func (o LegalLinksDTO) ToMap() (map[string]interface{}, error) { if !IsNil(o.Privacy) { toSerialize["privacy"] = o.Privacy } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *LegalLinksDTO) UnmarshalJSON(data []byte) (err error) { + varLegalLinksDTO := _LegalLinksDTO{} + + err = json.Unmarshal(data, &varLegalLinksDTO) + + if err != nil { + return err + } + + *o = LegalLinksDTO(varLegalLinksDTO) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "privacy") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableLegalLinksDTO struct { value *LegalLinksDTO isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccount_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccount_request_payload.go index 2bc1cbf..15ee1d8 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccount_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccount_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &MoveSubaccountRequestPayload{} type MoveSubaccountRequestPayload struct { // The GUID of the new location of the subaccount. To move to a directory, enter the GUID of the directory. To move out of a directory to the root global account, enter the GUID of the global account. TargetAccountGUID string `json:"targetAccountGUID"` + AdditionalProperties map[string]interface{} } type _MoveSubaccountRequestPayload MoveSubaccountRequestPayload @@ -80,6 +80,11 @@ func (o MoveSubaccountRequestPayload) MarshalJSON() ([]byte, error) { func (o MoveSubaccountRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["targetAccountGUID"] = o.TargetAccountGUID + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *MoveSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) { varMoveSubaccountRequestPayload := _MoveSubaccountRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMoveSubaccountRequestPayload) + err = json.Unmarshal(data, &varMoveSubaccountRequestPayload) if err != nil { return err @@ -117,6 +120,13 @@ func (o *MoveSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = MoveSubaccountRequestPayload(varMoveSubaccountRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "targetAccountGUID") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload.go index 4c4f2fd..1778dd8 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type MoveSubaccountsRequestPayload struct { SubaccountGuids []string `json:"subaccountGuids"` // The GUID of the new location of the subaccounts. To move to a directory, enter the GUID of the directory. To move out of a directory to the root global account, enter the GUID of the global account. TargetGuid string `json:"targetGuid"` + AdditionalProperties map[string]interface{} } type _MoveSubaccountsRequestPayload MoveSubaccountsRequestPayload @@ -136,6 +136,11 @@ func (o MoveSubaccountsRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize["sourceGuid"] = o.SourceGuid toSerialize["subaccountGuids"] = o.SubaccountGuids toSerialize["targetGuid"] = o.TargetGuid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *MoveSubaccountsRequestPayload) UnmarshalJSON(data []byte) (err error) { varMoveSubaccountsRequestPayload := _MoveSubaccountsRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMoveSubaccountsRequestPayload) + err = json.Unmarshal(data, &varMoveSubaccountsRequestPayload) if err != nil { return err @@ -175,6 +178,15 @@ func (o *MoveSubaccountsRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = MoveSubaccountsRequestPayload(varMoveSubaccountsRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "sourceGuid") + delete(additionalProperties, "subaccountGuids") + delete(additionalProperties, "targetGuid") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload_collection.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload_collection.go index 62ff9e6..f1aed2f 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload_collection.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_move_subaccounts_request_payload_collection.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &MoveSubaccountsRequestPayloadCollection{} type MoveSubaccountsRequestPayloadCollection struct { // Provide the parameters necessary to obtain information about the source and the target locations. SubaccountsToMoveCollection []MoveSubaccountsRequestPayload `json:"subaccountsToMoveCollection"` + AdditionalProperties map[string]interface{} } type _MoveSubaccountsRequestPayloadCollection MoveSubaccountsRequestPayloadCollection @@ -80,6 +80,11 @@ func (o MoveSubaccountsRequestPayloadCollection) MarshalJSON() ([]byte, error) { func (o MoveSubaccountsRequestPayloadCollection) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["subaccountsToMoveCollection"] = o.SubaccountsToMoveCollection + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *MoveSubaccountsRequestPayloadCollection) UnmarshalJSON(data []byte) (er varMoveSubaccountsRequestPayloadCollection := _MoveSubaccountsRequestPayloadCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMoveSubaccountsRequestPayloadCollection) + err = json.Unmarshal(data, &varMoveSubaccountsRequestPayloadCollection) if err != nil { return err @@ -117,6 +120,13 @@ func (o *MoveSubaccountsRequestPayloadCollection) UnmarshalJSON(data []byte) (er *o = MoveSubaccountsRequestPayloadCollection(varMoveSubaccountsRequestPayloadCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "subaccountsToMoveCollection") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_nesting_error_details_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_nesting_error_details_response_object.go index 608a7d7..3c91c0d 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_nesting_error_details_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_nesting_error_details_response_object.go @@ -21,8 +21,11 @@ var _ MappedNullable = &NestingErrorDetailsResponseObject{} type NestingErrorDetailsResponseObject struct { Code *int32 `json:"code,omitempty"` Message *string `json:"message,omitempty"` + AdditionalProperties map[string]interface{} } +type _NestingErrorDetailsResponseObject NestingErrorDetailsResponseObject + // NewNestingErrorDetailsResponseObject instantiates a new NestingErrorDetailsResponseObject 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 @@ -120,9 +123,36 @@ func (o NestingErrorDetailsResponseObject) ToMap() (map[string]interface{}, erro if !IsNil(o.Message) { toSerialize["message"] = o.Message } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *NestingErrorDetailsResponseObject) UnmarshalJSON(data []byte) (err error) { + varNestingErrorDetailsResponseObject := _NestingErrorDetailsResponseObject{} + + err = json.Unmarshal(data, &varNestingErrorDetailsResponseObject) + + if err != nil { + return err + } + + *o = NestingErrorDetailsResponseObject(varNestingErrorDetailsResponseObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableNestingErrorDetailsResponseObject struct { value *NestingErrorDetailsResponseObject isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_data_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_data_response_object.go index c306018..c955f49 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_data_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_data_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -39,6 +38,7 @@ type PropertyDataResponseObject struct { ValidationSchema map[string]map[string]interface{} `json:"validationSchema,omitempty"` // The user-defined value for the corresponding key. Limited to 1024 characters. Value map[string]interface{} `json:"value,omitempty"` + AdditionalProperties map[string]interface{} } type _PropertyDataResponseObject PropertyDataResponseObject @@ -367,6 +367,11 @@ func (o PropertyDataResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.Value) { toSerialize["value"] = o.Value } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -395,9 +400,7 @@ func (o *PropertyDataResponseObject) UnmarshalJSON(data []byte) (err error) { varPropertyDataResponseObject := _PropertyDataResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPropertyDataResponseObject) + err = json.Unmarshal(data, &varPropertyDataResponseObject) if err != nil { return err @@ -405,6 +408,21 @@ func (o *PropertyDataResponseObject) UnmarshalJSON(data []byte) (err error) { *o = PropertyDataResponseObject(varPropertyDataResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "classification") + delete(additionalProperties, "defaultValue") + delete(additionalProperties, "description") + delete(additionalProperties, "dynamicProperty") + delete(additionalProperties, "entityType") + delete(additionalProperties, "entityTypeGuid") + delete(additionalProperties, "key") + delete(additionalProperties, "validationSchema") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_response_object.go index a50be96..85fa266 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_property_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PropertyResponseObject struct { Key string `json:"key"` // The value for the corresponding label key. Value string `json:"value"` + AdditionalProperties map[string]interface{} } type _PropertyResponseObject PropertyResponseObject @@ -136,6 +136,11 @@ func (o PropertyResponseObject) ToMap() (map[string]interface{}, error) { toSerialize["accountGUID"] = o.AccountGUID toSerialize["key"] = o.Key toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *PropertyResponseObject) UnmarshalJSON(data []byte) (err error) { varPropertyResponseObject := _PropertyResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPropertyResponseObject) + err = json.Unmarshal(data, &varPropertyResponseObject) if err != nil { return err @@ -175,6 +178,15 @@ func (o *PropertyResponseObject) UnmarshalJSON(data []byte) (err error) { *o = PropertyResponseObject(varPropertyResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accountGUID") + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_response_collection.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_response_collection.go index 15e9a63..5d0d3de 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_response_collection.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_response_collection.go @@ -20,8 +20,11 @@ var _ MappedNullable = &ResponseCollection{} // ResponseCollection struct for ResponseCollection type ResponseCollection struct { Value []SubaccountResponseObject `json:"value,omitempty"` + AdditionalProperties map[string]interface{} } +type _ResponseCollection ResponseCollection + // NewResponseCollection instantiates a new ResponseCollection 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 @@ -84,9 +87,35 @@ func (o ResponseCollection) ToMap() (map[string]interface{}, error) { if !IsNil(o.Value) { toSerialize["value"] = o.Value } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ResponseCollection) UnmarshalJSON(data []byte) (err error) { + varResponseCollection := _ResponseCollection{} + + err = json.Unmarshal(data, &varResponseCollection) + + if err != nil { + return err + } + + *o = ResponseCollection(varResponseCollection) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableResponseCollection struct { value *ResponseCollection isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_extended_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_extended_response_object.go index 43b80ff..208525a 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_extended_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_extended_response_object.go @@ -39,8 +39,11 @@ type ServiceManagerBindingExtendedResponseObject struct { Url *string `json:"url,omitempty"` // The name of the xsapp used to get the access token. Xsappname *string `json:"xsappname,omitempty"` + AdditionalProperties map[string]interface{} } +type _ServiceManagerBindingExtendedResponseObject ServiceManagerBindingExtendedResponseObject + // NewServiceManagerBindingExtendedResponseObject instantiates a new ServiceManagerBindingExtendedResponseObject 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 @@ -418,9 +421,44 @@ func (o ServiceManagerBindingExtendedResponseObject) ToMap() (map[string]interfa if !IsNil(o.Xsappname) { toSerialize["xsappname"] = o.Xsappname } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ServiceManagerBindingExtendedResponseObject) UnmarshalJSON(data []byte) (err error) { + varServiceManagerBindingExtendedResponseObject := _ServiceManagerBindingExtendedResponseObject{} + + err = json.Unmarshal(data, &varServiceManagerBindingExtendedResponseObject) + + if err != nil { + return err + } + + *o = ServiceManagerBindingExtendedResponseObject(varServiceManagerBindingExtendedResponseObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certUrl") + delete(additionalProperties, "certificate") + delete(additionalProperties, "clientid") + delete(additionalProperties, "clientsecret") + delete(additionalProperties, "creationDate") + delete(additionalProperties, "key") + delete(additionalProperties, "name") + delete(additionalProperties, "sm_url") + delete(additionalProperties, "url") + delete(additionalProperties, "xsappname") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableServiceManagerBindingExtendedResponseObject struct { value *ServiceManagerBindingExtendedResponseObject isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_response_object.go index aa86e42..f9129ef 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_binding_response_object.go @@ -29,8 +29,11 @@ type ServiceManagerBindingResponseObject struct { Url *string `json:"url,omitempty"` // The name of the xsapp used to get the access token. Xsappname *string `json:"xsappname,omitempty"` + AdditionalProperties map[string]interface{} } +type _ServiceManagerBindingResponseObject ServiceManagerBindingResponseObject + // NewServiceManagerBindingResponseObject instantiates a new ServiceManagerBindingResponseObject 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 @@ -233,9 +236,39 @@ func (o ServiceManagerBindingResponseObject) ToMap() (map[string]interface{}, er if !IsNil(o.Xsappname) { toSerialize["xsappname"] = o.Xsappname } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ServiceManagerBindingResponseObject) UnmarshalJSON(data []byte) (err error) { + varServiceManagerBindingResponseObject := _ServiceManagerBindingResponseObject{} + + err = json.Unmarshal(data, &varServiceManagerBindingResponseObject) + + if err != nil { + return err + } + + *o = ServiceManagerBindingResponseObject(varServiceManagerBindingResponseObject) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "clientid") + delete(additionalProperties, "clientsecret") + delete(additionalProperties, "sm_url") + delete(additionalProperties, "url") + delete(additionalProperties, "xsappname") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableServiceManagerBindingResponseObject struct { value *ServiceManagerBindingResponseObject isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_bindings_response_list.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_bindings_response_list.go index 38f093d..daa4a9d 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_bindings_response_list.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_service_manager_bindings_response_list.go @@ -20,8 +20,11 @@ var _ MappedNullable = &ServiceManagerBindingsResponseList{} // ServiceManagerBindingsResponseList The list of the Service Manager bindings for the specified subaccount GUID. type ServiceManagerBindingsResponseList struct { Items []ServiceManagerBindingExtendedResponseObject `json:"items,omitempty"` + AdditionalProperties map[string]interface{} } +type _ServiceManagerBindingsResponseList ServiceManagerBindingsResponseList + // NewServiceManagerBindingsResponseList instantiates a new ServiceManagerBindingsResponseList 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 @@ -84,9 +87,35 @@ func (o ServiceManagerBindingsResponseList) ToMap() (map[string]interface{}, err if !IsNil(o.Items) { toSerialize["items"] = o.Items } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ServiceManagerBindingsResponseList) UnmarshalJSON(data []byte) (err error) { + varServiceManagerBindingsResponseList := _ServiceManagerBindingsResponseList{} + + err = json.Unmarshal(data, &varServiceManagerBindingsResponseList) + + if err != nil { + return err + } + + *o = ServiceManagerBindingsResponseList(varServiceManagerBindingsResponseList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "items") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableServiceManagerBindingsResponseList struct { value *ServiceManagerBindingsResponseList isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_subaccount_response_object.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_subaccount_response_object.go index 9ce2874..7f0e44b 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_subaccount_response_object.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_subaccount_response_object.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -43,7 +42,7 @@ type SubaccountResponseObject struct { // The date the subaccount was last modified. Dates and times are in UTC format. ModifiedDate *int64 `json:"modifiedDate,omitempty"` // The features of parent entity of the subaccount. - ParentFeatures []string `json:"parentFeatures"` + ParentFeatures []string `json:"parentFeatures,omitempty"` // The GUID of the subaccount’s parent entity. If the subaccount is located directly in the global account (not in a directory), then this is the GUID of the global account. ParentGUID string `json:"parentGUID"` // The region in which the subaccount was created. @@ -58,6 +57,7 @@ type SubaccountResponseObject struct { TechnicalName string `json:"technicalName"` // Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate action when handling incidents that are related to mission-critical accounts in production systems. Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos. Applying this setting this does not modify the subaccount. * UNSET: Global account or subaccount admin has not set the production-relevancy flag. Default value. * NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes. * USED_FOR_PRODUCTION: Subaccount is used for production purposes. UsedForProduction string `json:"usedForProduction"` + AdditionalProperties map[string]interface{} } type _SubaccountResponseObject SubaccountResponseObject @@ -66,7 +66,7 @@ type _SubaccountResponseObject SubaccountResponseObject // 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 NewSubaccountResponseObject(betaEnabled bool, createdDate int64, description string, displayName string, globalAccountGUID string, guid string, parentFeatures []string, parentGUID string, region string, state string, subdomain string, technicalName string, usedForProduction string) *SubaccountResponseObject { +func NewSubaccountResponseObject(betaEnabled bool, createdDate int64, description string, displayName string, globalAccountGUID string, guid string, parentGUID string, region string, state string, subdomain string, technicalName string, usedForProduction string) *SubaccountResponseObject { this := SubaccountResponseObject{} this.BetaEnabled = betaEnabled this.CreatedDate = createdDate @@ -74,7 +74,6 @@ func NewSubaccountResponseObject(betaEnabled bool, createdDate int64, descriptio this.DisplayName = displayName this.GlobalAccountGUID = globalAccountGUID this.Guid = guid - this.ParentFeatures = parentFeatures this.ParentGUID = parentGUID this.Region = region this.State = state @@ -367,26 +366,34 @@ func (o *SubaccountResponseObject) SetModifiedDate(v int64) { o.ModifiedDate = &v } -// GetParentFeatures returns the ParentFeatures field value +// GetParentFeatures returns the ParentFeatures field value if set, zero value otherwise. func (o *SubaccountResponseObject) GetParentFeatures() []string { - if o == nil { + if o == nil || IsNil(o.ParentFeatures) { var ret []string return ret } - return o.ParentFeatures } -// GetParentFeaturesOk returns a tuple with the ParentFeatures field value +// GetParentFeaturesOk returns a tuple with the ParentFeatures field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SubaccountResponseObject) GetParentFeaturesOk() ([]string, bool) { - if o == nil { + if o == nil || IsNil(o.ParentFeatures) { return nil, false } return o.ParentFeatures, true } -// SetParentFeatures sets field value +// HasParentFeatures returns a boolean if a field has been set. +func (o *SubaccountResponseObject) HasParentFeatures() bool { + if o != nil && !IsNil(o.ParentFeatures) { + return true + } + + return false +} + +// SetParentFeatures gets a reference to the given []string and assigns it to the ParentFeatures field. func (o *SubaccountResponseObject) SetParentFeatures(v []string) { o.ParentFeatures = v } @@ -595,7 +602,9 @@ func (o SubaccountResponseObject) ToMap() (map[string]interface{}, error) { if !IsNil(o.ModifiedDate) { toSerialize["modifiedDate"] = o.ModifiedDate } - toSerialize["parentFeatures"] = o.ParentFeatures + if !IsNil(o.ParentFeatures) { + toSerialize["parentFeatures"] = o.ParentFeatures + } toSerialize["parentGUID"] = o.ParentGUID toSerialize["region"] = o.Region toSerialize["state"] = o.State @@ -605,6 +614,11 @@ func (o SubaccountResponseObject) ToMap() (map[string]interface{}, error) { toSerialize["subdomain"] = o.Subdomain toSerialize["technicalName"] = o.TechnicalName toSerialize["usedForProduction"] = o.UsedForProduction + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -619,7 +633,6 @@ func (o *SubaccountResponseObject) UnmarshalJSON(data []byte) (err error) { "displayName", "globalAccountGUID", "guid", - "parentFeatures", "parentGUID", "region", "state", @@ -644,9 +657,7 @@ func (o *SubaccountResponseObject) UnmarshalJSON(data []byte) (err error) { varSubaccountResponseObject := _SubaccountResponseObject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSubaccountResponseObject) + err = json.Unmarshal(data, &varSubaccountResponseObject) if err != nil { return err @@ -654,6 +665,30 @@ func (o *SubaccountResponseObject) UnmarshalJSON(data []byte) (err error) { *o = SubaccountResponseObject(varSubaccountResponseObject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "betaEnabled") + delete(additionalProperties, "createdBy") + delete(additionalProperties, "createdDate") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "globalAccountGUID") + delete(additionalProperties, "guid") + delete(additionalProperties, "labels") + delete(additionalProperties, "modifiedDate") + delete(additionalProperties, "parentFeatures") + delete(additionalProperties, "parentGUID") + delete(additionalProperties, "region") + delete(additionalProperties, "state") + delete(additionalProperties, "stateMessage") + delete(additionalProperties, "subdomain") + delete(additionalProperties, "technicalName") + delete(additionalProperties, "usedForProduction") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_request_payload.go index ec130a1..415c8db 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_request_payload.go @@ -28,8 +28,11 @@ type UpdateDirectoryRequestPayload struct { DisplayName *string `json:"displayName,omitempty" validate:"regexp=^((?![\\/]).)*$"` // JSON array of up to 10 user-defined labels to assign as key-value pairs to the directory. Each label has a name (key) that you specify, and to which you can assign up to 10 corresponding values or leave empty. Keys and values are each limited to 63 characters. Label keys and values are case-sensitive. Try to avoid creating duplicate variants of the same keys or values with a different casing (example: \"myValue\" and \"MyValue\"). Example: { \"Cost Center\": [\"19700626\"], \"Department\": [\"Sales\"], \"Contacts\": [\"name1@example.com\",\"name2@example.com\"], \"EMEA\":[] } IMPORTANT: The JSON array overwrites any labels that are currently assigned to the subaccount. In the request, you must include not only new and updated key-value pairs, but also existing ones that you do not want changed. Omit keys/values that you want removed as labels from the subaccount. Any labels previously set using the deprecated \"customProperties\" field are also overwritten. Labels *map[string][]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} } +type _UpdateDirectoryRequestPayload UpdateDirectoryRequestPayload + // NewUpdateDirectoryRequestPayload instantiates a new UpdateDirectoryRequestPayload 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 @@ -200,9 +203,38 @@ func (o UpdateDirectoryRequestPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Labels) { toSerialize["labels"] = o.Labels } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *UpdateDirectoryRequestPayload) UnmarshalJSON(data []byte) (err error) { + varUpdateDirectoryRequestPayload := _UpdateDirectoryRequestPayload{} + + err = json.Unmarshal(data, &varUpdateDirectoryRequestPayload) + + if err != nil { + return err + } + + *o = UpdateDirectoryRequestPayload(varUpdateDirectoryRequestPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableUpdateDirectoryRequestPayload struct { value *UpdateDirectoryRequestPayload isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_type_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_type_request_payload.go index 9382580..51c577c 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_type_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_directory_type_request_payload.go @@ -25,8 +25,11 @@ type UpdateDirectoryTypeRequestPayload struct { DirectoryFeatures []string `json:"directoryFeatures,omitempty"` // Applies only to directories that have the user authorization management feature enabled. The subdomain becomes part of the path used to access the authorization tenant of the directory. Must be unique within the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at start or end). Maximum length is 63 characters. Cannot be changed after the directory has been created. Subdomain *string `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} } +type _UpdateDirectoryTypeRequestPayload UpdateDirectoryTypeRequestPayload + // NewUpdateDirectoryTypeRequestPayload instantiates a new UpdateDirectoryTypeRequestPayload 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 @@ -159,9 +162,37 @@ func (o UpdateDirectoryTypeRequestPayload) ToMap() (map[string]interface{}, erro if !IsNil(o.Subdomain) { toSerialize["subdomain"] = o.Subdomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *UpdateDirectoryTypeRequestPayload) UnmarshalJSON(data []byte) (err error) { + varUpdateDirectoryTypeRequestPayload := _UpdateDirectoryTypeRequestPayload{} + + err = json.Unmarshal(data, &varUpdateDirectoryTypeRequestPayload) + + if err != nil { + return err + } + + *o = UpdateDirectoryTypeRequestPayload(varUpdateDirectoryTypeRequestPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "directoryAdmins") + delete(additionalProperties, "directoryFeatures") + delete(additionalProperties, "subdomain") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableUpdateDirectoryTypeRequestPayload struct { value *UpdateDirectoryTypeRequestPayload isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_entity_settings_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_entity_settings_request_payload.go index 3de5474..99bbdc1 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_entity_settings_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_entity_settings_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type UpdateEntitySettingsRequestPayload struct { Key string `json:"key"` // A value for the corresponding key. Limited to 2000 characters. Value map[string]interface{} `json:"value"` + AdditionalProperties map[string]interface{} } type _UpdateEntitySettingsRequestPayload UpdateEntitySettingsRequestPayload @@ -108,6 +108,11 @@ func (o UpdateEntitySettingsRequestPayload) ToMap() (map[string]interface{}, err toSerialize := map[string]interface{}{} toSerialize["key"] = o.Key toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *UpdateEntitySettingsRequestPayload) UnmarshalJSON(data []byte) (err err varUpdateEntitySettingsRequestPayload := _UpdateEntitySettingsRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateEntitySettingsRequestPayload) + err = json.Unmarshal(data, &varUpdateEntitySettingsRequestPayload) if err != nil { return err @@ -146,6 +149,14 @@ func (o *UpdateEntitySettingsRequestPayload) UnmarshalJSON(data []byte) (err err *o = UpdateEntitySettingsRequestPayload(varUpdateEntitySettingsRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_global_account_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_global_account_request_payload.go index 5dde1e0..a60ed2a 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_global_account_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_global_account_request_payload.go @@ -28,8 +28,11 @@ type UpdateGlobalAccountRequestPayload struct { DisplayName *string `json:"displayName,omitempty" validate:"regexp=^((?![\\/]).)*$"` // JSON array of up to 10 user-defined labels to assign as key-value pairs to the global account. Each label has a name (key) that you specify, and to which you can assign up to 10 corresponding values or leave empty. Keys and values are each limited to 63 characters. Label keys and values are case-sensitive. Try to avoid creating duplicate variants of the same keys or values with a different casing (example: \"myValue\" and \"MyValue\"). Example: { \"Cost Center\": [\"19700626\"], \"Department\": [\"Sales\"], \"Contacts\": [\"name1@example.com\",\"name2@example.com\"], \"EMEA\":[] } IMPORTANT : The JSON array overwrites any labels that are currently assigned to the global account. In the request, you must include not only new and updated key-value pairs, but also existing ones that you do not want changed. Omit keys/values that you want removed as labels from the global account. Any labels previously set using the deprecated \"customProperties\" field are also overwritten. Labels *map[string][]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} } +type _UpdateGlobalAccountRequestPayload UpdateGlobalAccountRequestPayload + // NewUpdateGlobalAccountRequestPayload instantiates a new UpdateGlobalAccountRequestPayload 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 @@ -200,9 +203,38 @@ func (o UpdateGlobalAccountRequestPayload) ToMap() (map[string]interface{}, erro if !IsNil(o.Labels) { toSerialize["labels"] = o.Labels } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *UpdateGlobalAccountRequestPayload) UnmarshalJSON(data []byte) (err error) { + varUpdateGlobalAccountRequestPayload := _UpdateGlobalAccountRequestPayload{} + + err = json.Unmarshal(data, &varUpdateGlobalAccountRequestPayload) + + if err != nil { + return err + } + + *o = UpdateGlobalAccountRequestPayload(varUpdateGlobalAccountRequestPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableUpdateGlobalAccountRequestPayload struct { value *UpdateGlobalAccountRequestPayload isSet bool diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_property_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_property_request_payload.go index 8673251..8e3d91a 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_property_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_property_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type UpdatePropertyRequestPayload struct { Key string `json:"key"` // An optional value for the corresponding label key up to 63 characters. Attribute is case-sensitive -- try to avoid creating duplicate variants of the same keys with a different casing. Value map[string]interface{} `json:"value"` + AdditionalProperties map[string]interface{} } type _UpdatePropertyRequestPayload UpdatePropertyRequestPayload @@ -145,6 +145,11 @@ func (o UpdatePropertyRequestPayload) ToMap() (map[string]interface{}, error) { } toSerialize["key"] = o.Key toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -173,9 +178,7 @@ func (o *UpdatePropertyRequestPayload) UnmarshalJSON(data []byte) (err error) { varUpdatePropertyRequestPayload := _UpdatePropertyRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdatePropertyRequestPayload) + err = json.Unmarshal(data, &varUpdatePropertyRequestPayload) if err != nil { return err @@ -183,6 +186,15 @@ func (o *UpdatePropertyRequestPayload) UnmarshalJSON(data []byte) (err error) { *o = UpdatePropertyRequestPayload(varUpdatePropertyRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "delete") + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_subaccount_request_payload.go b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_subaccount_request_payload.go index 8112a3a..2b97e32 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_subaccount_request_payload.go +++ b/internal/openapi_clients/btp-accounts-service-api-go/pkg/model_update_subaccount_request_payload.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "bytes" "fmt" ) @@ -34,6 +33,7 @@ type UpdateSubaccountRequestPayload struct { Labels *map[string][]string `json:"labels,omitempty"` // Whether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate action when handling incidents that are related to mission-critical accounts in production systems. Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos. Applying this setting this does not modify the subaccount. * NOT_USED_FOR_PRODUCTION: Subaccount is not used for production purposes. * USED_FOR_PRODUCTION: Subaccount is used for production purposes. UsedForProduction *string `json:"usedForProduction,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateSubaccountRequestPayload UpdateSubaccountRequestPayload @@ -269,6 +269,11 @@ func (o UpdateSubaccountRequestPayload) ToMap() (map[string]interface{}, error) if !IsNil(o.UsedForProduction) { toSerialize["usedForProduction"] = o.UsedForProduction } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -296,9 +301,7 @@ func (o *UpdateSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) varUpdateSubaccountRequestPayload := _UpdateSubaccountRequestPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateSubaccountRequestPayload) + err = json.Unmarshal(data, &varUpdateSubaccountRequestPayload) if err != nil { return err @@ -306,6 +309,18 @@ func (o *UpdateSubaccountRequestPayload) UnmarshalJSON(data []byte) (err error) *o = UpdateSubaccountRequestPayload(varUpdateSubaccountRequestPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "betaEnabled") + delete(additionalProperties, "customProperties") + delete(additionalProperties, "description") + delete(additionalProperties, "displayName") + delete(additionalProperties, "labels") + delete(additionalProperties, "usedForProduction") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/internal/openapi_clients/btp-accounts-service-api-go/swagger-patched.json b/internal/openapi_clients/btp-accounts-service-api-go/swagger-patched.json index 98bfe88..468729d 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/swagger-patched.json +++ b/internal/openapi_clients/btp-accounts-service-api-go/swagger-patched.json @@ -1139,7 +1139,6 @@ "displayName", "globalAccountGUID", "guid", - "parentFeatures", "parentGUID", "region", "state", diff --git a/internal/openapi_clients/btp-accounts-service-api-go/swagger.json b/internal/openapi_clients/btp-accounts-service-api-go/swagger.json index a7ae289..e00f4bd 100644 --- a/internal/openapi_clients/btp-accounts-service-api-go/swagger.json +++ b/internal/openapi_clients/btp-accounts-service-api-go/swagger.json @@ -4685,7 +4685,6 @@ "displayName", "globalAccountGUID", "guid", - "parentFeatures", "parentGUID", "region", "state", @@ -5044,4 +5043,4 @@ "url": "https://accounts-service.cfapps.eu10.hana.ondemand.com" } ] -} \ No newline at end of file +} diff --git a/package/crds/oidc.orchestrate.cloud.sap_certbasedoidclogins.yaml b/package/crds/oidc.btp.sap.crossplane.io_certbasedoidclogins.yaml similarity index 99% rename from package/crds/oidc.orchestrate.cloud.sap_certbasedoidclogins.yaml rename to package/crds/oidc.btp.sap.crossplane.io_certbasedoidclogins.yaml index 59ee33c..917315d 100644 --- a/package/crds/oidc.orchestrate.cloud.sap_certbasedoidclogins.yaml +++ b/package/crds/oidc.btp.sap.crossplane.io_certbasedoidclogins.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: certbasedoidclogins.oidc.orchestrate.cloud.sap + name: certbasedoidclogins.oidc.btp.sap.crossplane.io spec: - group: oidc.orchestrate.cloud.sap + group: oidc.btp.sap.crossplane.io names: categories: - crossplane diff --git a/package/crds/oidc.orchestrate.cloud.sap_kubeconfiggenerators.yaml b/package/crds/oidc.btp.sap.crossplane.io_kubeconfiggenerators.yaml similarity index 99% rename from package/crds/oidc.orchestrate.cloud.sap_kubeconfiggenerators.yaml rename to package/crds/oidc.btp.sap.crossplane.io_kubeconfiggenerators.yaml index a6bc580..13d1f6e 100644 --- a/package/crds/oidc.orchestrate.cloud.sap_kubeconfiggenerators.yaml +++ b/package/crds/oidc.btp.sap.crossplane.io_kubeconfiggenerators.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: kubeconfiggenerators.oidc.orchestrate.cloud.sap + name: kubeconfiggenerators.oidc.btp.sap.crossplane.io spec: - group: oidc.orchestrate.cloud.sap + group: oidc.btp.sap.crossplane.io names: categories: - crossplane diff --git a/package/crossplane.yaml b/package/crossplane.yaml index d04e4b4..5c479d7 100644 --- a/package/crossplane.yaml +++ b/package/crossplane.yaml @@ -13,5 +13,5 @@ metadata: spec: controller: - image: DOCKER_REGISTRY/crossplane/provider-btp-controller-amd64:VERSION + image: DOCKER_REGISTRY/crossplane/provider-btp-controller:VERSION diff --git a/test/e2e/testdata/crs/SubaccountTrustConfiguration/subaccount.yaml b/test/e2e/testdata/crs/SubaccountTrustConfiguration/subaccount.yaml index 13063c9..75d291f 100644 --- a/test/e2e/testdata/crs/SubaccountTrustConfiguration/subaccount.yaml +++ b/test/e2e/testdata/crs/SubaccountTrustConfiguration/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sub-trust - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sub-trust-sub labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/cloudfoundry_env/cf-environment.yaml b/test/e2e/testdata/crs/cloudfoundry_env/cf-environment.yaml index f72d562..4246edf 100644 --- a/test/e2e/testdata/crs/cloudfoundry_env/cf-environment.yaml +++ b/test/e2e/testdata/crs/cloudfoundry_env/cf-environment.yaml @@ -8,7 +8,7 @@ spec: name: cf-env namespace: default forProvider: - landscape: cf-eu12 + landscape: cf-eu10 subaccountRef: name: cf-test-subaccount cloudManagementRef: diff --git a/test/e2e/testdata/crs/cloudfoundry_env/subaccount.yaml b/test/e2e/testdata/crs/cloudfoundry_env/subaccount.yaml index cc440b5..54de229 100644 --- a/test/e2e/testdata/crs/cloudfoundry_env/subaccount.yaml +++ b/test/e2e/testdata/crs/cloudfoundry_env/subaccount.yaml @@ -9,7 +9,7 @@ spec: labels: safe-to-delete: ["yes"] BUILD_ID: [ "$BUILD_ID" ] - region: eu12 + region: eu10 subdomain: $BUILD_ID-co-e2e-test-cf-case-3 subaccountAdmins: - $TECHNICAL_USER_EMAIL diff --git a/test/e2e/testdata/crs/cloudmanagement/create_flow/subaccount.yaml b/test/e2e/testdata/crs/cloudmanagement/create_flow/subaccount.yaml index 475a09b..47d36ca 100644 --- a/test/e2e/testdata/crs/cloudmanagement/create_flow/subaccount.yaml +++ b/test/e2e/testdata/crs/cloudmanagement/create_flow/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-cis - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-cis-sub labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/cloudmanagement/import/environment/subaccount.yaml b/test/e2e/testdata/crs/cloudmanagement/import/environment/subaccount.yaml index dcc9ea8..3de983b 100644 --- a/test/e2e/testdata/crs/cloudmanagement/import/environment/subaccount.yaml +++ b/test/e2e/testdata/crs/cloudmanagement/import/environment/subaccount.yaml @@ -8,7 +8,7 @@ spec: globalAccountRef: name: my-global-account displayName: $BUILD_ID-e2e-test-sa-cis-import - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-cis-sub-import labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/cloudmanagement/import_partial/environment/subaccount.yaml b/test/e2e/testdata/crs/cloudmanagement/import_partial/environment/subaccount.yaml index 25d9a71..08bda58 100644 --- a/test/e2e/testdata/crs/cloudmanagement/import_partial/environment/subaccount.yaml +++ b/test/e2e/testdata/crs/cloudmanagement/import_partial/environment/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-cis-import - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-cis-sub-partial-import labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/entitlement/subaccount.yaml b/test/e2e/testdata/crs/entitlement/subaccount.yaml index b2592c8..e9756a5 100644 --- a/test/e2e/testdata/crs/entitlement/subaccount.yaml +++ b/test/e2e/testdata/crs/entitlement/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-ent - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-ent-sub labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/entitlement_cf/subaccount.yaml b/test/e2e/testdata/crs/entitlement_cf/subaccount.yaml index 48290e3..174d2ff 100644 --- a/test/e2e/testdata/crs/entitlement_cf/subaccount.yaml +++ b/test/e2e/testdata/crs/entitlement_cf/subaccount.yaml @@ -8,7 +8,7 @@ spec: globalAccountRef: name: my-global-account displayName: $BUILD_ID-e2e-test-sa-ent-cf - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-ent-cf labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/kyma_env/subaccount.yaml b/test/e2e/testdata/crs/kyma_env/subaccount.yaml index e2735ee..5c7b0bc 100644 --- a/test/e2e/testdata/crs/kyma_env/subaccount.yaml +++ b/test/e2e/testdata/crs/kyma_env/subaccount.yaml @@ -9,7 +9,7 @@ spec: labels: safe-to-delete: ["yes"] BUILD_ID: [ "$BUILD_ID" ] - region: eu12 + region: eu10 subdomain: $BUILD_ID-co-e2e-test-kyma-case subaccountAdmins: - $TECHNICAL_USER_EMAIL diff --git a/test/e2e/testdata/crs/servicemanager/create_flow/subaccount.yaml b/test/e2e/testdata/crs/servicemanager/create_flow/subaccount.yaml index d061454..7f3381a 100644 --- a/test/e2e/testdata/crs/servicemanager/create_flow/subaccount.yaml +++ b/test/e2e/testdata/crs/servicemanager/create_flow/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-servicemanager - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-servicemanager-sub labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/subaccount/subaccount.yaml b/test/e2e/testdata/crs/subaccount/subaccount.yaml index c3ea23c..90cf6a1 100644 --- a/test/e2e/testdata/crs/subaccount/subaccount.yaml +++ b/test/e2e/testdata/crs/subaccount/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-co-12111 labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/subscription/create_flow/subaccount.yaml b/test/e2e/testdata/crs/subscription/create_flow/subaccount.yaml index 3d8ec91..0de046a 100644 --- a/test/e2e/testdata/crs/subscription/create_flow/subaccount.yaml +++ b/test/e2e/testdata/crs/subscription/create_flow/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-subscription - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-subscription-sub labels: safe-to-delete: [ "yes" ] diff --git a/test/e2e/testdata/crs/subscription/import/environment/subaccount.yaml b/test/e2e/testdata/crs/subscription/import/environment/subaccount.yaml index 8e70435..bea1a4d 100644 --- a/test/e2e/testdata/crs/subscription/import/environment/subaccount.yaml +++ b/test/e2e/testdata/crs/subscription/import/environment/subaccount.yaml @@ -6,7 +6,7 @@ metadata: spec: forProvider: displayName: $BUILD_ID-e2e-test-sa-import-subscription - region: eu12 + region: eu10 subdomain: $BUILD_ID-e2e-test-sa-import-subscription-sub labels: safe-to-delete: [ "yes" ]