From 229693d2ecd412f1736193bffde8e3347f7912b3 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 21 Mar 2024 06:08:44 +0000 Subject: [PATCH 1/2] [Automation] External Change --- eng/versioning/version_client.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 45ef90cd522d..887fd4eae9b2 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -294,7 +294,7 @@ com.azure.resourcemanager:azure-resourcemanager-kusto;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.1.0;1.2.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-healthbot;1.0.0-beta.2;1.0.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-netapp;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.10;1.0.0-beta.11 From ae346bdf0556779d82e5d9327b50f5b27794b8ab Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 21 Mar 2024 06:08:50 +0000 Subject: [PATCH 2/2] [Automation] Generate Fluent Lite from confluent#package-2024-02 --- .../CHANGELOG.md | 87 +- .../azure-resourcemanager-confluent/README.md | 4 +- .../azure-resourcemanager-confluent/SAMPLE.md | 496 +++- .../azure-resourcemanager-confluent/pom.xml | 6 +- .../confluent/ConfluentManager.java | 2 +- .../confluent/fluent/AccessClient.java | 122 +- .../fluent/ConfluentManagementClient.java | 2 +- .../confluent/fluent/OrganizationsClient.java | 357 ++- .../confluent/fluent/ValidationsClient.java | 8 +- ...AccessListClusterSuccessResponseInner.java | 8 +- ...sListEnvironmentsSuccessResponseInner.java | 14 +- ...sListRoleBindingsSuccessResponseInner.java | 8 +- ...leBindingNameListSuccessResponseInner.java | 111 + .../fluent/models/ApiKeyProperties.java | 88 + .../fluent/models/ApiKeyRecordInner.java | 146 ++ .../fluent/models/ClusterProperties.java | 118 + .../fluent/models/EnvironmentProperties.java | 58 + .../ListRegionsSuccessResponseInner.java | 59 + .../fluent/models/RegionProperties.java | 88 + .../fluent/models/SCClusterRecordInner.java | 196 ++ .../models/SCEnvironmentRecordInner.java | 148 ++ .../SchemaRegistryClusterProperties.java | 118 + .../SchemaRegistryClusterRecordInner.java | 170 ++ .../implementation/AccessClientImpl.java | 524 ++++- .../confluent/implementation/AccessImpl.java | 47 + ...oleBindingNameListSuccessResponseImpl.java | 48 + .../implementation/ApiKeyRecordImpl.java | 46 + .../ConfluentManagementClientBuilder.java | 4 +- .../ConfluentManagementClientImpl.java | 8 +- .../ListRegionsSuccessResponseImpl.java | 40 + .../MarketplaceAgreementsImpl.java | 6 +- .../OrganizationOperationsImpl.java | 4 +- .../OrganizationResourceImpl.java | 16 +- .../OrganizationsClientImpl.java | 2086 ++++++++++++++++- .../implementation/OrganizationsImpl.java | 226 +- .../{Utils.java => ResourceManagerUtils.java} | 4 +- .../implementation/SCClusterRecordImpl.java | 55 + .../SCEnvironmentRecordImpl.java | 45 + .../SchemaRegistryClusterRecordImpl.java | 51 + .../implementation/ValidationsClientImpl.java | 20 +- .../confluent/models/Access.java | 113 +- .../AccessCreateRoleBindingRequestModel.java | 108 + .../AccessListClusterSuccessResponse.java | 2 +- ...AccessListEnvironmentsSuccessResponse.java | 4 +- ...AccessListRoleBindingsSuccessResponse.java | 2 +- ...essRoleBindingNameListSuccessResponse.java | 42 + .../confluent/models/ApiKeyOwnerEntity.java | 132 ++ .../confluent/models/ApiKeyRecord.java | 47 + .../models/ApiKeyResourceEntity.java | 158 ++ .../confluent/models/ApiKeySpecEntity.java | 164 ++ .../confluent/models/ClusterRecord.java | 20 +- .../confluent/models/CreateApiKeyModel.java | 80 + .../confluent/models/EnvironmentRecord.java | 2 +- .../models/GetEnvironmentsResponse.java | 85 + .../models/ListClustersSuccessResponse.java | 85 + .../models/ListRegionsSuccessResponse.java | 27 + .../ListSchemaRegistryClustersResponse.java | 85 + .../models/OrganizationResource.java | 26 +- .../confluent/models/Organizations.java | 313 ++- .../confluent/models/RegionRecord.java | 145 ++ .../confluent/models/RegionSpecEntity.java | 133 ++ .../confluent/models/RoleBindingRecord.java | 8 +- .../confluent/models/SCClusterByokEntity.java | 106 + .../SCClusterNetworkEnvironmentEntity.java | 132 ++ .../confluent/models/SCClusterRecord.java | 61 + .../confluent/models/SCClusterSpecEntity.java | 352 +++ .../confluent/models/SCEnvironmentRecord.java | 47 + .../confluent/models/SCMetadataEntity.java | 158 ++ ...egistryClusterEnvironmentRegionEntity.java | 106 + .../models/SchemaRegistryClusterRecord.java | 54 + .../SchemaRegistryClusterSpecEntity.java | 190 ++ .../SchemaRegistryClusterStatusEntity.java | 54 + .../confluent/models/Validations.java | 8 +- .../src/main/java/module-info.java | 2 - .../reflect-config.json | 140 ++ .../AccessCreateRoleBindingSamples.java | 30 + .../AccessDeleteRoleBindingSamples.java | 25 + .../generated/AccessInviteUserSamples.java | 2 +- .../generated/AccessListClustersSamples.java | 2 +- .../AccessListEnvironmentsSamples.java | 2 +- .../AccessListInvitationsSamples.java | 2 +- .../AccessListRoleBindingNameListSamples.java | 43 + .../AccessListRoleBindingsSamples.java | 2 +- .../AccessListServiceAccountsSamples.java | 2 +- .../generated/AccessListUsersSamples.java | 2 +- .../MarketplaceAgreementsCreateSamples.java | 2 +- .../MarketplaceAgreementsListSamples.java | 2 +- .../OrganizationCreateApiKeySamples.java | 28 + .../generated/OrganizationCreateSamples.java | 2 +- ...rganizationDeleteClusterApiKeySamples.java | 24 + .../generated/OrganizationDeleteSamples.java | 2 +- ...OrganizationGetByResourceGroupSamples.java | 2 +- .../OrganizationGetClusterApiKeySamples.java | 24 + .../OrganizationGetClusterByIdSamples.java | 24 + ...OrganizationGetEnvironmentByIdSamples.java | 24 + ...onGetSchemaRegistryClusterByIdSamples.java | 25 + ...rganizationListByResourceGroupSamples.java | 2 +- .../OrganizationListClustersSamples.java | 25 + .../OrganizationListEnvironmentsSamples.java | 24 + .../OrganizationListRegionsSamples.java | 43 + .../generated/OrganizationListSamples.java | 2 +- ...tionListSchemaRegistryClustersSamples.java | 25 + .../OrganizationOperationsListSamples.java | 2 +- .../generated/OrganizationUpdateSamples.java | 2 +- ...alidationsValidateOrganizationSamples.java | 2 +- ...idationsValidateOrganizationV2Samples.java | 2 +- ...essCreateRoleBindingRequestModelTests.java | 31 + ...reateRoleBindingWithResponseMockTests.java | 69 + ...eleteRoleBindingWithResponseMockTests.java | 52 + ...AccessInviteUserWithResponseMockTests.java | 41 +- ...cessListClustersWithResponseMockTests.java | 80 +- ...ListEnvironmentsWithResponseMockTests.java | 35 +- ...sListInvitationsWithResponseMockTests.java | 44 +- ...eBindingNameListWithResponseMockTests.java | 81 + ...ListRoleBindingsWithResponseMockTests.java | 47 +- ...tServiceAccountsWithResponseMockTests.java | 37 +- .../AccessListUsersWithResponseMockTests.java | 41 +- ...dingNameListSuccessResponseInnerTests.java | 43 + .../generated/ApiKeyOwnerEntityTests.java | 33 + .../generated/ApiKeyResourceEntityTests.java | 35 + .../generated/ClusterPropertiesTests.java | 97 + .../generated/CreateApiKeyModelTests.java | 27 + .../generated/EnvironmentPropertiesTests.java | 37 + .../GetEnvironmentsResponseTests.java | 51 + .../ListClustersSuccessResponseTests.java | 140 ++ .../ListRegionsSuccessResponseInnerTests.java | 56 + ...stSchemaRegistryClustersResponseTests.java | 80 + ...AgreementsCreateWithResponseMockTests.java | 22 +- .../MarketplaceAgreementsListMockTests.java | 16 +- .../OrganizationOperationsListMockTests.java | 12 +- ...eteClusterApiKeyWithResponseMockTests.java | 52 + .../OrganizationsDeleteMockTests.java | 2 +- ...nsGetClusterByIdWithResponseMockTests.java | 85 + ...tEnvironmentByIdWithResponseMockTests.java | 64 + ...istryClusterByIdWithResponseMockTests.java | 74 + .../OrganizationsListClustersMockTests.java | 86 + ...rganizationsListEnvironmentsMockTests.java | 64 + ...tionsListRegionsWithResponseMockTests.java | 84 + ...nsListSchemaRegistryClustersMockTests.java | 74 + .../generated/RegionPropertiesTests.java | 49 + .../generated/RegionRecordTests.java | 53 + .../generated/RegionSpecEntityTests.java | 34 + .../generated/SCClusterByokEntityTests.java | 31 + ...CClusterNetworkEnvironmentEntityTests.java | 33 + .../generated/SCClusterRecordInnerTests.java | 105 + .../generated/SCClusterSpecEntityTests.java | 76 + .../SCEnvironmentRecordInnerTests.java | 43 + .../generated/SCMetadataEntityTests.java | 36 + ...ryClusterEnvironmentRegionEntityTests.java | 31 + .../SchemaRegistryClusterPropertiesTests.java | 70 + ...SchemaRegistryClusterRecordInnerTests.java | 76 + .../SchemaRegistryClusterSpecEntityTests.java | 51 + ...chemaRegistryClusterStatusEntityTests.java | 25 + 153 files changed, 11230 insertions(+), 510 deletions(-) create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessRoleBindingNameListSuccessResponseInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyProperties.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyRecordInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ClusterProperties.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/EnvironmentProperties.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ListRegionsSuccessResponseInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/RegionProperties.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCClusterRecordInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCEnvironmentRecordInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterProperties.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterRecordInner.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessRoleBindingNameListSuccessResponseImpl.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ApiKeyRecordImpl.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ListRegionsSuccessResponseImpl.java rename sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/{Utils.java => ResourceManagerUtils.java} (99%) create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCClusterRecordImpl.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCEnvironmentRecordImpl.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SchemaRegistryClusterRecordImpl.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessCreateRoleBindingRequestModel.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessRoleBindingNameListSuccessResponse.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyOwnerEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyRecord.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyResourceEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeySpecEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/CreateApiKeyModel.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/GetEnvironmentsResponse.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListClustersSuccessResponse.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListRegionsSuccessResponse.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListSchemaRegistryClustersResponse.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionRecord.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionSpecEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterByokEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterNetworkEnvironmentEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterRecord.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterSpecEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCEnvironmentRecord.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCMetadataEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterEnvironmentRegionEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterRecord.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterSpecEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterStatusEntity.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateApiKeySamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteClusterApiKeySamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterApiKeySamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterByIdSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetEnvironmentByIdSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetSchemaRegistryClusterByIdSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListClustersSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListEnvironmentsSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListRegionsSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSchemaRegistryClustersSamples.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingRequestModelTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessRoleBindingNameListSuccessResponseInnerTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyOwnerEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyResourceEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ClusterPropertiesTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/CreateApiKeyModelTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/EnvironmentPropertiesTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/GetEnvironmentsResponseTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListClustersSuccessResponseTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListRegionsSuccessResponseInnerTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListSchemaRegistryClustersResponseTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteClusterApiKeyWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetClusterByIdWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetEnvironmentByIdWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetSchemaRegistryClusterByIdWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListClustersMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListEnvironmentsMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListRegionsWithResponseMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListSchemaRegistryClustersMockTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionPropertiesTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionRecordTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionSpecEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterByokEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterNetworkEnvironmentEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterRecordInnerTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterSpecEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCEnvironmentRecordInnerTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCMetadataEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterEnvironmentRegionEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterPropertiesTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterRecordInnerTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterSpecEntityTests.java create mode 100644 sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterStatusEntityTests.java diff --git a/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md b/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md index d5ff86bfffb2..2d16089ea59c 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md +++ b/sdk/confluent/azure-resourcemanager-confluent/CHANGELOG.md @@ -1,14 +1,93 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2024-03-21) + +- Azure Resource Manager Confluent client library for Java. This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.SCMetadataEntity` was added + +* `models.ApiKeyResourceEntity` was added + +* `models.SchemaRegistryClusterRecord` was added + +* `models.ListSchemaRegistryClustersResponse` was added + +* `models.GetEnvironmentsResponse` was added + +* `models.ApiKeyRecord` was added + +* `models.AccessRoleBindingNameListSuccessResponse` was added + +* `models.SchemaRegistryClusterSpecEntity` was added + +* `models.ListRegionsSuccessResponse` was added + +* `models.SCEnvironmentRecord` was added + +* `models.RegionRecord` was added + +* `models.CreateApiKeyModel` was added + +* `models.SCClusterSpecEntity` was added + +* `models.RegionSpecEntity` was added -### Bugs Fixed +* `models.ListClustersSuccessResponse` was added + +* `models.SchemaRegistryClusterStatusEntity` was added + +* `models.SCClusterRecord` was added + +* `models.SCClusterByokEntity` was added + +* `models.SCClusterNetworkEnvironmentEntity` was added + +* `models.ApiKeyOwnerEntity` was added + +* `models.SchemaRegistryClusterEnvironmentRegionEntity` was added + +* `models.AccessCreateRoleBindingRequestModel` was added + +* `models.ApiKeySpecEntity` was added + +#### `models.Organizations` was modified + +* `listEnvironments(java.lang.String,java.lang.String)` was added +* `deleteClusterApiKeyWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `getClusterApiKey(java.lang.String,java.lang.String,java.lang.String)` was added +* `getSchemaRegistryClusterById(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added +* `listSchemaRegistryClusters(java.lang.String,java.lang.String,java.lang.String)` was added +* `getSchemaRegistryClusterByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listClusters(java.lang.String,java.lang.String,java.lang.String)` was added +* `deleteClusterApiKey(java.lang.String,java.lang.String,java.lang.String)` was added +* `createApiKey(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.CreateApiKeyModel)` was added +* `listEnvironments(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `getClusterByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `createApiKeyWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.CreateApiKeyModel,com.azure.core.util.Context)` was added +* `listRegions(java.lang.String,java.lang.String,models.ListAccessRequestModel)` was added +* `listSchemaRegistryClusters(java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `getClusterApiKeyWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listRegionsWithResponse(java.lang.String,java.lang.String,models.ListAccessRequestModel,com.azure.core.util.Context)` was added +* `getEnvironmentById(java.lang.String,java.lang.String,java.lang.String)` was added +* `getClusterById(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added +* `listClusters(java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `getEnvironmentByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Access` was modified + +* `createRoleBinding(java.lang.String,java.lang.String,models.AccessCreateRoleBindingRequestModel)` was added +* `listRoleBindingNameList(java.lang.String,java.lang.String,models.ListAccessRequestModel)` was added +* `listRoleBindingNameListWithResponse(java.lang.String,java.lang.String,models.ListAccessRequestModel,com.azure.core.util.Context)` was added +* `deleteRoleBinding(java.lang.String,java.lang.String,java.lang.String)` was added +* `createRoleBindingWithResponse(java.lang.String,java.lang.String,models.AccessCreateRoleBindingRequestModel,com.azure.core.util.Context)` was added +* `deleteRoleBindingWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.OrganizationResource` was modified -### Other Changes +* `listRegionsWithResponse(models.ListAccessRequestModel,com.azure.core.util.Context)` was added +* `listRegions(models.ListAccessRequestModel)` was added ## 1.0.0 (2023-11-16) diff --git a/sdk/confluent/azure-resourcemanager-confluent/README.md b/sdk/confluent/azure-resourcemanager-confluent/README.md index 6c0e2371f61d..3f402eccfcf1 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/README.md +++ b/sdk/confluent/azure-resourcemanager-confluent/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Confluent client library for Java. -This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2023-08-22. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-confluent - 1.0.0 + 1.1.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md b/sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md index 9b80dd14cff5..8874bf6c0efb 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md +++ b/sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md @@ -3,10 +3,13 @@ ## Access +- [CreateRoleBinding](#access_createrolebinding) +- [DeleteRoleBinding](#access_deleterolebinding) - [InviteUser](#access_inviteuser) - [ListClusters](#access_listclusters) - [ListEnvironments](#access_listenvironments) - [ListInvitations](#access_listinvitations) +- [ListRoleBindingNameList](#access_listrolebindingnamelist) - [ListRoleBindings](#access_listrolebindings) - [ListServiceAccounts](#access_listserviceaccounts) - [ListUsers](#access_listusers) @@ -19,10 +22,20 @@ ## Organization - [Create](#organization_create) +- [CreateApiKey](#organization_createapikey) - [Delete](#organization_delete) +- [DeleteClusterApiKey](#organization_deleteclusterapikey) - [GetByResourceGroup](#organization_getbyresourcegroup) +- [GetClusterApiKey](#organization_getclusterapikey) +- [GetClusterById](#organization_getclusterbyid) +- [GetEnvironmentById](#organization_getenvironmentbyid) +- [GetSchemaRegistryClusterById](#organization_getschemaregistryclusterbyid) - [List](#organization_list) - [ListByResourceGroup](#organization_listbyresourcegroup) +- [ListClusters](#organization_listclusters) +- [ListEnvironments](#organization_listenvironments) +- [ListRegions](#organization_listregions) +- [ListSchemaRegistryClusters](#organization_listschemaregistryclusters) - [Update](#organization_update) ## OrganizationOperations @@ -33,18 +46,72 @@ - [ValidateOrganization](#validations_validateorganization) - [ValidateOrganizationV2](#validations_validateorganizationv2) +### Access_CreateRoleBinding + +```java +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; + +/** + * Samples for Access CreateRoleBinding. + */ +public final class AccessCreateRoleBindingSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding. + * json + */ + /** + * Sample code: Access_CreateRoleBinding. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessCreateRoleBinding(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().createRoleBindingWithResponse("myResourceGroup", "myOrganization", + new AccessCreateRoleBindingRequestModel().withPrincipal("User:u-111aaa").withRoleName("CloudClusterAdmin") + .withCrnPattern( + "crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Access_DeleteRoleBinding + +```java +/** + * Samples for Access DeleteRoleBinding. + */ +public final class AccessDeleteRoleBindingSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding. + * json + */ + /** + * Sample code: Access_DeleteRoleBinding. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessDeleteRoleBinding(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().deleteRoleBindingWithResponse("myResourceGroup", "myOrganization", "dlz-f3a90de", + com.azure.core.util.Context.NONE); + } +} +``` + ### Access_InviteUser ```java -import com.azure.resourcemanager.confluent.models.AccessInvitedUserDetails; import com.azure.resourcemanager.confluent.models.AccessInviteUserAccountModel; +import com.azure.resourcemanager.confluent.models.AccessInvitedUserDetails; /** * Samples for Access InviteUser. */ public final class AccessInviteUserSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json */ /** * Sample code: Access_InviteUser. @@ -52,7 +119,10 @@ public final class AccessInviteUserSamples { * @param manager Entry point to ConfluentManager. */ public static void accessInviteUser(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().inviteUserWithResponse("myResourceGroup", "myOrganization", new AccessInviteUserAccountModel().withInvitedUserDetails(new AccessInvitedUserDetails().withInvitedEmail("user2@onmicrosoft.com").withAuthType("AUTH_TYPE_SSO")), com.azure.core.util.Context.NONE); + manager.access().inviteUserWithResponse("myResourceGroup", "myOrganization", + new AccessInviteUserAccountModel().withInvitedUserDetails( + new AccessInvitedUserDetails().withInvitedEmail("user2@onmicrosoft.com").withAuthType("AUTH_TYPE_SSO")), + com.azure.core.util.Context.NONE); } } ``` @@ -69,7 +139,8 @@ import java.util.Map; */ public final class AccessListClustersSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json */ /** * Sample code: Access_ClusterList. @@ -77,7 +148,10 @@ public final class AccessListClustersSamples { * @param manager Entry point to ConfluentManager. */ public static void accessClusterList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listClustersWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); + manager.access() + .listClustersWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel() + .withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -106,7 +180,9 @@ import java.util.Map; */ public final class AccessListEnvironmentsSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList. + * json */ /** * Sample code: Access_EnvironmentList. @@ -114,7 +190,10 @@ public final class AccessListEnvironmentsSamples { * @param manager Entry point to ConfluentManager. */ public static void accessEnvironmentList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listEnvironmentsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); + manager.access() + .listEnvironmentsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel() + .withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -143,7 +222,9 @@ import java.util.Map; */ public final class AccessListInvitationsSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList. + * json */ /** * Sample code: Access_InvitationsList. @@ -151,7 +232,52 @@ public final class AccessListInvitationsSamples { * @param manager Entry point to ConfluentManager. */ public static void accessInvitationsList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listInvitationsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder", "status", "INVITE_STATUS_SENT")), com.azure.core.util.Context.NONE); + manager.access().listInvitationsWithResponse("myResourceGroup", "myOrganization", + new ListAccessRequestModel().withSearchFilters( + mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder", "status", "INVITE_STATUS_SENT")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Access_ListRoleBindingNameList + +```java +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Access ListRoleBindingNameList. + */ +public final class AccessListRoleBindingNameListSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Access_RoleBindingNameList.json + */ + /** + * Sample code: Access_RoleBindingNameList. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessRoleBindingNameList(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().listRoleBindingNameListWithResponse("myResourceGroup", "myOrganization", + new ListAccessRequestModel().withSearchFilters(mapOf("crn_pattern", + "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", "namespace", + "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -180,7 +306,9 @@ import java.util.Map; */ public final class AccessListRoleBindingsSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList. + * json */ /** * Sample code: Access_RoleBindingList. @@ -188,7 +316,10 @@ public final class AccessListRoleBindingsSamples { * @param manager Entry point to ConfluentManager. */ public static void accessRoleBindingList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listRoleBindingsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); + manager.access() + .listRoleBindingsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel() + .withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -217,7 +348,8 @@ import java.util.Map; */ public final class AccessListServiceAccountsSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ServiceAccountsList.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Access_ServiceAccountsList.json */ /** * Sample code: Access_ServiceAccountsList. @@ -225,7 +357,10 @@ public final class AccessListServiceAccountsSamples { * @param manager Entry point to ConfluentManager. */ public static void accessServiceAccountsList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listServiceAccountsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); + manager.access() + .listServiceAccountsWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel() + .withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -254,7 +389,8 @@ import java.util.Map; */ public final class AccessListUsersSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json */ /** * Sample code: Access_UsersList. @@ -262,7 +398,9 @@ public final class AccessListUsersSamples { * @param manager Entry point to ConfluentManager. */ public static void accessUsersList(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.access().listUsersWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel().withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); + manager.access().listUsersWithResponse("myResourceGroup", "myOrganization", new ListAccessRequestModel() + .withSearchFilters(mapOf("pageSize", "10", "pageToken", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -282,14 +420,14 @@ public final class AccessListUsersSamples { ### MarketplaceAgreements_Create ```java -import com.azure.resourcemanager.confluent.fluent.models.ConfluentAgreementResourceInner; /** * Samples for MarketplaceAgreements Create. */ public final class MarketplaceAgreementsCreateSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_Create.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * MarketplaceAgreements_Create.json */ /** * Sample code: MarketplaceAgreements_Create. @@ -310,7 +448,8 @@ public final class MarketplaceAgreementsCreateSamples { */ public final class MarketplaceAgreementsListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/MarketplaceAgreements_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * MarketplaceAgreements_List.json */ /** * Sample code: MarketplaceAgreements_List. @@ -338,7 +477,8 @@ import java.util.Map; */ public final class OrganizationCreateSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json */ /** * Sample code: Organization_Create. @@ -346,7 +486,16 @@ public final class OrganizationCreateSamples { * @param manager Entry point to ConfluentManager. */ public static void organizationCreate(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.organizations().define("myOrganization").withRegion("West US").withExistingResourceGroup("myResourceGroup").withOfferDetail(new OfferDetail().withPublisherId("string").withId("string").withPlanId("string").withPlanName("string").withTermUnit("string").withPrivateOfferId("string").withPrivateOfferIds(Arrays.asList("string"))).withUserDetail(new UserDetail().withFirstName("string").withLastName("string").withEmailAddress("contoso@microsoft.com").withUserPrincipalName("contoso@microsoft.com").withAadEmail("contoso@microsoft.com")).withTags(mapOf("Environment", "Dev")).withLinkOrganization(new LinkOrganization().withToken("fakeTokenPlaceholder")).create(); + manager.organizations().define("myOrganization").withRegion("West US") + .withExistingResourceGroup("myResourceGroup") + .withOfferDetail( + new OfferDetail().withPublisherId("string").withId("string").withPlanId("string").withPlanName("string") + .withTermUnit("string").withPrivateOfferId("string").withPrivateOfferIds(Arrays.asList("string"))) + .withUserDetail(new UserDetail().withFirstName("string").withLastName("string") + .withEmailAddress("contoso@microsoft.com").withUserPrincipalName("contoso@microsoft.com") + .withAadEmail("contoso@microsoft.com")) + .withTags(mapOf("Environment", "Dev")) + .withLinkOrganization(new LinkOrganization().withToken("fakeTokenPlaceholder")).create(); } // Use "Map.of" if available @@ -363,6 +512,33 @@ public final class OrganizationCreateSamples { } ``` +### Organization_CreateApiKey + +```java +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; + +/** + * Samples for Organization CreateApiKey. + */ +public final class OrganizationCreateApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_CreateClusterAPIKey.json + */ + /** + * Sample code: Organization_CreateAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationCreateAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().createApiKeyWithResponse( + "myResourceGroup", "myOrganization", "env-12132", "clusterId-123", new CreateApiKeyModel() + .withName("CI kafka access key").withDescription("This API key provides kafka access to cluster x"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Organization_Delete ```java @@ -371,7 +547,8 @@ public final class OrganizationCreateSamples { */ public final class OrganizationDeleteSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json */ /** * Sample code: Confluent_Delete. @@ -384,6 +561,29 @@ public final class OrganizationDeleteSamples { } ``` +### Organization_DeleteClusterApiKey + +```java +/** + * Samples for Organization DeleteClusterApiKey. + */ +public final class OrganizationDeleteClusterApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_DeleteClusterAPIKey.json + */ + /** + * Sample code: Organization_DeleteClusterAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationDeleteClusterAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().deleteClusterApiKeyWithResponse("myResourceGroup", "myOrganization", "ZFZ6SZZZWGYBEIFB", + com.azure.core.util.Context.NONE); + } +} +``` + ### Organization_GetByResourceGroup ```java @@ -392,7 +592,8 @@ public final class OrganizationDeleteSamples { */ public final class OrganizationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json */ /** * Sample code: Organization_Get. @@ -400,7 +601,101 @@ public final class OrganizationGetByResourceGroupSamples { * @param manager Entry point to ConfluentManager. */ public static void organizationGet(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.organizations().getByResourceGroupWithResponse("myResourceGroup", "myOrganization", com.azure.core.util.Context.NONE); + manager.organizations().getByResourceGroupWithResponse("myResourceGroup", "myOrganization", + com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_GetClusterApiKey + +```java +/** + * Samples for Organization GetClusterApiKey. + */ +public final class OrganizationGetClusterApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetClusterAPIKey.json + */ + /** + * Sample code: Organization_GetClusterAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetClusterAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getClusterApiKeyWithResponse("myResourceGroup", "myOrganization", "apiKeyId-123", + com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_GetClusterById + +```java +/** + * Samples for Organization GetClusterById. + */ +public final class OrganizationGetClusterByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetClusterById.json + */ + /** + * Sample code: Organization_GetClusterById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetClusterById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getClusterByIdWithResponse("myResourceGroup", "myOrganization", "env-12132", + "dlz-f3a90de", com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_GetEnvironmentById + +```java +/** + * Samples for Organization GetEnvironmentById. + */ +public final class OrganizationGetEnvironmentByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetEnvironmentById.json + */ + /** + * Sample code: Organization_GetEnvironmentById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetEnvironmentById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getEnvironmentByIdWithResponse("myResourceGroup", "myOrganization", "dlz-f3a90de", + com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_GetSchemaRegistryClusterById + +```java +/** + * Samples for Organization GetSchemaRegistryClusterById. + */ +public final class OrganizationGetSchemaRegistryClusterByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetSchemaRegistryClusterById.json + */ + /** + * Sample code: Organization_GetSchemaRegistryClusterById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void + organizationGetSchemaRegistryClusterById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getSchemaRegistryClusterByIdWithResponse("myResourceGroup", "myOrganization", + "env-stgcczjp2j3", "lsrc-stgczkq22z", com.azure.core.util.Context.NONE); } } ``` @@ -413,7 +708,8 @@ public final class OrganizationGetByResourceGroupSamples { */ public final class OrganizationListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListBySubscription.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_ListBySubscription.json */ /** * Sample code: Organization_ListBySubscription. @@ -434,7 +730,8 @@ public final class OrganizationListSamples { */ public final class OrganizationListByResourceGroupSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_ListByResourceGroup.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_ListByResourceGroup.json */ /** * Sample code: Organization_ListByResourceGroup. @@ -447,6 +744,119 @@ public final class OrganizationListByResourceGroupSamples { } ``` +### Organization_ListClusters + +```java +/** + * Samples for Organization ListClusters. + */ +public final class OrganizationListClustersSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList. + * json + */ + /** + * Sample code: Organization_ListClusters. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListClusters(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listClusters("myResourceGroup", "myOrganization", "env-12132", 10, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_ListEnvironments + +```java +/** + * Samples for Organization ListEnvironments. + */ +public final class OrganizationListEnvironmentsSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_EnvironmentList.json + */ + /** + * Sample code: Organization_ListEnvironments. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListEnvironments(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listEnvironments("myResourceGroup", "myOrganization", 10, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Organization_ListRegions + +```java +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Organization ListRegions. + */ +public final class OrganizationListRegionsSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions. + * json + */ + /** + * Sample code: Organization_ListRegions. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListRegions(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listRegionsWithResponse("myResourceGroup", "myOrganization", + new ListAccessRequestModel() + .withSearchFilters(mapOf("cloud", "azure", "packages", "ADVANCED,ESSENTIALS", "region", "eastus")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Organization_ListSchemaRegistryClusters + +```java +/** + * Samples for Organization ListSchemaRegistryClusters. + */ +public final class OrganizationListSchemaRegistryClustersSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_ListSchemaRegistryClusters.json + */ + /** + * Sample code: Organization_ListSchemaRegistryClusters. + * + * @param manager Entry point to ConfluentManager. + */ + public static void + organizationListSchemaRegistryClusters(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listSchemaRegistryClusters("myResourceGroup", "myOrganization", "env-stgcczjp2j3", null, + null, com.azure.core.util.Context.NONE); + } +} +``` + ### Organization_Update ```java @@ -459,7 +869,8 @@ import java.util.Map; */ public final class OrganizationUpdateSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json */ /** * Sample code: Confluent_Update. @@ -467,7 +878,9 @@ public final class OrganizationUpdateSamples { * @param manager Entry point to ConfluentManager. */ public static void confluentUpdate(com.azure.resourcemanager.confluent.ConfluentManager manager) { - OrganizationResource resource = manager.organizations().getByResourceGroupWithResponse("myResourceGroup", "myOrganization", com.azure.core.util.Context.NONE).getValue(); + OrganizationResource resource = manager.organizations() + .getByResourceGroupWithResponse("myResourceGroup", "myOrganization", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("client", "dev-client", "env", "dev")).apply(); } @@ -493,7 +906,8 @@ public final class OrganizationUpdateSamples { */ public final class OrganizationOperationsListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/OrganizationOperations_List.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * OrganizationOperations_List.json */ /** * Sample code: OrganizationOperations_List. @@ -521,7 +935,8 @@ import java.util.Map; */ public final class ValidationsValidateOrganizationSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizations.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Validations_ValidateOrganizations.json */ /** * Sample code: Validations_ValidateOrganizations. @@ -529,7 +944,15 @@ public final class ValidationsValidateOrganizationSamples { * @param manager Entry point to ConfluentManager. */ public static void validationsValidateOrganizations(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.validations().validateOrganizationWithResponse("myResourceGroup", "myOrganization", new OrganizationResourceInner().withLocation("West US").withTags(mapOf("Environment", "Dev")).withOfferDetail(new OfferDetail().withPublisherId("string").withId("string").withPlanId("string").withPlanName("string").withTermUnit("string").withPrivateOfferId("string").withPrivateOfferIds(Arrays.asList("string"))).withUserDetail(new UserDetail().withFirstName("string").withLastName("string").withEmailAddress("abc@microsoft.com").withUserPrincipalName("abc@microsoft.com").withAadEmail("abc@microsoft.com")), com.azure.core.util.Context.NONE); + manager.validations().validateOrganizationWithResponse("myResourceGroup", "myOrganization", + new OrganizationResourceInner().withLocation("West US").withTags(mapOf("Environment", "Dev")) + .withOfferDetail(new OfferDetail().withPublisherId("string").withId("string").withPlanId("string") + .withPlanName("string").withTermUnit("string").withPrivateOfferId("string") + .withPrivateOfferIds(Arrays.asList("string"))) + .withUserDetail(new UserDetail().withFirstName("string").withLastName("string") + .withEmailAddress("abc@microsoft.com").withUserPrincipalName("abc@microsoft.com") + .withAadEmail("abc@microsoft.com")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -561,7 +984,8 @@ import java.util.Map; */ public final class ValidationsValidateOrganizationV2Samples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Validations_ValidateOrganizationsV2.json + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Validations_ValidateOrganizationsV2.json */ /** * Sample code: Validations_ValidateOrganizations. @@ -569,7 +993,15 @@ public final class ValidationsValidateOrganizationV2Samples { * @param manager Entry point to ConfluentManager. */ public static void validationsValidateOrganizations(com.azure.resourcemanager.confluent.ConfluentManager manager) { - manager.validations().validateOrganizationV2WithResponse("myResourceGroup", "myOrganization", new OrganizationResourceInner().withLocation("West US").withTags(mapOf("Environment", "Dev")).withOfferDetail(new OfferDetail().withPublisherId("string").withId("string").withPlanId("string").withPlanName("string").withTermUnit("string").withPrivateOfferId("string").withPrivateOfferIds(Arrays.asList("string"))).withUserDetail(new UserDetail().withFirstName("string").withLastName("string").withEmailAddress("abc@microsoft.com").withUserPrincipalName("abc@microsoft.com").withAadEmail("abc@microsoft.com")), com.azure.core.util.Context.NONE); + manager.validations().validateOrganizationV2WithResponse("myResourceGroup", "myOrganization", + new OrganizationResourceInner().withLocation("West US").withTags(mapOf("Environment", "Dev")) + .withOfferDetail(new OfferDetail().withPublisherId("string").withId("string").withPlanId("string") + .withPlanName("string").withTermUnit("string").withPrivateOfferId("string") + .withPrivateOfferIds(Arrays.asList("string"))) + .withUserDetail(new UserDetail().withFirstName("string").withLastName("string") + .withEmailAddress("abc@microsoft.com").withUserPrincipalName("abc@microsoft.com") + .withAadEmail("abc@microsoft.com")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/pom.xml b/sdk/confluent/azure-resourcemanager-confluent/pom.xml index 85263e02978f..ab6b35a4c326 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/pom.xml +++ b/sdk/confluent/azure-resourcemanager-confluent/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-confluent - 1.1.0-beta.1 + 1.1.0 jar Microsoft Azure SDK for Confluent Management - This package contains Microsoft Azure SDK for Confluent Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-08-22. + This package contains Microsoft Azure SDK for Confluent Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-02. https://github.com/Azure/azure-sdk-for-java @@ -87,8 +87,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java index b102da150f6b..6a010e94095e 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/ConfluentManager.java @@ -215,7 +215,7 @@ public ConfluentManager authenticate(TokenCredential credential, AzureProfile pr StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.confluent").append("/") - .append("1.0.0"); + .append("1.1.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/AccessClient.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/AccessClient.java index 07dca16d422b..4831093cfb5c 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/AccessClient.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/AccessClient.java @@ -14,9 +14,12 @@ import com.azure.resourcemanager.confluent.fluent.models.AccessListRoleBindingsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListServiceAccountsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListUsersSuccessResponseInner; +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.InvitationRecordInner; +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; import com.azure.resourcemanager.confluent.models.AccessInviteUserAccountModel; import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.RoleBindingRecord; /** * An instance of this class provides access to all the operations defined in AccessClient. @@ -25,7 +28,7 @@ public interface AccessClient { /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -41,7 +44,7 @@ Response listUsersWithResponse(String resou /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +59,7 @@ AccessListUsersSuccessResponseInner listUsers(String resourceGroupName, String o /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -72,7 +75,7 @@ Response listServiceAccountsWithR /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +90,7 @@ AccessListServiceAccountsSuccessResponseInner listServiceAccounts(String resourc /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -103,7 +106,7 @@ Response listInvitationsWithResponse( /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,7 +121,7 @@ AccessListInvitationsSuccessResponseInner listInvitations(String resourceGroupNa /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @param context The context to associate with this operation. @@ -134,7 +137,7 @@ Response inviteUserWithResponse(String resourceGroupName, /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +159,7 @@ InvitationRecordInner inviteUser(String resourceGroupName, String organizationNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response along with {@link Response}. + * @return details of the environments returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listEnvironmentsWithResponse(String resourceGroupName, @@ -171,7 +174,7 @@ Response listEnvironmentsWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response. + * @return details of the environments returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessListEnvironmentsSuccessResponseInner listEnvironments(String resourceGroupName, String organizationName, @@ -187,7 +190,7 @@ AccessListEnvironmentsSuccessResponseInner listEnvironments(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the clusters returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listClustersWithResponse(String resourceGroupName, @@ -202,7 +205,7 @@ Response listClustersWithResponse(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the clusters returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessListClusterSuccessResponseInner listClusters(String resourceGroupName, String organizationName, @@ -218,7 +221,7 @@ AccessListClusterSuccessResponseInner listClusters(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the role bindings returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listRoleBindingsWithResponse(String resourceGroupName, @@ -233,9 +236,100 @@ Response listRoleBindingsWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the role bindings returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessListRoleBindingsSuccessResponseInner listRoleBindings(String resourceGroupName, String organizationName, ListAccessRequestModel body); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createRoleBindingWithResponse(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RoleBindingRecord createRoleBinding(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteRoleBindingWithResponse(String resourceGroupName, String organizationName, + String roleBindingId, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteRoleBinding(String resourceGroupName, String organizationName, String roleBindingId); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listRoleBindingNameListWithResponse( + String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessRoleBindingNameListSuccessResponseInner listRoleBindingNameList(String resourceGroupName, + String organizationName, ListAccessRequestModel body); } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ConfluentManagementClient.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ConfluentManagementClient.java index 91e383651b98..9af539dd74ab 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ConfluentManagementClient.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ConfluentManagementClient.java @@ -12,7 +12,7 @@ */ public interface ConfluentManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Microsoft Azure subscription id. * * @return the subscriptionId value. */ diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/OrganizationsClient.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/OrganizationsClient.java index 72560d3ef97d..3d1c075f494a 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/OrganizationsClient.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/OrganizationsClient.java @@ -11,7 +11,14 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; import com.azure.resourcemanager.confluent.models.OrganizationResourceUpdate; /** @@ -43,7 +50,7 @@ public interface OrganizationsClient { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -55,7 +62,7 @@ public interface OrganizationsClient { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -68,7 +75,7 @@ public interface OrganizationsClient { /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,7 +90,7 @@ Response getByResourceGroupWithResponse(String resour /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -96,7 +103,7 @@ Response getByResourceGroupWithResponse(String resour /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -110,7 +117,7 @@ SyncPoller, OrganizationResourceInner> beg /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -126,7 +133,7 @@ SyncPoller, OrganizationResourceInner> beg /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,7 +146,7 @@ SyncPoller, OrganizationResourceInner> beg /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -155,7 +162,7 @@ OrganizationResourceInner create(String resourceGroupName, String organizationNa /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Updated Organization resource. * @param context The context to associate with this operation. @@ -171,7 +178,7 @@ Response updateWithResponse(String resourceGroupName, /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,7 +191,7 @@ Response updateWithResponse(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -197,7 +204,7 @@ Response updateWithResponse(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,7 +218,7 @@ Response updateWithResponse(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -223,7 +230,7 @@ Response updateWithResponse(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -232,4 +239,326 @@ Response updateWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String organizationName, Context context); + + /** + * Lists of all the environments in a organization. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listEnvironments(String resourceGroupName, String organizationName); + + /** + * Lists of all the environments in a organization. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listEnvironments(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken, Context context); + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getEnvironmentByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, Context context); + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SCEnvironmentRecordInner getEnvironmentById(String resourceGroupName, String organizationName, + String environmentId); + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId); + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId, Integer pageSize, String pageToken, Context context); + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId); + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listRegionsWithResponse(String resourceGroupName, String organizationName, + ListAccessRequestModel body, Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListRegionsSuccessResponseInner listRegions(String resourceGroupName, String organizationName, + ListAccessRequestModel body); + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createApiKeyWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, CreateApiKeyModel body, Context context); + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKeyRecordInner createApiKey(String resourceGroupName, String organizationName, String environmentId, + String clusterId, CreateApiKeyModel body); + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteClusterApiKeyWithResponse(String resourceGroupName, String organizationName, String apiKeyId, + Context context); + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId); + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context); + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKeyRecordInner getClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId); + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSchemaRegistryClusterByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, String clusterId, Context context); + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SchemaRegistryClusterRecordInner getSchemaRegistryClusterById(String resourceGroupName, String organizationName, + String environmentId, String clusterId); + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getClusterByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, Context context); + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SCClusterRecordInner getClusterById(String resourceGroupName, String organizationName, String environmentId, + String clusterId); } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ValidationsClient.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ValidationsClient.java index c777fc43838d..b73562bbd383 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ValidationsClient.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/ValidationsClient.java @@ -18,7 +18,7 @@ public interface ValidationsClient { /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -34,7 +34,7 @@ Response validateOrganizationWithResponse(String reso /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +49,7 @@ OrganizationResourceInner validateOrganization(String resourceGroupName, String /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -65,7 +65,7 @@ Response validateOrganizationV2WithResponse(String reso /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListClusterSuccessResponseInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListClusterSuccessResponseInner.java index 02c3cb93804f..e1710c526fff 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListClusterSuccessResponseInner.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListClusterSuccessResponseInner.java @@ -11,7 +11,7 @@ import java.util.List; /** - * List cluster success response. + * Details of the clusters returned on successful response. */ @Fluent public final class AccessListClusterSuccessResponseInner { @@ -28,7 +28,7 @@ public final class AccessListClusterSuccessResponseInner { private ConfluentListMetadata metadata; /* - * Data of the environments list + * List of clusters */ @JsonProperty(value = "data") private List data; @@ -80,7 +80,7 @@ public AccessListClusterSuccessResponseInner withMetadata(ConfluentListMetadata } /** - * Get the data property: Data of the environments list. + * Get the data property: List of clusters. * * @return the data value. */ @@ -89,7 +89,7 @@ public List data() { } /** - * Set the data property: Data of the environments list. + * Set the data property: List of clusters. * * @param data the data value to set. * @return the AccessListClusterSuccessResponseInner object itself. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListEnvironmentsSuccessResponseInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListEnvironmentsSuccessResponseInner.java index e363d104bf87..1770543beb35 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListEnvironmentsSuccessResponseInner.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListEnvironmentsSuccessResponseInner.java @@ -11,7 +11,7 @@ import java.util.List; /** - * List environments success response. + * Details of the environments returned on successful response. */ @Fluent public final class AccessListEnvironmentsSuccessResponseInner { @@ -22,13 +22,13 @@ public final class AccessListEnvironmentsSuccessResponseInner { private String kind; /* - * Metadata of the list + * Metadata of the environment list */ @JsonProperty(value = "metadata") private ConfluentListMetadata metadata; /* - * Data of the environments list + * Environment list data */ @JsonProperty(value = "data") private List data; @@ -60,7 +60,7 @@ public AccessListEnvironmentsSuccessResponseInner withKind(String kind) { } /** - * Get the metadata property: Metadata of the list. + * Get the metadata property: Metadata of the environment list. * * @return the metadata value. */ @@ -69,7 +69,7 @@ public ConfluentListMetadata metadata() { } /** - * Set the metadata property: Metadata of the list. + * Set the metadata property: Metadata of the environment list. * * @param metadata the metadata value to set. * @return the AccessListEnvironmentsSuccessResponseInner object itself. @@ -80,7 +80,7 @@ public AccessListEnvironmentsSuccessResponseInner withMetadata(ConfluentListMeta } /** - * Get the data property: Data of the environments list. + * Get the data property: Environment list data. * * @return the data value. */ @@ -89,7 +89,7 @@ public List data() { } /** - * Set the data property: Data of the environments list. + * Set the data property: Environment list data. * * @param data the data value to set. * @return the AccessListEnvironmentsSuccessResponseInner object itself. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListRoleBindingsSuccessResponseInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListRoleBindingsSuccessResponseInner.java index 2d564001f1e3..09552c145877 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListRoleBindingsSuccessResponseInner.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessListRoleBindingsSuccessResponseInner.java @@ -11,7 +11,7 @@ import java.util.List; /** - * List cluster success response. + * Details of the role bindings returned on successful response. */ @Fluent public final class AccessListRoleBindingsSuccessResponseInner { @@ -28,7 +28,7 @@ public final class AccessListRoleBindingsSuccessResponseInner { private ConfluentListMetadata metadata; /* - * Data of the environments list + * List of role binding */ @JsonProperty(value = "data") private List data; @@ -80,7 +80,7 @@ public AccessListRoleBindingsSuccessResponseInner withMetadata(ConfluentListMeta } /** - * Get the data property: Data of the environments list. + * Get the data property: List of role binding. * * @return the data value. */ @@ -89,7 +89,7 @@ public List data() { } /** - * Set the data property: Data of the environments list. + * Set the data property: List of role binding. * * @param data the data value to set. * @return the AccessListRoleBindingsSuccessResponseInner object itself. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessRoleBindingNameListSuccessResponseInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessRoleBindingNameListSuccessResponseInner.java new file mode 100644 index 000000000000..2df5ff42b04d --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/AccessRoleBindingNameListSuccessResponseInner.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.ConfluentListMetadata; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Details of the role binding names returned on successful response. + */ +@Fluent +public final class AccessRoleBindingNameListSuccessResponseInner { + /* + * Type of response + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Metadata of the list + */ + @JsonProperty(value = "metadata") + private ConfluentListMetadata metadata; + + /* + * List of role binding names + */ + @JsonProperty(value = "data") + private List data; + + /** + * Creates an instance of AccessRoleBindingNameListSuccessResponseInner class. + */ + public AccessRoleBindingNameListSuccessResponseInner() { + } + + /** + * Get the kind property: Type of response. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of response. + * + * @param kind the kind value to set. + * @return the AccessRoleBindingNameListSuccessResponseInner object itself. + */ + public AccessRoleBindingNameListSuccessResponseInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the metadata property: Metadata of the list. + * + * @return the metadata value. + */ + public ConfluentListMetadata metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the list. + * + * @param metadata the metadata value to set. + * @return the AccessRoleBindingNameListSuccessResponseInner object itself. + */ + public AccessRoleBindingNameListSuccessResponseInner withMetadata(ConfluentListMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the data property: List of role binding names. + * + * @return the data value. + */ + public List data() { + return this.data; + } + + /** + * Set the data property: List of role binding names. + * + * @param data the data value to set. + * @return the AccessRoleBindingNameListSuccessResponseInner object itself. + */ + public AccessRoleBindingNameListSuccessResponseInner withData(List data) { + this.data = data; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyProperties.java new file mode 100644 index 000000000000..de26f7cf7a09 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.ApiKeySpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * API Key Properties. + */ +@Fluent +public final class ApiKeyProperties { + /* + * Metadata of the record + */ + @JsonProperty(value = "metadata") + private SCMetadataEntity metadata; + + /* + * Specification of the API Key + */ + @JsonProperty(value = "spec") + private ApiKeySpecEntity spec; + + /** + * Creates an instance of ApiKeyProperties class. + */ + public ApiKeyProperties() { + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the ApiKeyProperties object itself. + */ + public ApiKeyProperties withMetadata(SCMetadataEntity metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the spec property: Specification of the API Key. + * + * @return the spec value. + */ + public ApiKeySpecEntity spec() { + return this.spec; + } + + /** + * Set the spec property: Specification of the API Key. + * + * @param spec the spec value to set. + * @return the ApiKeyProperties object itself. + */ + public ApiKeyProperties withSpec(ApiKeySpecEntity spec) { + this.spec = spec; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + if (spec() != null) { + spec().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyRecordInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyRecordInner.java new file mode 100644 index 000000000000..60be809eb525 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ApiKeyRecordInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.ApiKeySpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details API key. + */ +@Fluent +public final class ApiKeyRecordInner { + /* + * Type of api key + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Id of the api key + */ + @JsonProperty(value = "id") + private String id; + + /* + * API Key Properties + */ + @JsonProperty(value = "properties") + private ApiKeyProperties innerProperties; + + /** + * Creates an instance of ApiKeyRecordInner class. + */ + public ApiKeyRecordInner() { + } + + /** + * Get the kind property: Type of api key. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of api key. + * + * @param kind the kind value to set. + * @return the ApiKeyRecordInner object itself. + */ + public ApiKeyRecordInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the id property: Id of the api key. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the api key. + * + * @param id the id value to set. + * @return the ApiKeyRecordInner object itself. + */ + public ApiKeyRecordInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the innerProperties property: API Key Properties. + * + * @return the innerProperties value. + */ + private ApiKeyProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the ApiKeyRecordInner object itself. + */ + public ApiKeyRecordInner withMetadata(SCMetadataEntity metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKeyProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the spec property: Specification of the API Key. + * + * @return the spec value. + */ + public ApiKeySpecEntity spec() { + return this.innerProperties() == null ? null : this.innerProperties().spec(); + } + + /** + * Set the spec property: Specification of the API Key. + * + * @param spec the spec value to set. + * @return the ApiKeyRecordInner object itself. + */ + public ApiKeyRecordInner withSpec(ApiKeySpecEntity spec) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKeyProperties(); + } + this.innerProperties().withSpec(spec); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ClusterProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ClusterProperties.java new file mode 100644 index 000000000000..0e00dcebe513 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ClusterProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster Properties. + */ +@Fluent +public final class ClusterProperties { + /* + * Metadata of the record + */ + @JsonProperty(value = "metadata") + private SCMetadataEntity metadata; + + /* + * Specification of the cluster + */ + @JsonProperty(value = "spec") + private SCClusterSpecEntity spec; + + /* + * Specification of the cluster status + */ + @JsonProperty(value = "status") + private ClusterStatusEntity status; + + /** + * Creates an instance of ClusterProperties class. + */ + public ClusterProperties() { + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withMetadata(SCMetadataEntity metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the spec property: Specification of the cluster. + * + * @return the spec value. + */ + public SCClusterSpecEntity spec() { + return this.spec; + } + + /** + * Set the spec property: Specification of the cluster. + * + * @param spec the spec value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withSpec(SCClusterSpecEntity spec) { + this.spec = spec; + return this; + } + + /** + * Get the status property: Specification of the cluster status. + * + * @return the status value. + */ + public ClusterStatusEntity status() { + return this.status; + } + + /** + * Set the status property: Specification of the cluster status. + * + * @param status the status value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withStatus(ClusterStatusEntity status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + if (spec() != null) { + spec().validate(); + } + if (status() != null) { + status().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/EnvironmentProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/EnvironmentProperties.java new file mode 100644 index 000000000000..a9eab745ada8 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/EnvironmentProperties.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Environment resource property. + */ +@Fluent +public final class EnvironmentProperties { + /* + * Metadata of the record + */ + @JsonProperty(value = "metadata") + private SCMetadataEntity metadata; + + /** + * Creates an instance of EnvironmentProperties class. + */ + public EnvironmentProperties() { + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the EnvironmentProperties object itself. + */ + public EnvironmentProperties withMetadata(SCMetadataEntity metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ListRegionsSuccessResponseInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ListRegionsSuccessResponseInner.java new file mode 100644 index 000000000000..07372836b95b --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/ListRegionsSuccessResponseInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.RegionRecord; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of POST request to list regions supported by confluent. + */ +@Fluent +public final class ListRegionsSuccessResponseInner { + /* + * List of regions supported by confluent + */ + @JsonProperty(value = "data") + private List data; + + /** + * Creates an instance of ListRegionsSuccessResponseInner class. + */ + public ListRegionsSuccessResponseInner() { + } + + /** + * Get the data property: List of regions supported by confluent. + * + * @return the data value. + */ + public List data() { + return this.data; + } + + /** + * Set the data property: List of regions supported by confluent. + * + * @param data the data value to set. + * @return the ListRegionsSuccessResponseInner object itself. + */ + public ListRegionsSuccessResponseInner withData(List data) { + this.data = data; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (data() != null) { + data().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/RegionProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/RegionProperties.java new file mode 100644 index 000000000000..29a777d62833 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/RegionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.RegionSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Region Properties. + */ +@Fluent +public final class RegionProperties { + /* + * Metadata of the record + */ + @JsonProperty(value = "metadata") + private SCMetadataEntity metadata; + + /* + * Specification of the region + */ + @JsonProperty(value = "spec") + private RegionSpecEntity spec; + + /** + * Creates an instance of RegionProperties class. + */ + public RegionProperties() { + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the RegionProperties object itself. + */ + public RegionProperties withMetadata(SCMetadataEntity metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the spec property: Specification of the region. + * + * @return the spec value. + */ + public RegionSpecEntity spec() { + return this.spec; + } + + /** + * Set the spec property: Specification of the region. + * + * @param spec the spec value to set. + * @return the RegionProperties object itself. + */ + public RegionProperties withSpec(RegionSpecEntity spec) { + this.spec = spec; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + if (spec() != null) { + spec().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCClusterRecordInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCClusterRecordInner.java new file mode 100644 index 000000000000..64a66966c358 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCClusterRecordInner.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of cluster record. + */ +@Fluent +public final class SCClusterRecordInner { + /* + * Type of cluster + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Id of the cluster + */ + @JsonProperty(value = "id") + private String id; + + /* + * Cluster Properties + */ + @JsonProperty(value = "properties") + private ClusterProperties innerProperties; + + /* + * Display name of the cluster + */ + @JsonProperty(value = "name") + private String name; + + /** + * Creates an instance of SCClusterRecordInner class. + */ + public SCClusterRecordInner() { + } + + /** + * Get the kind property: Type of cluster. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of cluster. + * + * @param kind the kind value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the id property: Id of the cluster. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the cluster. + * + * @param id the id value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the innerProperties property: Cluster Properties. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the name property: Display name of the cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Display name of the cluster. + * + * @param name the name value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withMetadata(SCMetadataEntity metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the spec property: Specification of the cluster. + * + * @return the spec value. + */ + public SCClusterSpecEntity spec() { + return this.innerProperties() == null ? null : this.innerProperties().spec(); + } + + /** + * Set the spec property: Specification of the cluster. + * + * @param spec the spec value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withSpec(SCClusterSpecEntity spec) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withSpec(spec); + return this; + } + + /** + * Get the status property: Specification of the cluster status. + * + * @return the status value. + */ + public ClusterStatusEntity status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Specification of the cluster status. + * + * @param status the status value to set. + * @return the SCClusterRecordInner object itself. + */ + public SCClusterRecordInner withStatus(ClusterStatusEntity status) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCEnvironmentRecordInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCEnvironmentRecordInner.java new file mode 100644 index 000000000000..3677b3958a0f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SCEnvironmentRecordInner.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details about environment name, metadata and environment id of an environment. + */ +@Fluent +public final class SCEnvironmentRecordInner { + /* + * Type of environment + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Id of the environment + */ + @JsonProperty(value = "id") + private String id; + + /* + * Environment properties + */ + @JsonProperty(value = "properties") + private EnvironmentProperties innerProperties; + + /* + * Display name of the environment + */ + @JsonProperty(value = "name") + private String name; + + /** + * Creates an instance of SCEnvironmentRecordInner class. + */ + public SCEnvironmentRecordInner() { + } + + /** + * Get the kind property: Type of environment. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of environment. + * + * @param kind the kind value to set. + * @return the SCEnvironmentRecordInner object itself. + */ + public SCEnvironmentRecordInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the id property: Id of the environment. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the environment. + * + * @param id the id value to set. + * @return the SCEnvironmentRecordInner object itself. + */ + public SCEnvironmentRecordInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the innerProperties property: Environment properties. + * + * @return the innerProperties value. + */ + private EnvironmentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the name property: Display name of the environment. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Display name of the environment. + * + * @param name the name value to set. + * @return the SCEnvironmentRecordInner object itself. + */ + public SCEnvironmentRecordInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the SCEnvironmentRecordInner object itself. + */ + public SCEnvironmentRecordInner withMetadata(SCMetadataEntity metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new EnvironmentProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterProperties.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterProperties.java new file mode 100644 index 000000000000..fec259686dba --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema Registry Cluster Properties. + */ +@Fluent +public final class SchemaRegistryClusterProperties { + /* + * Metadata of the record + */ + @JsonProperty(value = "metadata") + private SCMetadataEntity metadata; + + /* + * Specification of the schema registry cluster + */ + @JsonProperty(value = "spec") + private SchemaRegistryClusterSpecEntity spec; + + /* + * Specification of the cluster status + */ + @JsonProperty(value = "status") + private SchemaRegistryClusterStatusEntity status; + + /** + * Creates an instance of SchemaRegistryClusterProperties class. + */ + public SchemaRegistryClusterProperties() { + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the SchemaRegistryClusterProperties object itself. + */ + public SchemaRegistryClusterProperties withMetadata(SCMetadataEntity metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the spec property: Specification of the schema registry cluster. + * + * @return the spec value. + */ + public SchemaRegistryClusterSpecEntity spec() { + return this.spec; + } + + /** + * Set the spec property: Specification of the schema registry cluster. + * + * @param spec the spec value to set. + * @return the SchemaRegistryClusterProperties object itself. + */ + public SchemaRegistryClusterProperties withSpec(SchemaRegistryClusterSpecEntity spec) { + this.spec = spec; + return this; + } + + /** + * Get the status property: Specification of the cluster status. + * + * @return the status value. + */ + public SchemaRegistryClusterStatusEntity status() { + return this.status; + } + + /** + * Set the status property: Specification of the cluster status. + * + * @param status the status value to set. + * @return the SchemaRegistryClusterProperties object itself. + */ + public SchemaRegistryClusterProperties withStatus(SchemaRegistryClusterStatusEntity status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + if (spec() != null) { + spec().validate(); + } + if (status() != null) { + status().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterRecordInner.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterRecordInner.java new file mode 100644 index 000000000000..46cac907678f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/fluent/models/SchemaRegistryClusterRecordInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of schema registry cluster record. + */ +@Fluent +public final class SchemaRegistryClusterRecordInner { + /* + * Kind of the cluster + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Id of the cluster + */ + @JsonProperty(value = "id") + private String id; + + /* + * Schema Registry Cluster Properties + */ + @JsonProperty(value = "properties") + private SchemaRegistryClusterProperties innerProperties; + + /** + * Creates an instance of SchemaRegistryClusterRecordInner class. + */ + public SchemaRegistryClusterRecordInner() { + } + + /** + * Get the kind property: Kind of the cluster. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of the cluster. + * + * @param kind the kind value to set. + * @return the SchemaRegistryClusterRecordInner object itself. + */ + public SchemaRegistryClusterRecordInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the id property: Id of the cluster. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the cluster. + * + * @param id the id value to set. + * @return the SchemaRegistryClusterRecordInner object itself. + */ + public SchemaRegistryClusterRecordInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the innerProperties property: Schema Registry Cluster Properties. + * + * @return the innerProperties value. + */ + private SchemaRegistryClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the SchemaRegistryClusterRecordInner object itself. + */ + public SchemaRegistryClusterRecordInner withMetadata(SCMetadataEntity metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new SchemaRegistryClusterProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the spec property: Specification of the schema registry cluster. + * + * @return the spec value. + */ + public SchemaRegistryClusterSpecEntity spec() { + return this.innerProperties() == null ? null : this.innerProperties().spec(); + } + + /** + * Set the spec property: Specification of the schema registry cluster. + * + * @param spec the spec value to set. + * @return the SchemaRegistryClusterRecordInner object itself. + */ + public SchemaRegistryClusterRecordInner withSpec(SchemaRegistryClusterSpecEntity spec) { + if (this.innerProperties() == null) { + this.innerProperties = new SchemaRegistryClusterProperties(); + } + this.innerProperties().withSpec(spec); + return this; + } + + /** + * Get the status property: Specification of the cluster status. + * + * @return the status value. + */ + public SchemaRegistryClusterStatusEntity status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Specification of the cluster status. + * + * @param status the status value to set. + * @return the SchemaRegistryClusterRecordInner object itself. + */ + public SchemaRegistryClusterRecordInner withStatus(SchemaRegistryClusterStatusEntity status) { + if (this.innerProperties() == null) { + this.innerProperties = new SchemaRegistryClusterProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessClientImpl.java index 95605b5fe0d2..3b4b31c56b51 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessClientImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessClientImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.confluent.implementation; import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; @@ -29,9 +30,12 @@ import com.azure.resourcemanager.confluent.fluent.models.AccessListRoleBindingsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListServiceAccountsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListUsersSuccessResponseInner; +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.InvitationRecordInner; +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; import com.azure.resourcemanager.confluent.models.AccessInviteUserAccountModel; import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.RoleBindingRecord; import reactor.core.publisher.Mono; /** @@ -142,12 +146,45 @@ Mono> listRoleBindings(@Hos @PathParam("organizationName") String organizationName, @BodyParam("application/json") ListAccessRequestModel body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/createRoleBinding") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createRoleBinding(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, + @BodyParam("application/json") AccessCreateRoleBindingRequestModel body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/deleteRoleBinding/{roleBindingId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteRoleBinding(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("roleBindingId") String roleBindingId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/access/default/listRoleBindingNameList") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRoleBindingNameList( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, + @BodyParam("application/json") ListAccessRequestModel body, @HeaderParam("Accept") String accept, + Context context); } /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -189,7 +226,7 @@ private Mono> listUsersWithRespons /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -231,7 +268,7 @@ private Mono> listUsersWithRespons /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,7 +286,7 @@ private Mono listUsersAsync(String resource /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -267,7 +304,7 @@ public Response listUsersWithResponse(Strin /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +321,7 @@ public AccessListUsersSuccessResponseInner listUsers(String resourceGroupName, S /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,7 +364,7 @@ private Mono> listServic /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -370,7 +407,7 @@ private Mono> listServic /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -388,7 +425,7 @@ private Mono listServiceAccountsA /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -406,7 +443,7 @@ public Response listServiceAccoun /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,7 +460,7 @@ public AccessListServiceAccountsSuccessResponseInner listServiceAccounts(String /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,7 +502,7 @@ private Mono> listInvitation /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -507,7 +544,7 @@ private Mono> listInvitation /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,7 +562,7 @@ private Mono listInvitationsAsync(Str /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -543,7 +580,7 @@ public Response listInvitationsWithRe /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -560,7 +597,7 @@ public AccessListInvitationsSuccessResponseInner listInvitations(String resource /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -602,7 +639,7 @@ private Mono> inviteUserWithResponseAsync(String /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @param context The context to associate with this operation. @@ -644,7 +681,7 @@ private Mono> inviteUserWithResponseAsync(String /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -662,7 +699,7 @@ private Mono inviteUserAsync(String resourceGroupName, St /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @param context The context to associate with this operation. @@ -680,7 +717,7 @@ public Response inviteUserWithResponse(String resourceGro /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -703,7 +740,8 @@ public InvitationRecordInner inviteUser(String resourceGroupName, String organiz * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the environments returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEnvironmentsWithResponseAsync( @@ -746,7 +784,8 @@ private Mono> listEnvironme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the environments returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEnvironmentsWithResponseAsync( @@ -787,7 +826,7 @@ private Mono> listEnvironme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response on successful completion of {@link Mono}. + * @return details of the environments returned on successful response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listEnvironmentsAsync(String resourceGroupName, @@ -806,7 +845,7 @@ private Mono listEnvironmentsAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response along with {@link Response}. + * @return details of the environments returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listEnvironmentsWithResponse(String resourceGroupName, @@ -823,7 +862,7 @@ public Response listEnvironmentsWith * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response. + * @return details of the environments returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessListEnvironmentsSuccessResponseInner listEnvironments(String resourceGroupName, @@ -840,7 +879,8 @@ public AccessListEnvironmentsSuccessResponseInner listEnvironments(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the clusters returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -883,7 +923,8 @@ public AccessListEnvironmentsSuccessResponseInner listEnvironments(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the clusters returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listClustersWithResponseAsync( @@ -924,7 +965,7 @@ private Mono> listClustersWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response on successful completion of {@link Mono}. + * @return details of the clusters returned on successful response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listClustersAsync(String resourceGroupName, @@ -943,7 +984,7 @@ private Mono listClustersAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the clusters returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listClustersWithResponse(String resourceGroupName, @@ -960,7 +1001,7 @@ public Response listClustersWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the clusters returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessListClusterSuccessResponseInner listClusters(String resourceGroupName, String organizationName, @@ -977,7 +1018,8 @@ public AccessListClusterSuccessResponseInner listClusters(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the role bindings returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRoleBindingsWithResponseAsync( @@ -1020,7 +1062,8 @@ private Mono> listRoleBindi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response} on successful completion of {@link Mono}. + * @return details of the role bindings returned on successful response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRoleBindingsWithResponseAsync( @@ -1061,7 +1104,7 @@ private Mono> listRoleBindi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response on successful completion of {@link Mono}. + * @return details of the role bindings returned on successful response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listRoleBindingsAsync(String resourceGroupName, @@ -1080,7 +1123,7 @@ private Mono listRoleBindingsAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the role bindings returned on successful response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listRoleBindingsWithResponse(String resourceGroupName, @@ -1097,11 +1140,422 @@ public Response listRoleBindingsWith * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the role bindings returned on successful response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessListRoleBindingsSuccessResponseInner listRoleBindings(String resourceGroupName, String organizationName, ListAccessRequestModel body) { return listRoleBindingsWithResponse(resourceGroupName, organizationName, body, Context.NONE).getValue(); } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createRoleBindingWithResponseAsync(String resourceGroupName, + String organizationName, AccessCreateRoleBindingRequestModel body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createRoleBinding(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createRoleBindingWithResponseAsync(String resourceGroupName, + String organizationName, AccessCreateRoleBindingRequestModel body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createRoleBinding(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createRoleBindingAsync(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body) { + return createRoleBindingWithResponseAsync(resourceGroupName, organizationName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createRoleBindingWithResponse(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body, Context context) { + return createRoleBindingWithResponseAsync(resourceGroupName, organizationName, body, context).block(); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleBindingRecord createRoleBinding(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body) { + return createRoleBindingWithResponse(resourceGroupName, organizationName, body, Context.NONE).getValue(); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRoleBindingWithResponseAsync(String resourceGroupName, String organizationName, + String roleBindingId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (roleBindingId == null) { + return Mono.error(new IllegalArgumentException("Parameter roleBindingId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteRoleBinding(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, roleBindingId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRoleBindingWithResponseAsync(String resourceGroupName, String organizationName, + String roleBindingId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (roleBindingId == null) { + return Mono.error(new IllegalArgumentException("Parameter roleBindingId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteRoleBinding(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, roleBindingId, accept, context); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteRoleBindingAsync(String resourceGroupName, String organizationName, String roleBindingId) { + return deleteRoleBindingWithResponseAsync(resourceGroupName, organizationName, roleBindingId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRoleBindingWithResponse(String resourceGroupName, String organizationName, + String roleBindingId, Context context) { + return deleteRoleBindingWithResponseAsync(resourceGroupName, organizationName, roleBindingId, context).block(); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRoleBinding(String resourceGroupName, String organizationName, String roleBindingId) { + deleteRoleBindingWithResponse(resourceGroupName, organizationName, roleBindingId, Context.NONE); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRoleBindingNameListWithResponseAsync( + String resourceGroupName, String organizationName, ListAccessRequestModel body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listRoleBindingNameList(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRoleBindingNameListWithResponseAsync( + String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listRoleBindingNameList(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listRoleBindingNameListAsync(String resourceGroupName, + String organizationName, ListAccessRequestModel body) { + return listRoleBindingNameListWithResponseAsync(resourceGroupName, organizationName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRoleBindingNameListWithResponse( + String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context) { + return listRoleBindingNameListWithResponseAsync(resourceGroupName, organizationName, body, context).block(); + } + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessRoleBindingNameListSuccessResponseInner listRoleBindingNameList(String resourceGroupName, + String organizationName, ListAccessRequestModel body) { + return listRoleBindingNameListWithResponse(resourceGroupName, organizationName, body, Context.NONE).getValue(); + } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessImpl.java index c00be662e1a4..5ac1b1f6f2c3 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessImpl.java @@ -15,8 +15,10 @@ import com.azure.resourcemanager.confluent.fluent.models.AccessListRoleBindingsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListServiceAccountsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.AccessListUsersSuccessResponseInner; +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.InvitationRecordInner; import com.azure.resourcemanager.confluent.models.Access; +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; import com.azure.resourcemanager.confluent.models.AccessInviteUserAccountModel; import com.azure.resourcemanager.confluent.models.AccessListClusterSuccessResponse; import com.azure.resourcemanager.confluent.models.AccessListEnvironmentsSuccessResponse; @@ -24,8 +26,10 @@ import com.azure.resourcemanager.confluent.models.AccessListRoleBindingsSuccessResponse; import com.azure.resourcemanager.confluent.models.AccessListServiceAccountsSuccessResponse; import com.azure.resourcemanager.confluent.models.AccessListUsersSuccessResponse; +import com.azure.resourcemanager.confluent.models.AccessRoleBindingNameListSuccessResponse; import com.azure.resourcemanager.confluent.models.InvitationRecord; import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.RoleBindingRecord; public final class AccessImpl implements Access { private static final ClientLogger LOGGER = new ClientLogger(AccessImpl.class); @@ -199,6 +203,49 @@ public AccessListRoleBindingsSuccessResponse listRoleBindings(String resourceGro } } + public Response createRoleBindingWithResponse(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body, Context context) { + return this.serviceClient().createRoleBindingWithResponse(resourceGroupName, organizationName, body, context); + } + + public RoleBindingRecord createRoleBinding(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body) { + return this.serviceClient().createRoleBinding(resourceGroupName, organizationName, body); + } + + public Response deleteRoleBindingWithResponse(String resourceGroupName, String organizationName, + String roleBindingId, Context context) { + return this.serviceClient().deleteRoleBindingWithResponse(resourceGroupName, organizationName, roleBindingId, + context); + } + + public void deleteRoleBinding(String resourceGroupName, String organizationName, String roleBindingId) { + this.serviceClient().deleteRoleBinding(resourceGroupName, organizationName, roleBindingId); + } + + public Response listRoleBindingNameListWithResponse( + String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context) { + Response inner = this.serviceClient() + .listRoleBindingNameListWithResponse(resourceGroupName, organizationName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccessRoleBindingNameListSuccessResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AccessRoleBindingNameListSuccessResponse listRoleBindingNameList(String resourceGroupName, + String organizationName, ListAccessRequestModel body) { + AccessRoleBindingNameListSuccessResponseInner inner + = this.serviceClient().listRoleBindingNameList(resourceGroupName, organizationName, body); + if (inner != null) { + return new AccessRoleBindingNameListSuccessResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private AccessClient serviceClient() { return this.innerClient; } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessRoleBindingNameListSuccessResponseImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessRoleBindingNameListSuccessResponseImpl.java new file mode 100644 index 000000000000..7401b0de29d0 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/AccessRoleBindingNameListSuccessResponseImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; +import com.azure.resourcemanager.confluent.models.AccessRoleBindingNameListSuccessResponse; +import com.azure.resourcemanager.confluent.models.ConfluentListMetadata; +import java.util.Collections; +import java.util.List; + +public final class AccessRoleBindingNameListSuccessResponseImpl implements AccessRoleBindingNameListSuccessResponse { + private AccessRoleBindingNameListSuccessResponseInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + AccessRoleBindingNameListSuccessResponseImpl(AccessRoleBindingNameListSuccessResponseInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kind() { + return this.innerModel().kind(); + } + + public ConfluentListMetadata metadata() { + return this.innerModel().metadata(); + } + + public List data() { + List inner = this.innerModel().data(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AccessRoleBindingNameListSuccessResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ApiKeyRecordImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ApiKeyRecordImpl.java new file mode 100644 index 000000000000..6ef762605edd --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ApiKeyRecordImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner; +import com.azure.resourcemanager.confluent.models.ApiKeyRecord; +import com.azure.resourcemanager.confluent.models.ApiKeySpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; + +public final class ApiKeyRecordImpl implements ApiKeyRecord { + private ApiKeyRecordInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + ApiKeyRecordImpl(ApiKeyRecordInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kind() { + return this.innerModel().kind(); + } + + public String id() { + return this.innerModel().id(); + } + + public SCMetadataEntity metadata() { + return this.innerModel().metadata(); + } + + public ApiKeySpecEntity spec() { + return this.innerModel().spec(); + } + + public ApiKeyRecordInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientBuilder.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientBuilder.java index 210846f47877..eb9536657671 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientBuilder.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientBuilder.java @@ -20,12 +20,12 @@ @ServiceClientBuilder(serviceClients = { ConfluentManagementClientImpl.class }) public final class ConfluentManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Microsoft Azure subscription id */ private String subscriptionId; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Microsoft Azure subscription id. * * @param subscriptionId the subscriptionId value. * @return the ConfluentManagementClientBuilder. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java index b8c3ff539f42..0dfbc97f22b5 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ConfluentManagementClientImpl.java @@ -43,12 +43,12 @@ @ServiceClient(builder = ConfluentManagementClientBuilder.class) public final class ConfluentManagementClientImpl implements ConfluentManagementClient { /** - * The ID of the target subscription. The value must be an UUID. + * Microsoft Azure subscription id. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Microsoft Azure subscription id. * * @return the subscriptionId value. */ @@ -203,7 +203,7 @@ public AccessClient getAccess() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId Microsoft Azure subscription id. * @param endpoint server parameter. */ ConfluentManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, @@ -213,7 +213,7 @@ public AccessClient getAccess() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-08-22"; + this.apiVersion = "2024-02-13"; this.marketplaceAgreements = new MarketplaceAgreementsClientImpl(this); this.organizationOperations = new OrganizationOperationsClientImpl(this); this.organizations = new OrganizationsClientImpl(this); diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ListRegionsSuccessResponseImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ListRegionsSuccessResponseImpl.java new file mode 100644 index 000000000000..8c98694adbbc --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ListRegionsSuccessResponseImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; +import com.azure.resourcemanager.confluent.models.ListRegionsSuccessResponse; +import com.azure.resourcemanager.confluent.models.RegionRecord; +import java.util.Collections; +import java.util.List; + +public final class ListRegionsSuccessResponseImpl implements ListRegionsSuccessResponse { + private ListRegionsSuccessResponseInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + ListRegionsSuccessResponseImpl(ListRegionsSuccessResponseInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List data() { + List inner = this.innerModel().data(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ListRegionsSuccessResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java index 6c779e9687f9..de73f898a3d8 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsImpl.java @@ -29,12 +29,14 @@ public MarketplaceAgreementsImpl(MarketplaceAgreementsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ConfluentAgreementResourceImpl(inner1, this.manager())); } public Response createWithResponse(ConfluentAgreementResourceInner body, diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java index 0522091727eb..f5d39009e232 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationOperationsImpl.java @@ -27,12 +27,12 @@ public OrganizationOperationsImpl(OrganizationOperationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); } private OrganizationOperationsClient serviceClient() { diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java index 5e999c3e2cad..4a4c2c0e2b2e 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationResourceImpl.java @@ -4,11 +4,14 @@ package com.azure.resourcemanager.confluent.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner; import com.azure.resourcemanager.confluent.models.LinkOrganization; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.ListRegionsSuccessResponse; import com.azure.resourcemanager.confluent.models.OfferDetail; import com.azure.resourcemanager.confluent.models.OrganizationResource; import com.azure.resourcemanager.confluent.models.OrganizationResourceUpdate; @@ -151,8 +154,8 @@ public OrganizationResource apply(Context context) { com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = Utils.getValueFromIdByName(innerObject.id(), "organizations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); } public OrganizationResource refresh() { @@ -167,6 +170,15 @@ public OrganizationResource refresh(Context context) { return this; } + public Response listRegionsWithResponse(ListAccessRequestModel body, Context context) { + return serviceManager.organizations().listRegionsWithResponse(resourceGroupName, organizationName, body, + context); + } + + public ListRegionsSuccessResponse listRegions(ListAccessRequestModel body) { + return serviceManager.organizations().listRegions(resourceGroupName, organizationName, body); + } + public OrganizationResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java index 3d6742c3946d..5857f58d2f18 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,7 +34,17 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.confluent.fluent.OrganizationsClient; +import com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; +import com.azure.resourcemanager.confluent.models.GetEnvironmentsResponse; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.ListClustersSuccessResponse; +import com.azure.resourcemanager.confluent.models.ListSchemaRegistryClustersResponse; import com.azure.resourcemanager.confluent.models.OrganizationResourceListResult; import com.azure.resourcemanager.confluent.models.OrganizationResourceUpdate; import java.nio.ByteBuffer; @@ -131,6 +142,112 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("organizationName") String organizationName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listEnvironments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @QueryParam("pageSize") Integer pageSize, + @QueryParam("pageToken") String pageToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getEnvironmentById(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusters(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @QueryParam("pageSize") Integer pageSize, @QueryParam("pageToken") String pageToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSchemaRegistryClusters( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @QueryParam("pageSize") Integer pageSize, @QueryParam("pageToken") String pageToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/listRegions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRegions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, + @BodyParam("application/json") ListAccessRequestModel body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createApiKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @PathParam("clusterId") String clusterId, @BodyParam("application/json") CreateApiKeyModel body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/apiKeys/{apiKeyId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteClusterApiKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("apiKeyId") String apiKeyId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/apiKeys/{apiKeyId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getClusterApiKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("apiKeyId") String apiKeyId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSchemaRegistryClusterById( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @PathParam("clusterId") String clusterId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getClusterById(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("organizationName") String organizationName, @PathParam("environmentId") String environmentId, + @PathParam("clusterId") String clusterId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -146,6 +263,30 @@ Mono> listBySubscriptionNext( Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listEnvironmentsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSchemaRegistryClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -261,7 +402,7 @@ public PagedIterable list(Context context) { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -295,7 +436,7 @@ public PagedIterable list(Context context) { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -330,7 +471,7 @@ private Mono> listByResourceGroupSingle /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -345,7 +486,7 @@ private PagedFlux listByResourceGroupAsync(String res /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,7 +502,7 @@ private PagedFlux listByResourceGroupAsync(String res /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -375,7 +516,7 @@ public PagedIterable listByResourceGroup(String resou /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -390,7 +531,7 @@ public PagedIterable listByResourceGroup(String resou /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -427,7 +568,7 @@ private Mono> getByResourceGroupWithResponse /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,7 +605,7 @@ private Mono> getByResourceGroupWithResponse /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,7 +621,7 @@ private Mono getByResourceGroupAsync(String resourceG /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -497,7 +638,7 @@ public Response getByResourceGroupWithResponse(String /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -512,7 +653,7 @@ public OrganizationResourceInner getByResourceGroup(String resourceGroupName, St /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -552,7 +693,7 @@ private Mono>> createWithResponseAsync(String resource /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -592,7 +733,7 @@ private Mono>> createWithResponseAsync(String resource /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -612,7 +753,7 @@ private Mono>> createWithResponseAsync(String resource /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -632,7 +773,7 @@ private Mono>> createWithResponseAsync(String resource /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -654,7 +795,7 @@ private PollerFlux, OrganizationResourceIn /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -671,7 +812,7 @@ private PollerFlux, OrganizationResourceIn /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -689,7 +830,7 @@ public SyncPoller, OrganizationResourceInn /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -707,7 +848,7 @@ private Mono createAsync(String resourceGroupName, St /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -724,7 +865,7 @@ private Mono createAsync(String resourceGroupName, St /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -743,7 +884,7 @@ private Mono createAsync(String resourceGroupName, St /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -759,7 +900,7 @@ public OrganizationResourceInner create(String resourceGroupName, String organiz /** * Create Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -777,7 +918,7 @@ public OrganizationResourceInner create(String resourceGroupName, String organiz /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Updated Organization resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -817,7 +958,7 @@ private Mono> updateWithResponseAsync(String /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Updated Organization resource. * @param context The context to associate with this operation. @@ -857,7 +998,7 @@ private Mono> updateWithResponseAsync(String /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -874,7 +1015,7 @@ private Mono updateAsync(String resourceGroupName, St /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Updated Organization resource. * @param context The context to associate with this operation. @@ -892,7 +1033,7 @@ public Response updateWithResponse(String resourceGro /** * Update Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -908,7 +1049,7 @@ public OrganizationResourceInner update(String resourceGroupName, String organiz /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -944,7 +1085,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -980,7 +1121,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -997,7 +1138,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1017,7 +1158,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1032,7 +1173,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1049,7 +1190,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1065,7 +1206,7 @@ private Mono deleteAsync(String resourceGroupName, String organizationName /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1082,7 +1223,7 @@ private Mono deleteAsync(String resourceGroupName, String organizationName /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1096,7 +1237,7 @@ public void delete(String resourceGroupName, String organizationName) { /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1109,113 +1250,1695 @@ public void delete(String resourceGroupName, String organizationName, Context co } /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items + * Lists of all the environments in a organization. * - * The nextLink parameter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of GET request to list Confluent operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> listEnvironmentsSinglePageAsync(String resourceGroupName, + String organizationName, Integer pageSize, String pageToken) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listEnvironments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, pageSize, pageToken, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the next page of items. + * Lists of all the environments in a organization. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of GET request to list Confluent operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> listEnvironmentsSinglePageAsync(String resourceGroupName, + String organizationName, Integer pageSize, String pageToken, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service + .listEnvironments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, organizationName, pageSize, pageToken, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get the next page of items. + * Lists of all the environments in a organization. * - * @param nextLink The URL to get the next list of items + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEnvironmentsAsync(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken) { + return new PagedFlux<>( + () -> listEnvironmentsSinglePageAsync(resourceGroupName, organizationName, pageSize, pageToken), + nextLink -> listEnvironmentsNextSinglePageAsync(nextLink)); + } + + /** + * Lists of all the environments in a organization. * - * The nextLink parameter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEnvironmentsAsync(String resourceGroupName, + String organizationName) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedFlux<>( + () -> listEnvironmentsSinglePageAsync(resourceGroupName, organizationName, pageSize, pageToken), + nextLink -> listEnvironmentsNextSinglePageAsync(nextLink)); } /** - * Get the next page of items. + * Lists of all the environments in a organization. * - * @param nextLink The URL to get the next list of items + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listEnvironmentsAsync(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken, Context context) { + return new PagedFlux<>( + () -> listEnvironmentsSinglePageAsync(resourceGroupName, organizationName, pageSize, pageToken, context), + nextLink -> listEnvironmentsNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists of all the environments in a organization. * - * The nextLink parameter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEnvironments(String resourceGroupName, String organizationName) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedIterable<>(listEnvironmentsAsync(resourceGroupName, organizationName, pageSize, pageToken)); + } + + /** + * Lists of all the environments in a organization. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a list operation along with {@link PagedResponse} on successful completion of + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listEnvironments(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken, Context context) { + return new PagedIterable<>( + listEnvironmentsAsync(resourceGroupName, organizationName, pageSize, pageToken, context)); + } + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + private Mono> getEnvironmentByIdWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getEnvironmentById(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getEnvironmentByIdWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getEnvironmentById(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, accept, context); + } + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getEnvironmentByIdAsync(String resourceGroupName, String organizationName, + String environmentId) { + return getEnvironmentByIdWithResponseAsync(resourceGroupName, organizationName, environmentId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEnvironmentByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, Context context) { + return getEnvironmentByIdWithResponseAsync(resourceGroupName, organizationName, environmentId, context).block(); + } + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SCEnvironmentRecordInner getEnvironmentById(String resourceGroupName, String organizationName, + String environmentId) { + return getEnvironmentByIdWithResponse(resourceGroupName, organizationName, environmentId, Context.NONE) + .getValue(); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClustersSinglePageAsync(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, pageSize, + pageToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClustersSinglePageAsync(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listClusters(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, organizationName, environmentId, pageSize, pageToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listClustersAsync(String resourceGroupName, String organizationName, + String environmentId, Integer pageSize, String pageToken) { + return new PagedFlux<>( + () -> listClustersSinglePageAsync(resourceGroupName, organizationName, environmentId, pageSize, pageToken), + nextLink -> listClustersNextSinglePageAsync(nextLink)); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listClustersAsync(String resourceGroupName, String organizationName, + String environmentId) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedFlux<>( + () -> listClustersSinglePageAsync(resourceGroupName, organizationName, environmentId, pageSize, pageToken), + nextLink -> listClustersNextSinglePageAsync(nextLink)); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listClustersAsync(String resourceGroupName, String organizationName, + String environmentId, Integer pageSize, String pageToken, Context context) { + return new PagedFlux<>(() -> listClustersSinglePageAsync(resourceGroupName, organizationName, environmentId, + pageSize, pageToken, context), nextLink -> listClustersNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedIterable<>( + listClustersAsync(resourceGroupName, organizationName, environmentId, pageSize, pageToken)); + } + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId, Integer pageSize, String pageToken, Context context) { + return new PagedIterable<>( + listClustersAsync(resourceGroupName, organizationName, environmentId, pageSize, pageToken, context)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSchemaRegistryClustersSinglePageAsync( + String resourceGroupName, String organizationName, String environmentId, Integer pageSize, String pageToken) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSchemaRegistryClusters(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, organizationName, + environmentId, pageSize, pageToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSchemaRegistryClustersSinglePageAsync( + String resourceGroupName, String organizationName, String environmentId, Integer pageSize, String pageToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSchemaRegistryClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, pageSize, + pageToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSchemaRegistryClustersAsync(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken) { + return new PagedFlux<>(() -> listSchemaRegistryClustersSinglePageAsync(resourceGroupName, organizationName, + environmentId, pageSize, pageToken), nextLink -> listSchemaRegistryClustersNextSinglePageAsync(nextLink)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSchemaRegistryClustersAsync(String resourceGroupName, + String organizationName, String environmentId) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedFlux<>(() -> listSchemaRegistryClustersSinglePageAsync(resourceGroupName, organizationName, + environmentId, pageSize, pageToken), nextLink -> listSchemaRegistryClustersNextSinglePageAsync(nextLink)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSchemaRegistryClustersAsync(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context) { + return new PagedFlux<>( + () -> listSchemaRegistryClustersSinglePageAsync(resourceGroupName, organizationName, environmentId, + pageSize, pageToken, context), + nextLink -> listSchemaRegistryClustersNextSinglePageAsync(nextLink, context)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId) { + final Integer pageSize = null; + final String pageToken = null; + return new PagedIterable<>( + listSchemaRegistryClustersAsync(resourceGroupName, organizationName, environmentId, pageSize, pageToken)); + } + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context) { + return new PagedIterable<>(listSchemaRegistryClustersAsync(resourceGroupName, organizationName, environmentId, + pageSize, pageToken, context)); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRegionsWithResponseAsync(String resourceGroupName, + String organizationName, ListAccessRequestModel body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRegions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRegionsWithResponseAsync(String resourceGroupName, + String organizationName, ListAccessRequestModel body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listRegions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, body, accept, context); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listRegionsAsync(String resourceGroupName, String organizationName, + ListAccessRequestModel body) { + return listRegionsWithResponseAsync(resourceGroupName, organizationName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRegionsWithResponse(String resourceGroupName, + String organizationName, ListAccessRequestModel body, Context context) { + return listRegionsWithResponseAsync(resourceGroupName, organizationName, body, context).block(); + } + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListRegionsSuccessResponseInner listRegions(String resourceGroupName, String organizationName, + ListAccessRequestModel body) { + return listRegionsWithResponse(resourceGroupName, organizationName, body, Context.NONE).getValue(); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createApiKeyWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId, String clusterId, CreateApiKeyModel body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, clusterId, body, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createApiKeyWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId, String clusterId, CreateApiKeyModel body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, clusterId, body, + accept, context); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createApiKeyAsync(String resourceGroupName, String organizationName, + String environmentId, String clusterId, CreateApiKeyModel body) { + return createApiKeyWithResponseAsync(resourceGroupName, organizationName, environmentId, clusterId, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createApiKeyWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, CreateApiKeyModel body, Context context) { + return createApiKeyWithResponseAsync(resourceGroupName, organizationName, environmentId, clusterId, body, + context).block(); + } + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKeyRecordInner createApiKey(String resourceGroupName, String organizationName, String environmentId, + String clusterId, CreateApiKeyModel body) { + return createApiKeyWithResponse(resourceGroupName, organizationName, environmentId, clusterId, body, + Context.NONE).getValue(); + } + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteClusterApiKeyWithResponseAsync(String resourceGroupName, String organizationName, + String apiKeyId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (apiKeyId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiKeyId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteClusterApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, apiKeyId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteClusterApiKeyWithResponseAsync(String resourceGroupName, String organizationName, + String apiKeyId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (apiKeyId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiKeyId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteClusterApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, apiKeyId, accept, context); + } + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteClusterApiKeyAsync(String resourceGroupName, String organizationName, String apiKeyId) { + return deleteClusterApiKeyWithResponseAsync(resourceGroupName, organizationName, apiKeyId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context) { + return deleteClusterApiKeyWithResponseAsync(resourceGroupName, organizationName, apiKeyId, context).block(); + } + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId) { + deleteClusterApiKeyWithResponse(resourceGroupName, organizationName, apiKeyId, Context.NONE); + } + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getClusterApiKeyWithResponseAsync(String resourceGroupName, + String organizationName, String apiKeyId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (apiKeyId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiKeyId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getClusterApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, apiKeyId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getClusterApiKeyWithResponseAsync(String resourceGroupName, + String organizationName, String apiKeyId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (apiKeyId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiKeyId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getClusterApiKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, apiKeyId, accept, context); + } + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getClusterApiKeyAsync(String resourceGroupName, String organizationName, + String apiKeyId) { + return getClusterApiKeyWithResponseAsync(resourceGroupName, organizationName, apiKeyId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context) { + return getClusterApiKeyWithResponseAsync(resourceGroupName, organizationName, apiKeyId, context).block(); + } + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKeyRecordInner getClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId) { + return getClusterApiKeyWithResponse(resourceGroupName, organizationName, apiKeyId, Context.NONE).getValue(); + } + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSchemaRegistryClusterByIdWithResponseAsync( + String resourceGroupName, String organizationName, String environmentId, String clusterId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSchemaRegistryClusterById(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, organizationName, + environmentId, clusterId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSchemaRegistryClusterByIdWithResponseAsync( + String resourceGroupName, String organizationName, String environmentId, String clusterId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSchemaRegistryClusterById(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, clusterId, accept, + context); + } + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSchemaRegistryClusterByIdAsync(String resourceGroupName, + String organizationName, String environmentId, String clusterId) { + return getSchemaRegistryClusterByIdWithResponseAsync(resourceGroupName, organizationName, environmentId, + clusterId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSchemaRegistryClusterByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, String clusterId, Context context) { + return getSchemaRegistryClusterByIdWithResponseAsync(resourceGroupName, organizationName, environmentId, + clusterId, context).block(); + } + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SchemaRegistryClusterRecordInner getSchemaRegistryClusterById(String resourceGroupName, + String organizationName, String environmentId, String clusterId) { + return getSchemaRegistryClusterByIdWithResponse(resourceGroupName, organizationName, environmentId, clusterId, + Context.NONE).getValue(); + } + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getClusterByIdWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId, String clusterId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getClusterById(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, clusterId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getClusterByIdWithResponseAsync(String resourceGroupName, + String organizationName, String environmentId, String clusterId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (organizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); + } + if (environmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter environmentId is required and cannot be null.")); + } + if (clusterId == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getClusterById(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, organizationName, environmentId, clusterId, accept, + context); + } + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getClusterByIdAsync(String resourceGroupName, String organizationName, + String environmentId, String clusterId) { + return getClusterByIdWithResponseAsync(resourceGroupName, organizationName, environmentId, clusterId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getClusterByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, Context context) { + return getClusterByIdWithResponseAsync(resourceGroupName, organizationName, environmentId, clusterId, context) + .block(); + } + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SCClusterRecordInner getClusterById(String resourceGroupName, String organizationName, String environmentId, + String clusterId) { + return getClusterByIdWithResponse(resourceGroupName, organizationName, environmentId, clusterId, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { return Mono.error( @@ -1227,4 +2950,183 @@ private Mono> listByResourceGroupNextSi .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEnvironmentsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listEnvironmentsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listEnvironmentsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listEnvironmentsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClustersNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listClustersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClustersNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listClustersNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list schema registry clusters in the environment of a confluent organization + * along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSchemaRegistryClustersNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listSchemaRegistryClustersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list schema registry clusters in the environment of a confluent organization + * along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSchemaRegistryClustersNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSchemaRegistryClustersNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java index 6ad36d3fc77d..a7b50fb2f851 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/OrganizationsImpl.java @@ -10,9 +10,21 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.confluent.fluent.OrganizationsClient; +import com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.ApiKeyRecord; +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.ListRegionsSuccessResponse; import com.azure.resourcemanager.confluent.models.OrganizationResource; import com.azure.resourcemanager.confluent.models.Organizations; +import com.azure.resourcemanager.confluent.models.SCClusterRecord; +import com.azure.resourcemanager.confluent.models.SCEnvironmentRecord; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterRecord; public final class OrganizationsImpl implements Organizations { private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); @@ -29,23 +41,23 @@ public OrganizationsImpl(OrganizationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); } public Response getByResourceGroupWithResponse(String resourceGroupName, @@ -77,13 +89,203 @@ public void delete(String resourceGroupName, String organizationName, Context co this.serviceClient().delete(resourceGroupName, organizationName, context); } + public PagedIterable listEnvironments(String resourceGroupName, String organizationName) { + PagedIterable inner + = this.serviceClient().listEnvironments(resourceGroupName, organizationName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SCEnvironmentRecordImpl(inner1, this.manager())); + } + + public PagedIterable listEnvironments(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken, Context context) { + PagedIterable inner + = this.serviceClient().listEnvironments(resourceGroupName, organizationName, pageSize, pageToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SCEnvironmentRecordImpl(inner1, this.manager())); + } + + public Response getEnvironmentByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, Context context) { + Response inner = this.serviceClient() + .getEnvironmentByIdWithResponse(resourceGroupName, organizationName, environmentId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SCEnvironmentRecordImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SCEnvironmentRecord getEnvironmentById(String resourceGroupName, String organizationName, + String environmentId) { + SCEnvironmentRecordInner inner + = this.serviceClient().getEnvironmentById(resourceGroupName, organizationName, environmentId); + if (inner != null) { + return new SCEnvironmentRecordImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId) { + PagedIterable inner + = this.serviceClient().listClusters(resourceGroupName, organizationName, environmentId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SCClusterRecordImpl(inner1, this.manager())); + } + + public PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId, Integer pageSize, String pageToken, Context context) { + PagedIterable inner = this.serviceClient().listClusters(resourceGroupName, + organizationName, environmentId, pageSize, pageToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SCClusterRecordImpl(inner1, this.manager())); + } + + public PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId) { + PagedIterable inner + = this.serviceClient().listSchemaRegistryClusters(resourceGroupName, organizationName, environmentId); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SchemaRegistryClusterRecordImpl(inner1, this.manager())); + } + + public PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context) { + PagedIterable inner = this.serviceClient().listSchemaRegistryClusters( + resourceGroupName, organizationName, environmentId, pageSize, pageToken, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SchemaRegistryClusterRecordImpl(inner1, this.manager())); + } + + public Response listRegionsWithResponse(String resourceGroupName, + String organizationName, ListAccessRequestModel body, Context context) { + Response inner + = this.serviceClient().listRegionsWithResponse(resourceGroupName, organizationName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListRegionsSuccessResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListRegionsSuccessResponse listRegions(String resourceGroupName, String organizationName, + ListAccessRequestModel body) { + ListRegionsSuccessResponseInner inner + = this.serviceClient().listRegions(resourceGroupName, organizationName, body); + if (inner != null) { + return new ListRegionsSuccessResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createApiKeyWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, CreateApiKeyModel body, Context context) { + Response inner = this.serviceClient().createApiKeyWithResponse(resourceGroupName, + organizationName, environmentId, clusterId, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApiKeyRecordImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ApiKeyRecord createApiKey(String resourceGroupName, String organizationName, String environmentId, + String clusterId, CreateApiKeyModel body) { + ApiKeyRecordInner inner + = this.serviceClient().createApiKey(resourceGroupName, organizationName, environmentId, clusterId, body); + if (inner != null) { + return new ApiKeyRecordImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context) { + return this.serviceClient().deleteClusterApiKeyWithResponse(resourceGroupName, organizationName, apiKeyId, + context); + } + + public void deleteClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId) { + this.serviceClient().deleteClusterApiKey(resourceGroupName, organizationName, apiKeyId); + } + + public Response getClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context) { + Response inner + = this.serviceClient().getClusterApiKeyWithResponse(resourceGroupName, organizationName, apiKeyId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApiKeyRecordImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ApiKeyRecord getClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId) { + ApiKeyRecordInner inner = this.serviceClient().getClusterApiKey(resourceGroupName, organizationName, apiKeyId); + if (inner != null) { + return new ApiKeyRecordImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSchemaRegistryClusterByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, String clusterId, Context context) { + Response inner + = this.serviceClient().getSchemaRegistryClusterByIdWithResponse(resourceGroupName, organizationName, + environmentId, clusterId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SchemaRegistryClusterRecordImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SchemaRegistryClusterRecord getSchemaRegistryClusterById(String resourceGroupName, String organizationName, + String environmentId, String clusterId) { + SchemaRegistryClusterRecordInner inner = this.serviceClient().getSchemaRegistryClusterById(resourceGroupName, + organizationName, environmentId, clusterId); + if (inner != null) { + return new SchemaRegistryClusterRecordImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getClusterByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, Context context) { + Response inner = this.serviceClient().getClusterByIdWithResponse(resourceGroupName, + organizationName, environmentId, clusterId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SCClusterRecordImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SCClusterRecord getClusterById(String resourceGroupName, String organizationName, String environmentId, + String clusterId) { + SCClusterRecordInner inner + = this.serviceClient().getClusterById(resourceGroupName, organizationName, environmentId, clusterId); + if (inner != null) { + return new SCClusterRecordImpl(inner, this.manager()); + } else { + return null; + } + } + public OrganizationResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String organizationName = Utils.getValueFromIdByName(id, "organizations"); + String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); if (organizationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); @@ -92,12 +294,12 @@ public OrganizationResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String organizationName = Utils.getValueFromIdByName(id, "organizations"); + String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); if (organizationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); @@ -106,12 +308,12 @@ public Response getByIdWithResponse(String id, Context con } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String organizationName = Utils.getValueFromIdByName(id, "organizations"); + String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); if (organizationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); @@ -120,12 +322,12 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String organizationName = Utils.getValueFromIdByName(id, "organizations"); + String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); if (organizationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ResourceManagerUtils.java similarity index 99% rename from sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java rename to sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ResourceManagerUtils.java index 194fbe93c316..6490c75bb35f 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/Utils.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCClusterRecordImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCClusterRecordImpl.java new file mode 100644 index 000000000000..2264401bf9f1 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCClusterRecordImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.SCClusterRecord; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; + +public final class SCClusterRecordImpl implements SCClusterRecord { + private SCClusterRecordInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + SCClusterRecordImpl(SCClusterRecordInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kind() { + return this.innerModel().kind(); + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public SCMetadataEntity metadata() { + return this.innerModel().metadata(); + } + + public SCClusterSpecEntity spec() { + return this.innerModel().spec(); + } + + public ClusterStatusEntity status() { + return this.innerModel().status(); + } + + public SCClusterRecordInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCEnvironmentRecordImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCEnvironmentRecordImpl.java new file mode 100644 index 000000000000..9910b0830246 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SCEnvironmentRecordImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.models.SCEnvironmentRecord; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; + +public final class SCEnvironmentRecordImpl implements SCEnvironmentRecord { + private SCEnvironmentRecordInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + SCEnvironmentRecordImpl(SCEnvironmentRecordInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kind() { + return this.innerModel().kind(); + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public SCMetadataEntity metadata() { + return this.innerModel().metadata(); + } + + public SCEnvironmentRecordInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SchemaRegistryClusterRecordImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SchemaRegistryClusterRecordImpl.java new file mode 100644 index 000000000000..c3d2762b4ebf --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/SchemaRegistryClusterRecordImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.implementation; + +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterRecord; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; + +public final class SchemaRegistryClusterRecordImpl implements SchemaRegistryClusterRecord { + private SchemaRegistryClusterRecordInner innerObject; + + private final com.azure.resourcemanager.confluent.ConfluentManager serviceManager; + + SchemaRegistryClusterRecordImpl(SchemaRegistryClusterRecordInner innerObject, + com.azure.resourcemanager.confluent.ConfluentManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kind() { + return this.innerModel().kind(); + } + + public String id() { + return this.innerModel().id(); + } + + public SCMetadataEntity metadata() { + return this.innerModel().metadata(); + } + + public SchemaRegistryClusterSpecEntity spec() { + return this.innerModel().spec(); + } + + public SchemaRegistryClusterStatusEntity status() { + return this.innerModel().status(); + } + + public SchemaRegistryClusterRecordInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confluent.ConfluentManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ValidationsClientImpl.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ValidationsClientImpl.java index 904db4790f00..dbcd0cd4a192 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ValidationsClientImpl.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/ValidationsClientImpl.java @@ -85,7 +85,7 @@ Mono> validateOrganizationV2(@HostParam("$host /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +127,7 @@ private Mono> validateOrganizationWithRespon /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -169,7 +169,7 @@ private Mono> validateOrganizationWithRespon /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,7 +187,7 @@ private Mono validateOrganizationAsync(String resourc /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -205,7 +205,7 @@ public Response validateOrganizationWithResponse(Stri /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,7 +222,7 @@ public OrganizationResourceInner validateOrganization(String resourceGroupName, /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,7 +265,7 @@ private Mono> validateOrganizationV2WithRespon /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -307,7 +307,7 @@ private Mono> validateOrganizationV2WithRespon /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,7 +325,7 @@ private Mono validateOrganizationV2Async(String resourc /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -343,7 +343,7 @@ public Response validateOrganizationV2WithResponse(Stri /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Access.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Access.java index bafda6c5576a..bc09e22cf780 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Access.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Access.java @@ -14,7 +14,7 @@ public interface Access { /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -29,7 +29,7 @@ Response listUsersWithResponse(String resourceGr /** * Organization users details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +43,7 @@ AccessListUsersSuccessResponse listUsers(String resourceGroupName, String organi /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -58,7 +58,7 @@ Response listServiceAccountsWithRespon /** * Organization service accounts details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +72,7 @@ AccessListServiceAccountsSuccessResponse listServiceAccounts(String resourceGrou /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @param context The context to associate with this operation. @@ -87,7 +87,7 @@ Response listInvitationsWithResponse(Strin /** * Organization accounts invitation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body List Access Request Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,7 +101,7 @@ AccessListInvitationsSuccessResponse listInvitations(String resourceGroupName, S /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @param context The context to associate with this operation. @@ -116,7 +116,7 @@ Response inviteUserWithResponse(String resourceGroupName, Stri /** * Invite user to the organization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Invite user account model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,7 +136,7 @@ Response inviteUserWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response along with {@link Response}. + * @return details of the environments returned on successful response along with {@link Response}. */ Response listEnvironmentsWithResponse(String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context); @@ -150,7 +150,7 @@ Response listEnvironmentsWithResponse(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list environments success response. + * @return details of the environments returned on successful response. */ AccessListEnvironmentsSuccessResponse listEnvironments(String resourceGroupName, String organizationName, ListAccessRequestModel body); @@ -165,7 +165,7 @@ AccessListEnvironmentsSuccessResponse listEnvironments(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the clusters returned on successful response along with {@link Response}. */ Response listClustersWithResponse(String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context); @@ -179,7 +179,7 @@ Response listClustersWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the clusters returned on successful response. */ AccessListClusterSuccessResponse listClusters(String resourceGroupName, String organizationName, ListAccessRequestModel body); @@ -194,7 +194,7 @@ AccessListClusterSuccessResponse listClusters(String resourceGroupName, String o * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response along with {@link Response}. + * @return details of the role bindings returned on successful response along with {@link Response}. */ Response listRoleBindingsWithResponse(String resourceGroupName, String organizationName, ListAccessRequestModel body, Context context); @@ -208,8 +208,93 @@ Response listRoleBindingsWithResponse(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list cluster success response. + * @return details of the role bindings returned on successful response. */ AccessListRoleBindingsSuccessResponse listRoleBindings(String resourceGroupName, String organizationName, ListAccessRequestModel body); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding along with {@link Response}. + */ + Response createRoleBindingWithResponse(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body Create role binding Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details on principal, role name and crn pattern of a role binding. + */ + RoleBindingRecord createRoleBinding(String resourceGroupName, String organizationName, + AccessCreateRoleBindingRequestModel body); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteRoleBindingWithResponse(String resourceGroupName, String organizationName, + String roleBindingId, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param roleBindingId Confluent Role binding id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteRoleBinding(String resourceGroupName, String organizationName, String roleBindingId); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response along with {@link Response}. + */ + Response listRoleBindingNameListWithResponse(String resourceGroupName, + String organizationName, ListAccessRequestModel body, Context context); + + /** + * Organization role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the role binding names returned on successful response. + */ + AccessRoleBindingNameListSuccessResponse listRoleBindingNameList(String resourceGroupName, String organizationName, + ListAccessRequestModel body); } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessCreateRoleBindingRequestModel.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessCreateRoleBindingRequestModel.java new file mode 100644 index 000000000000..5ae350a95eef --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessCreateRoleBindingRequestModel.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create role binding request model. + */ +@Fluent +public final class AccessCreateRoleBindingRequestModel { + /* + * The principal User or Group to bind the role to + */ + @JsonProperty(value = "principal") + private String principal; + + /* + * The name of the role to bind to the principal + */ + @JsonProperty(value = "role_name") + private String roleName; + + /* + * A CRN that specifies the scope and resource patterns necessary for the role to bind + */ + @JsonProperty(value = "crn_pattern") + private String crnPattern; + + /** + * Creates an instance of AccessCreateRoleBindingRequestModel class. + */ + public AccessCreateRoleBindingRequestModel() { + } + + /** + * Get the principal property: The principal User or Group to bind the role to. + * + * @return the principal value. + */ + public String principal() { + return this.principal; + } + + /** + * Set the principal property: The principal User or Group to bind the role to. + * + * @param principal the principal value to set. + * @return the AccessCreateRoleBindingRequestModel object itself. + */ + public AccessCreateRoleBindingRequestModel withPrincipal(String principal) { + this.principal = principal; + return this; + } + + /** + * Get the roleName property: The name of the role to bind to the principal. + * + * @return the roleName value. + */ + public String roleName() { + return this.roleName; + } + + /** + * Set the roleName property: The name of the role to bind to the principal. + * + * @param roleName the roleName value to set. + * @return the AccessCreateRoleBindingRequestModel object itself. + */ + public AccessCreateRoleBindingRequestModel withRoleName(String roleName) { + this.roleName = roleName; + return this; + } + + /** + * Get the crnPattern property: A CRN that specifies the scope and resource patterns necessary for the role to + * bind. + * + * @return the crnPattern value. + */ + public String crnPattern() { + return this.crnPattern; + } + + /** + * Set the crnPattern property: A CRN that specifies the scope and resource patterns necessary for the role to + * bind. + * + * @param crnPattern the crnPattern value to set. + * @return the AccessCreateRoleBindingRequestModel object itself. + */ + public AccessCreateRoleBindingRequestModel withCrnPattern(String crnPattern) { + this.crnPattern = crnPattern; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListClusterSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListClusterSuccessResponse.java index fda1bc4e9c1f..0b6415472e5e 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListClusterSuccessResponse.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListClusterSuccessResponse.java @@ -26,7 +26,7 @@ public interface AccessListClusterSuccessResponse { ConfluentListMetadata metadata(); /** - * Gets the data property: Data of the environments list. + * Gets the data property: List of clusters. * * @return the data value. */ diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListEnvironmentsSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListEnvironmentsSuccessResponse.java index 02dca2f03a33..6481022ddeb2 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListEnvironmentsSuccessResponse.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListEnvironmentsSuccessResponse.java @@ -19,14 +19,14 @@ public interface AccessListEnvironmentsSuccessResponse { String kind(); /** - * Gets the metadata property: Metadata of the list. + * Gets the metadata property: Metadata of the environment list. * * @return the metadata value. */ ConfluentListMetadata metadata(); /** - * Gets the data property: Data of the environments list. + * Gets the data property: Environment list data. * * @return the data value. */ diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListRoleBindingsSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListRoleBindingsSuccessResponse.java index a102b86db33e..7316c91af807 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListRoleBindingsSuccessResponse.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessListRoleBindingsSuccessResponse.java @@ -26,7 +26,7 @@ public interface AccessListRoleBindingsSuccessResponse { ConfluentListMetadata metadata(); /** - * Gets the data property: Data of the environments list. + * Gets the data property: List of role binding. * * @return the data value. */ diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessRoleBindingNameListSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessRoleBindingNameListSuccessResponse.java new file mode 100644 index 000000000000..e1d530f444b0 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/AccessRoleBindingNameListSuccessResponse.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of AccessRoleBindingNameListSuccessResponse. + */ +public interface AccessRoleBindingNameListSuccessResponse { + /** + * Gets the kind property: Type of response. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the metadata property: Metadata of the list. + * + * @return the metadata value. + */ + ConfluentListMetadata metadata(); + + /** + * Gets the data property: List of role binding names. + * + * @return the data value. + */ + List data(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner + * object. + * + * @return the inner object. + */ + AccessRoleBindingNameListSuccessResponseInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyOwnerEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyOwnerEntity.java new file mode 100644 index 000000000000..5de30d35f8a0 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyOwnerEntity.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * API Key Owner details which can be a user or service account. + */ +@Fluent +public final class ApiKeyOwnerEntity { + /* + * API Key owner id + */ + @JsonProperty(value = "id") + private String id; + + /* + * API URL for accessing or modifying the referred object + */ + @JsonProperty(value = "related") + private String related; + + /* + * CRN reference to the referred resource + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /* + * Type of the owner service or user account + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Creates an instance of ApiKeyOwnerEntity class. + */ + public ApiKeyOwnerEntity() { + } + + /** + * Get the id property: API Key owner id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: API Key owner id. + * + * @param id the id value to set. + * @return the ApiKeyOwnerEntity object itself. + */ + public ApiKeyOwnerEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the related property: API URL for accessing or modifying the referred object. + * + * @return the related value. + */ + public String related() { + return this.related; + } + + /** + * Set the related property: API URL for accessing or modifying the referred object. + * + * @param related the related value to set. + * @return the ApiKeyOwnerEntity object itself. + */ + public ApiKeyOwnerEntity withRelated(String related) { + this.related = related; + return this; + } + + /** + * Get the resourceName property: CRN reference to the referred resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: CRN reference to the referred resource. + * + * @param resourceName the resourceName value to set. + * @return the ApiKeyOwnerEntity object itself. + */ + public ApiKeyOwnerEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the kind property: Type of the owner service or user account. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of the owner service or user account. + * + * @param kind the kind value to set. + * @return the ApiKeyOwnerEntity object itself. + */ + public ApiKeyOwnerEntity withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyRecord.java new file mode 100644 index 000000000000..737668e63176 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyRecord.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner; + +/** + * An immutable client-side representation of ApiKeyRecord. + */ +public interface ApiKeyRecord { + /** + * Gets the kind property: Type of api key. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the id property: Id of the api key. + * + * @return the id value. + */ + String id(); + + /** + * Gets the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + SCMetadataEntity metadata(); + + /** + * Gets the spec property: Specification of the API Key. + * + * @return the spec value. + */ + ApiKeySpecEntity spec(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner object. + * + * @return the inner object. + */ + ApiKeyRecordInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyResourceEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyResourceEntity.java new file mode 100644 index 000000000000..780e53b3a4cf --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeyResourceEntity.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * API Key Resource details which can be kafka cluster or schema registry cluster. + */ +@Fluent +public final class ApiKeyResourceEntity { + /* + * Id of the resource + */ + @JsonProperty(value = "id") + private String id; + + /* + * The environment of the api key + */ + @JsonProperty(value = "environment") + private String environment; + + /* + * API URL for accessing or modifying the api key resource object + */ + @JsonProperty(value = "related") + private String related; + + /* + * CRN reference to the referred resource + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /* + * Type of the owner which can be service or user account + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Creates an instance of ApiKeyResourceEntity class. + */ + public ApiKeyResourceEntity() { + } + + /** + * Get the id property: Id of the resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the resource. + * + * @param id the id value to set. + * @return the ApiKeyResourceEntity object itself. + */ + public ApiKeyResourceEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the environment property: The environment of the api key. + * + * @return the environment value. + */ + public String environment() { + return this.environment; + } + + /** + * Set the environment property: The environment of the api key. + * + * @param environment the environment value to set. + * @return the ApiKeyResourceEntity object itself. + */ + public ApiKeyResourceEntity withEnvironment(String environment) { + this.environment = environment; + return this; + } + + /** + * Get the related property: API URL for accessing or modifying the api key resource object. + * + * @return the related value. + */ + public String related() { + return this.related; + } + + /** + * Set the related property: API URL for accessing or modifying the api key resource object. + * + * @param related the related value to set. + * @return the ApiKeyResourceEntity object itself. + */ + public ApiKeyResourceEntity withRelated(String related) { + this.related = related; + return this; + } + + /** + * Get the resourceName property: CRN reference to the referred resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: CRN reference to the referred resource. + * + * @param resourceName the resourceName value to set. + * @return the ApiKeyResourceEntity object itself. + */ + public ApiKeyResourceEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the kind property: Type of the owner which can be service or user account. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of the owner which can be service or user account. + * + * @param kind the kind value to set. + * @return the ApiKeyResourceEntity object itself. + */ + public ApiKeyResourceEntity withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeySpecEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeySpecEntity.java new file mode 100644 index 000000000000..6134eaf67263 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ApiKeySpecEntity.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Spec of the API Key record. + */ +@Fluent +public final class ApiKeySpecEntity { + /* + * The description of the API Key + */ + @JsonProperty(value = "description") + private String description; + + /* + * The name of the API Key + */ + @JsonProperty(value = "name") + private String name; + + /* + * API Key Secret + */ + @JsonProperty(value = "secret") + private String secret; + + /* + * Specification of the cluster + */ + @JsonProperty(value = "resource") + private ApiKeyResourceEntity resource; + + /* + * Specification of the cluster + */ + @JsonProperty(value = "owner") + private ApiKeyOwnerEntity owner; + + /** + * Creates an instance of ApiKeySpecEntity class. + */ + public ApiKeySpecEntity() { + } + + /** + * Get the description property: The description of the API Key. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the API Key. + * + * @param description the description value to set. + * @return the ApiKeySpecEntity object itself. + */ + public ApiKeySpecEntity withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the name property: The name of the API Key. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the API Key. + * + * @param name the name value to set. + * @return the ApiKeySpecEntity object itself. + */ + public ApiKeySpecEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the secret property: API Key Secret. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: API Key Secret. + * + * @param secret the secret value to set. + * @return the ApiKeySpecEntity object itself. + */ + public ApiKeySpecEntity withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Get the resource property: Specification of the cluster. + * + * @return the resource value. + */ + public ApiKeyResourceEntity resource() { + return this.resource; + } + + /** + * Set the resource property: Specification of the cluster. + * + * @param resource the resource value to set. + * @return the ApiKeySpecEntity object itself. + */ + public ApiKeySpecEntity withResource(ApiKeyResourceEntity resource) { + this.resource = resource; + return this; + } + + /** + * Get the owner property: Specification of the cluster. + * + * @return the owner value. + */ + public ApiKeyOwnerEntity owner() { + return this.owner; + } + + /** + * Set the owner property: Specification of the cluster. + * + * @param owner the owner value to set. + * @return the ApiKeySpecEntity object itself. + */ + public ApiKeySpecEntity withOwner(ApiKeyOwnerEntity owner) { + this.owner = owner; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resource() != null) { + resource().validate(); + } + if (owner() != null) { + owner().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ClusterRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ClusterRecord.java index ef16c002c7ef..5e8128ec0e50 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ClusterRecord.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ClusterRecord.java @@ -8,18 +8,18 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Record of the environment. + * Details of cluster record. */ @Fluent public final class ClusterRecord { /* - * Type of environment + * Type of cluster */ @JsonProperty(value = "kind") private String kind; /* - * Id of the environment + * Id of the cluster */ @JsonProperty(value = "id") private String id; @@ -31,7 +31,7 @@ public final class ClusterRecord { private MetadataEntity metadata; /* - * Display name of the user + * Display name of the cluster */ @JsonProperty(value = "display_name") private String displayName; @@ -55,7 +55,7 @@ public ClusterRecord() { } /** - * Get the kind property: Type of environment. + * Get the kind property: Type of cluster. * * @return the kind value. */ @@ -64,7 +64,7 @@ public String kind() { } /** - * Set the kind property: Type of environment. + * Set the kind property: Type of cluster. * * @param kind the kind value to set. * @return the ClusterRecord object itself. @@ -75,7 +75,7 @@ public ClusterRecord withKind(String kind) { } /** - * Get the id property: Id of the environment. + * Get the id property: Id of the cluster. * * @return the id value. */ @@ -84,7 +84,7 @@ public String id() { } /** - * Set the id property: Id of the environment. + * Set the id property: Id of the cluster. * * @param id the id value to set. * @return the ClusterRecord object itself. @@ -115,7 +115,7 @@ public ClusterRecord withMetadata(MetadataEntity metadata) { } /** - * Get the displayName property: Display name of the user. + * Get the displayName property: Display name of the cluster. * * @return the displayName value. */ @@ -124,7 +124,7 @@ public String displayName() { } /** - * Set the displayName property: Display name of the user. + * Set the displayName property: Display name of the cluster. * * @param displayName the displayName value to set. * @return the ClusterRecord object itself. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/CreateApiKeyModel.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/CreateApiKeyModel.java new file mode 100644 index 000000000000..03f84c55879c --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/CreateApiKeyModel.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Create API Key model. + */ +@Fluent +public final class CreateApiKeyModel { + /* + * Name of the API Key + */ + @JsonProperty(value = "name") + private String name; + + /* + * Description of the API Key + */ + @JsonProperty(value = "description") + private String description; + + /** + * Creates an instance of CreateApiKeyModel class. + */ + public CreateApiKeyModel() { + } + + /** + * Get the name property: Name of the API Key. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the API Key. + * + * @param name the name value to set. + * @return the CreateApiKeyModel object itself. + */ + public CreateApiKeyModel withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Description of the API Key. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the API Key. + * + * @param description the description value to set. + * @return the CreateApiKeyModel object itself. + */ + public CreateApiKeyModel withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/EnvironmentRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/EnvironmentRecord.java index ca296587a9c9..61ea9ff4a004 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/EnvironmentRecord.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/EnvironmentRecord.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Record of the environment. + * Details about environment name, metadata and environment id of an environment. */ @Fluent public final class EnvironmentRecord { diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/GetEnvironmentsResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/GetEnvironmentsResponse.java new file mode 100644 index 000000000000..77dc0f69e041 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/GetEnvironmentsResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of GET request to list Confluent operations. + */ +@Fluent +public final class GetEnvironmentsResponse { + /* + * List of environments in a confluent organization + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of environment records if there are any. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of GetEnvironmentsResponse class. + */ + public GetEnvironmentsResponse() { + } + + /** + * Get the value property: List of environments in a confluent organization. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of environments in a confluent organization. + * + * @param value the value value to set. + * @return the GetEnvironmentsResponse object itself. + */ + public GetEnvironmentsResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of environment records if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of environment records if there are any. + * + * @param nextLink the nextLink value to set. + * @return the GetEnvironmentsResponse object itself. + */ + public GetEnvironmentsResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListClustersSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListClustersSuccessResponse.java new file mode 100644 index 000000000000..115fdb9150bc --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListClustersSuccessResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of GET request to list clusters in the environment of a confluent organization. + */ +@Fluent +public final class ListClustersSuccessResponse { + /* + * List of clusters in an environment of a confluent organization + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of cluster records if there are any. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ListClustersSuccessResponse class. + */ + public ListClustersSuccessResponse() { + } + + /** + * Get the value property: List of clusters in an environment of a confluent organization. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of clusters in an environment of a confluent organization. + * + * @param value the value value to set. + * @return the ListClustersSuccessResponse object itself. + */ + public ListClustersSuccessResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of cluster records if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of cluster records if there are any. + * + * @param nextLink the nextLink value to set. + * @return the ListClustersSuccessResponse object itself. + */ + public ListClustersSuccessResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListRegionsSuccessResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListRegionsSuccessResponse.java new file mode 100644 index 000000000000..ab7d8dedf819 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListRegionsSuccessResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of ListRegionsSuccessResponse. + */ +public interface ListRegionsSuccessResponse { + /** + * Gets the data property: List of regions supported by confluent. + * + * @return the data value. + */ + List data(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner object. + * + * @return the inner object. + */ + ListRegionsSuccessResponseInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListSchemaRegistryClustersResponse.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListSchemaRegistryClustersResponse.java new file mode 100644 index 000000000000..4169d3530a38 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/ListSchemaRegistryClustersResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of GET request to list schema registry clusters in the environment of a confluent organization. + */ +@Fluent +public final class ListSchemaRegistryClustersResponse { + /* + * List of schema registry clusters in an environment of a confluent organization + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of schema registry cluster records if there are any. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ListSchemaRegistryClustersResponse class. + */ + public ListSchemaRegistryClustersResponse() { + } + + /** + * Get the value property: List of schema registry clusters in an environment of a confluent organization. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of schema registry clusters in an environment of a confluent organization. + * + * @param value the value value to set. + * @return the ListSchemaRegistryClustersResponse object itself. + */ + public ListSchemaRegistryClustersResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of schema registry cluster records if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of schema registry cluster records if there are any. + * + * @param nextLink the nextLink value to set. + * @return the ListSchemaRegistryClustersResponse object itself. + */ + public ListSchemaRegistryClustersResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java index 074b3cdb45eb..f59edff6ff9f 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/OrganizationResource.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.confluent.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -182,7 +183,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @return the next definition stage. */ WithOfferDetail withExistingResourceGroup(String resourceGroupName); @@ -321,4 +322,27 @@ interface WithTags { * @return the refreshed resource. */ OrganizationResource refresh(Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response}. + */ + Response listRegionsWithResponse(ListAccessRequestModel body, Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent. + */ + ListRegionsSuccessResponse listRegions(ListAccessRequestModel body); } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Organizations.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Organizations.java index 3946f337803f..1147fad1172b 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Organizations.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Organizations.java @@ -35,7 +35,7 @@ public interface Organizations { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -46,7 +46,7 @@ public interface Organizations { /** * List all Organizations under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,7 +58,7 @@ public interface Organizations { /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +72,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Get the properties of a specific Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,7 +84,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,7 +95,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Delete Organization resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,6 +104,307 @@ Response getByResourceGroupWithResponse(String resourceGro */ void delete(String resourceGroupName, String organizationName, Context context); + /** + * Lists of all the environments in a organization. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + PagedIterable listEnvironments(String resourceGroupName, String organizationName); + + /** + * Lists of all the environments in a organization. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list Confluent operations as paginated response with {@link PagedIterable}. + */ + PagedIterable listEnvironments(String resourceGroupName, String organizationName, + Integer pageSize, String pageToken, Context context); + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id along with {@link Response}. + */ + Response getEnvironmentByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, Context context); + + /** + * Get Environment details by environment Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment details by environment Id. + */ + SCEnvironmentRecord getEnvironmentById(String resourceGroupName, String organizationName, String environmentId); + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + PagedIterable listClusters(String resourceGroupName, String organizationName, + String environmentId); + + /** + * Lists of all the clusters in a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list clusters in the environment of a confluent organization as paginated + * response with {@link PagedIterable}. + */ + PagedIterable listClusters(String resourceGroupName, String organizationName, String environmentId, + Integer pageSize, String pageToken, Context context); + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId); + + /** + * Get schema registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param pageSize Pagination size. + * @param pageToken An opaque pagination token to fetch the next set of records. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable listSchemaRegistryClusters(String resourceGroupName, + String organizationName, String environmentId, Integer pageSize, String pageToken, Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent along with {@link Response}. + */ + Response listRegionsWithResponse(String resourceGroupName, String organizationName, + ListAccessRequestModel body, Context context); + + /** + * cloud provider regions available for creating Schema Registry clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param body List Access Request Model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of POST request to list regions supported by confluent. + */ + ListRegionsSuccessResponse listRegions(String resourceGroupName, String organizationName, + ListAccessRequestModel body); + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key along with {@link Response}. + */ + Response createApiKeyWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, CreateApiKeyModel body, Context context); + + /** + * Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param body Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a + * environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details API key. + */ + ApiKeyRecord createApiKey(String resourceGroupName, String organizationName, String environmentId, String clusterId, + CreateApiKeyModel body); + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteClusterApiKeyWithResponse(String resourceGroupName, String organizationName, String apiKeyId, + Context context); + + /** + * Deletes API key of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId); + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster along with {@link Response}. + */ + Response getClusterApiKeyWithResponse(String resourceGroupName, String organizationName, + String apiKeyId, Context context); + + /** + * Get API key details of a kafka or schema registry cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param apiKeyId Confluent API Key id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aPI key details of a kafka or schema registry cluster. + */ + ApiKeyRecord getClusterApiKey(String resourceGroupName, String organizationName, String apiKeyId); + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id along with {@link Response}. + */ + Response getSchemaRegistryClusterByIdWithResponse(String resourceGroupName, + String organizationName, String environmentId, String clusterId, Context context); + + /** + * Get schema registry cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema registry cluster by Id. + */ + SchemaRegistryClusterRecord getSchemaRegistryClusterById(String resourceGroupName, String organizationName, + String environmentId, String clusterId); + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id along with {@link Response}. + */ + Response getClusterByIdWithResponse(String resourceGroupName, String organizationName, + String environmentId, String clusterId, Context context); + + /** + * Get cluster by Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param organizationName Organization resource name. + * @param environmentId Confluent environment id. + * @param clusterId Confluent kafka or schema registry cluster id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster by Id. + */ + SCClusterRecord getClusterById(String resourceGroupName, String organizationName, String environmentId, + String clusterId); + /** * Get the properties of a specific Organization resource. * diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionRecord.java new file mode 100644 index 000000000000..6464be608062 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionRecord.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confluent.fluent.models.RegionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of region record. + */ +@Fluent +public final class RegionRecord { + /* + * Kind of the cluster + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Id of the cluster + */ + @JsonProperty(value = "id") + private String id; + + /* + * Region Properties + */ + @JsonProperty(value = "properties") + private RegionProperties innerProperties; + + /** + * Creates an instance of RegionRecord class. + */ + public RegionRecord() { + } + + /** + * Get the kind property: Kind of the cluster. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of the cluster. + * + * @param kind the kind value to set. + * @return the RegionRecord object itself. + */ + public RegionRecord withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the id property: Id of the cluster. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Id of the cluster. + * + * @param id the id value to set. + * @return the RegionRecord object itself. + */ + public RegionRecord withId(String id) { + this.id = id; + return this; + } + + /** + * Get the innerProperties property: Region Properties. + * + * @return the innerProperties value. + */ + private RegionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + public SCMetadataEntity metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Metadata of the record. + * + * @param metadata the metadata value to set. + * @return the RegionRecord object itself. + */ + public RegionRecord withMetadata(SCMetadataEntity metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new RegionProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the spec property: Specification of the region. + * + * @return the spec value. + */ + public RegionSpecEntity spec() { + return this.innerProperties() == null ? null : this.innerProperties().spec(); + } + + /** + * Set the spec property: Specification of the region. + * + * @param spec the spec value to set. + * @return the RegionRecord object itself. + */ + public RegionRecord withSpec(RegionSpecEntity spec) { + if (this.innerProperties() == null) { + this.innerProperties = new RegionProperties(); + } + this.innerProperties().withSpec(spec); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionSpecEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionSpecEntity.java new file mode 100644 index 000000000000..0572837a4335 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RegionSpecEntity.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Region spec details. + */ +@Fluent +public final class RegionSpecEntity { + /* + * Display Name of the region + */ + @JsonProperty(value = "name") + private String name; + + /* + * Cloud provider name + */ + @JsonProperty(value = "cloud") + private String cloud; + + /* + * Region name + */ + @JsonProperty(value = "regionName") + private String regionName; + + /* + * The packages property. + */ + @JsonProperty(value = "packages") + private List packages; + + /** + * Creates an instance of RegionSpecEntity class. + */ + public RegionSpecEntity() { + } + + /** + * Get the name property: Display Name of the region. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Display Name of the region. + * + * @param name the name value to set. + * @return the RegionSpecEntity object itself. + */ + public RegionSpecEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the cloud property: Cloud provider name. + * + * @return the cloud value. + */ + public String cloud() { + return this.cloud; + } + + /** + * Set the cloud property: Cloud provider name. + * + * @param cloud the cloud value to set. + * @return the RegionSpecEntity object itself. + */ + public RegionSpecEntity withCloud(String cloud) { + this.cloud = cloud; + return this; + } + + /** + * Get the regionName property: Region name. + * + * @return the regionName value. + */ + public String regionName() { + return this.regionName; + } + + /** + * Set the regionName property: Region name. + * + * @param regionName the regionName value to set. + * @return the RegionSpecEntity object itself. + */ + public RegionSpecEntity withRegionName(String regionName) { + this.regionName = regionName; + return this; + } + + /** + * Get the packages property: The packages property. + * + * @return the packages value. + */ + public List packages() { + return this.packages; + } + + /** + * Set the packages property: The packages property. + * + * @param packages the packages value to set. + * @return the RegionSpecEntity object itself. + */ + public RegionSpecEntity withPackages(List packages) { + this.packages = packages; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RoleBindingRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RoleBindingRecord.java index 6d4aefb099b2..4fe3ef81162d 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RoleBindingRecord.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/RoleBindingRecord.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Record of the environment. + * Details on principal, role name and crn pattern of a role binding. */ @Fluent public final class RoleBindingRecord { @@ -19,7 +19,7 @@ public final class RoleBindingRecord { private String kind; /* - * Id of the role + * Id of the role binding */ @JsonProperty(value = "id") private String id; @@ -75,7 +75,7 @@ public RoleBindingRecord withKind(String kind) { } /** - * Get the id property: Id of the role. + * Get the id property: Id of the role binding. * * @return the id value. */ @@ -84,7 +84,7 @@ public String id() { } /** - * Set the id property: Id of the role. + * Set the id property: Id of the role binding. * * @param id the id value to set. * @return the RoleBindingRecord object itself. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterByokEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterByokEntity.java new file mode 100644 index 000000000000..32a6536074b7 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterByokEntity.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The network associated with this object. + */ +@Fluent +public final class SCClusterByokEntity { + /* + * ID of the referred resource + */ + @JsonProperty(value = "id") + private String id; + + /* + * API URL for accessing or modifying the referred object + */ + @JsonProperty(value = "related") + private String related; + + /* + * CRN reference to the referred resource + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Creates an instance of SCClusterByokEntity class. + */ + public SCClusterByokEntity() { + } + + /** + * Get the id property: ID of the referred resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: ID of the referred resource. + * + * @param id the id value to set. + * @return the SCClusterByokEntity object itself. + */ + public SCClusterByokEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the related property: API URL for accessing or modifying the referred object. + * + * @return the related value. + */ + public String related() { + return this.related; + } + + /** + * Set the related property: API URL for accessing or modifying the referred object. + * + * @param related the related value to set. + * @return the SCClusterByokEntity object itself. + */ + public SCClusterByokEntity withRelated(String related) { + this.related = related; + return this; + } + + /** + * Get the resourceName property: CRN reference to the referred resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: CRN reference to the referred resource. + * + * @param resourceName the resourceName value to set. + * @return the SCClusterByokEntity object itself. + */ + public SCClusterByokEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterNetworkEnvironmentEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterNetworkEnvironmentEntity.java new file mode 100644 index 000000000000..855f37875964 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterNetworkEnvironmentEntity.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The environment or the network to which cluster belongs. + */ +@Fluent +public final class SCClusterNetworkEnvironmentEntity { + /* + * ID of the referred resource + */ + @JsonProperty(value = "id") + private String id; + + /* + * Environment of the referred resource + */ + @JsonProperty(value = "environment") + private String environment; + + /* + * API URL for accessing or modifying the referred object + */ + @JsonProperty(value = "related") + private String related; + + /* + * CRN reference to the referred resource + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Creates an instance of SCClusterNetworkEnvironmentEntity class. + */ + public SCClusterNetworkEnvironmentEntity() { + } + + /** + * Get the id property: ID of the referred resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: ID of the referred resource. + * + * @param id the id value to set. + * @return the SCClusterNetworkEnvironmentEntity object itself. + */ + public SCClusterNetworkEnvironmentEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the environment property: Environment of the referred resource. + * + * @return the environment value. + */ + public String environment() { + return this.environment; + } + + /** + * Set the environment property: Environment of the referred resource. + * + * @param environment the environment value to set. + * @return the SCClusterNetworkEnvironmentEntity object itself. + */ + public SCClusterNetworkEnvironmentEntity withEnvironment(String environment) { + this.environment = environment; + return this; + } + + /** + * Get the related property: API URL for accessing or modifying the referred object. + * + * @return the related value. + */ + public String related() { + return this.related; + } + + /** + * Set the related property: API URL for accessing or modifying the referred object. + * + * @param related the related value to set. + * @return the SCClusterNetworkEnvironmentEntity object itself. + */ + public SCClusterNetworkEnvironmentEntity withRelated(String related) { + this.related = related; + return this; + } + + /** + * Get the resourceName property: CRN reference to the referred resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: CRN reference to the referred resource. + * + * @param resourceName the resourceName value to set. + * @return the SCClusterNetworkEnvironmentEntity object itself. + */ + public SCClusterNetworkEnvironmentEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterRecord.java new file mode 100644 index 000000000000..1824b1ba6ed7 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterRecord.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; + +/** + * An immutable client-side representation of SCClusterRecord. + */ +public interface SCClusterRecord { + /** + * Gets the kind property: Type of cluster. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the id property: Id of the cluster. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Display name of the cluster. + * + * @return the name value. + */ + String name(); + + /** + * Gets the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + SCMetadataEntity metadata(); + + /** + * Gets the spec property: Specification of the cluster. + * + * @return the spec value. + */ + SCClusterSpecEntity spec(); + + /** + * Gets the status property: Specification of the cluster status. + * + * @return the status value. + */ + ClusterStatusEntity status(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner object. + * + * @return the inner object. + */ + SCClusterRecordInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterSpecEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterSpecEntity.java new file mode 100644 index 000000000000..670a15e22545 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCClusterSpecEntity.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Spec of the cluster record. + */ +@Fluent +public final class SCClusterSpecEntity { + /* + * The name of the cluster + */ + @JsonProperty(value = "name") + private String name; + + /* + * The availability zone configuration of the cluster + */ + @JsonProperty(value = "availability") + private String availability; + + /* + * The cloud service provider + */ + @JsonProperty(value = "cloud") + private String cloud; + + /* + * type of zone availability + */ + @JsonProperty(value = "zone") + private String zone; + + /* + * The cloud service provider region + */ + @JsonProperty(value = "region") + private String region; + + /* + * The bootstrap endpoint used by Kafka clients to connect to the cluster + */ + @JsonProperty(value = "kafkaBootstrapEndpoint") + private String kafkaBootstrapEndpoint; + + /* + * The cluster HTTP request URL. + */ + @JsonProperty(value = "httpEndpoint") + private String httpEndpoint; + + /* + * The Kafka API cluster endpoint + */ + @JsonProperty(value = "apiEndpoint") + private String apiEndpoint; + + /* + * Specification of the cluster configuration + */ + @JsonProperty(value = "config") + private ClusterConfigEntity config; + + /* + * Specification of the cluster environment + */ + @JsonProperty(value = "environment") + private SCClusterNetworkEnvironmentEntity environment; + + /* + * Specification of the cluster network + */ + @JsonProperty(value = "network") + private SCClusterNetworkEnvironmentEntity network; + + /* + * Specification of the cluster byok + */ + @JsonProperty(value = "byok") + private SCClusterByokEntity byok; + + /** + * Creates an instance of SCClusterSpecEntity class. + */ + public SCClusterSpecEntity() { + } + + /** + * Get the name property: The name of the cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the cluster. + * + * @param name the name value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the availability property: The availability zone configuration of the cluster. + * + * @return the availability value. + */ + public String availability() { + return this.availability; + } + + /** + * Set the availability property: The availability zone configuration of the cluster. + * + * @param availability the availability value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withAvailability(String availability) { + this.availability = availability; + return this; + } + + /** + * Get the cloud property: The cloud service provider. + * + * @return the cloud value. + */ + public String cloud() { + return this.cloud; + } + + /** + * Set the cloud property: The cloud service provider. + * + * @param cloud the cloud value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withCloud(String cloud) { + this.cloud = cloud; + return this; + } + + /** + * Get the zone property: type of zone availability. + * + * @return the zone value. + */ + public String zone() { + return this.zone; + } + + /** + * Set the zone property: type of zone availability. + * + * @param zone the zone value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withZone(String zone) { + this.zone = zone; + return this; + } + + /** + * Get the region property: The cloud service provider region. + * + * @return the region value. + */ + public String region() { + return this.region; + } + + /** + * Set the region property: The cloud service provider region. + * + * @param region the region value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the kafkaBootstrapEndpoint property: The bootstrap endpoint used by Kafka clients to connect to the cluster. + * + * @return the kafkaBootstrapEndpoint value. + */ + public String kafkaBootstrapEndpoint() { + return this.kafkaBootstrapEndpoint; + } + + /** + * Set the kafkaBootstrapEndpoint property: The bootstrap endpoint used by Kafka clients to connect to the cluster. + * + * @param kafkaBootstrapEndpoint the kafkaBootstrapEndpoint value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withKafkaBootstrapEndpoint(String kafkaBootstrapEndpoint) { + this.kafkaBootstrapEndpoint = kafkaBootstrapEndpoint; + return this; + } + + /** + * Get the httpEndpoint property: The cluster HTTP request URL. + * + * @return the httpEndpoint value. + */ + public String httpEndpoint() { + return this.httpEndpoint; + } + + /** + * Set the httpEndpoint property: The cluster HTTP request URL. + * + * @param httpEndpoint the httpEndpoint value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withHttpEndpoint(String httpEndpoint) { + this.httpEndpoint = httpEndpoint; + return this; + } + + /** + * Get the apiEndpoint property: The Kafka API cluster endpoint. + * + * @return the apiEndpoint value. + */ + public String apiEndpoint() { + return this.apiEndpoint; + } + + /** + * Set the apiEndpoint property: The Kafka API cluster endpoint. + * + * @param apiEndpoint the apiEndpoint value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withApiEndpoint(String apiEndpoint) { + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * Get the config property: Specification of the cluster configuration. + * + * @return the config value. + */ + public ClusterConfigEntity config() { + return this.config; + } + + /** + * Set the config property: Specification of the cluster configuration. + * + * @param config the config value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withConfig(ClusterConfigEntity config) { + this.config = config; + return this; + } + + /** + * Get the environment property: Specification of the cluster environment. + * + * @return the environment value. + */ + public SCClusterNetworkEnvironmentEntity environment() { + return this.environment; + } + + /** + * Set the environment property: Specification of the cluster environment. + * + * @param environment the environment value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withEnvironment(SCClusterNetworkEnvironmentEntity environment) { + this.environment = environment; + return this; + } + + /** + * Get the network property: Specification of the cluster network. + * + * @return the network value. + */ + public SCClusterNetworkEnvironmentEntity network() { + return this.network; + } + + /** + * Set the network property: Specification of the cluster network. + * + * @param network the network value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withNetwork(SCClusterNetworkEnvironmentEntity network) { + this.network = network; + return this; + } + + /** + * Get the byok property: Specification of the cluster byok. + * + * @return the byok value. + */ + public SCClusterByokEntity byok() { + return this.byok; + } + + /** + * Set the byok property: Specification of the cluster byok. + * + * @param byok the byok value to set. + * @return the SCClusterSpecEntity object itself. + */ + public SCClusterSpecEntity withByok(SCClusterByokEntity byok) { + this.byok = byok; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (config() != null) { + config().validate(); + } + if (environment() != null) { + environment().validate(); + } + if (network() != null) { + network().validate(); + } + if (byok() != null) { + byok().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCEnvironmentRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCEnvironmentRecord.java new file mode 100644 index 000000000000..2396cb1ca85f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCEnvironmentRecord.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; + +/** + * An immutable client-side representation of SCEnvironmentRecord. + */ +public interface SCEnvironmentRecord { + /** + * Gets the kind property: Type of environment. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the id property: Id of the environment. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Display name of the environment. + * + * @return the name value. + */ + String name(); + + /** + * Gets the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + SCMetadataEntity metadata(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner object. + * + * @return the inner object. + */ + SCEnvironmentRecordInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCMetadataEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCMetadataEntity.java new file mode 100644 index 000000000000..3fe85ea220a8 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SCMetadataEntity.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata of the data record. + */ +@Fluent +public final class SCMetadataEntity { + /* + * Self lookup url + */ + @JsonProperty(value = "self") + private String self; + + /* + * Resource name of the record + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /* + * Created Date Time + */ + @JsonProperty(value = "createdTimestamp") + private String createdTimestamp; + + /* + * Updated Date time + */ + @JsonProperty(value = "updatedTimestamp") + private String updatedTimestamp; + + /* + * Deleted Date time + */ + @JsonProperty(value = "deletedTimestamp") + private String deletedTimestamp; + + /** + * Creates an instance of SCMetadataEntity class. + */ + public SCMetadataEntity() { + } + + /** + * Get the self property: Self lookup url. + * + * @return the self value. + */ + public String self() { + return this.self; + } + + /** + * Set the self property: Self lookup url. + * + * @param self the self value to set. + * @return the SCMetadataEntity object itself. + */ + public SCMetadataEntity withSelf(String self) { + this.self = self; + return this; + } + + /** + * Get the resourceName property: Resource name of the record. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: Resource name of the record. + * + * @param resourceName the resourceName value to set. + * @return the SCMetadataEntity object itself. + */ + public SCMetadataEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the createdTimestamp property: Created Date Time. + * + * @return the createdTimestamp value. + */ + public String createdTimestamp() { + return this.createdTimestamp; + } + + /** + * Set the createdTimestamp property: Created Date Time. + * + * @param createdTimestamp the createdTimestamp value to set. + * @return the SCMetadataEntity object itself. + */ + public SCMetadataEntity withCreatedTimestamp(String createdTimestamp) { + this.createdTimestamp = createdTimestamp; + return this; + } + + /** + * Get the updatedTimestamp property: Updated Date time. + * + * @return the updatedTimestamp value. + */ + public String updatedTimestamp() { + return this.updatedTimestamp; + } + + /** + * Set the updatedTimestamp property: Updated Date time. + * + * @param updatedTimestamp the updatedTimestamp value to set. + * @return the SCMetadataEntity object itself. + */ + public SCMetadataEntity withUpdatedTimestamp(String updatedTimestamp) { + this.updatedTimestamp = updatedTimestamp; + return this; + } + + /** + * Get the deletedTimestamp property: Deleted Date time. + * + * @return the deletedTimestamp value. + */ + public String deletedTimestamp() { + return this.deletedTimestamp; + } + + /** + * Set the deletedTimestamp property: Deleted Date time. + * + * @param deletedTimestamp the deletedTimestamp value to set. + * @return the SCMetadataEntity object itself. + */ + public SCMetadataEntity withDeletedTimestamp(String deletedTimestamp) { + this.deletedTimestamp = deletedTimestamp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterEnvironmentRegionEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterEnvironmentRegionEntity.java new file mode 100644 index 000000000000..cde7276bbcc3 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterEnvironmentRegionEntity.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The environment associated with this object. + */ +@Fluent +public final class SchemaRegistryClusterEnvironmentRegionEntity { + /* + * ID of the referred resource + */ + @JsonProperty(value = "id") + private String id; + + /* + * API URL for accessing or modifying the referred object + */ + @JsonProperty(value = "related") + private String related; + + /* + * CRN reference to the referred resource + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Creates an instance of SchemaRegistryClusterEnvironmentRegionEntity class. + */ + public SchemaRegistryClusterEnvironmentRegionEntity() { + } + + /** + * Get the id property: ID of the referred resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: ID of the referred resource. + * + * @param id the id value to set. + * @return the SchemaRegistryClusterEnvironmentRegionEntity object itself. + */ + public SchemaRegistryClusterEnvironmentRegionEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the related property: API URL for accessing or modifying the referred object. + * + * @return the related value. + */ + public String related() { + return this.related; + } + + /** + * Set the related property: API URL for accessing or modifying the referred object. + * + * @param related the related value to set. + * @return the SchemaRegistryClusterEnvironmentRegionEntity object itself. + */ + public SchemaRegistryClusterEnvironmentRegionEntity withRelated(String related) { + this.related = related; + return this; + } + + /** + * Get the resourceName property: CRN reference to the referred resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: CRN reference to the referred resource. + * + * @param resourceName the resourceName value to set. + * @return the SchemaRegistryClusterEnvironmentRegionEntity object itself. + */ + public SchemaRegistryClusterEnvironmentRegionEntity withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterRecord.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterRecord.java new file mode 100644 index 000000000000..06c2f45b6da6 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterRecord.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; + +/** + * An immutable client-side representation of SchemaRegistryClusterRecord. + */ +public interface SchemaRegistryClusterRecord { + /** + * Gets the kind property: Kind of the cluster. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the id property: Id of the cluster. + * + * @return the id value. + */ + String id(); + + /** + * Gets the metadata property: Metadata of the record. + * + * @return the metadata value. + */ + SCMetadataEntity metadata(); + + /** + * Gets the spec property: Specification of the schema registry cluster. + * + * @return the spec value. + */ + SchemaRegistryClusterSpecEntity spec(); + + /** + * Gets the status property: Specification of the cluster status. + * + * @return the status value. + */ + SchemaRegistryClusterStatusEntity status(); + + /** + * Gets the inner com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner object. + * + * @return the inner object. + */ + SchemaRegistryClusterRecordInner innerModel(); +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterSpecEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterSpecEntity.java new file mode 100644 index 000000000000..d5344cfd11e9 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterSpecEntity.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of schema registry cluster spec. + */ +@Fluent +public final class SchemaRegistryClusterSpecEntity { + /* + * Name of the schema registry cluster + */ + @JsonProperty(value = "name") + private String name; + + /* + * Http endpoint of the cluster + */ + @JsonProperty(value = "httpEndpoint") + private String httpEndpoint; + + /* + * Type of the cluster package Advanced, essentials + */ + @JsonProperty(value = "package") + private String packageProperty; + + /* + * Region details of the schema registry cluster + */ + @JsonProperty(value = "region") + private SchemaRegistryClusterEnvironmentRegionEntity region; + + /* + * Environment details of the schema registry cluster + */ + @JsonProperty(value = "environment") + private SchemaRegistryClusterEnvironmentRegionEntity environment; + + /* + * The cloud service provider + */ + @JsonProperty(value = "cloud") + private String cloud; + + /** + * Creates an instance of SchemaRegistryClusterSpecEntity class. + */ + public SchemaRegistryClusterSpecEntity() { + } + + /** + * Get the name property: Name of the schema registry cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the schema registry cluster. + * + * @param name the name value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the httpEndpoint property: Http endpoint of the cluster. + * + * @return the httpEndpoint value. + */ + public String httpEndpoint() { + return this.httpEndpoint; + } + + /** + * Set the httpEndpoint property: Http endpoint of the cluster. + * + * @param httpEndpoint the httpEndpoint value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withHttpEndpoint(String httpEndpoint) { + this.httpEndpoint = httpEndpoint; + return this; + } + + /** + * Get the packageProperty property: Type of the cluster package Advanced, essentials. + * + * @return the packageProperty value. + */ + public String packageProperty() { + return this.packageProperty; + } + + /** + * Set the packageProperty property: Type of the cluster package Advanced, essentials. + * + * @param packageProperty the packageProperty value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withPackageProperty(String packageProperty) { + this.packageProperty = packageProperty; + return this; + } + + /** + * Get the region property: Region details of the schema registry cluster. + * + * @return the region value. + */ + public SchemaRegistryClusterEnvironmentRegionEntity region() { + return this.region; + } + + /** + * Set the region property: Region details of the schema registry cluster. + * + * @param region the region value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withRegion(SchemaRegistryClusterEnvironmentRegionEntity region) { + this.region = region; + return this; + } + + /** + * Get the environment property: Environment details of the schema registry cluster. + * + * @return the environment value. + */ + public SchemaRegistryClusterEnvironmentRegionEntity environment() { + return this.environment; + } + + /** + * Set the environment property: Environment details of the schema registry cluster. + * + * @param environment the environment value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withEnvironment(SchemaRegistryClusterEnvironmentRegionEntity environment) { + this.environment = environment; + return this; + } + + /** + * Get the cloud property: The cloud service provider. + * + * @return the cloud value. + */ + public String cloud() { + return this.cloud; + } + + /** + * Set the cloud property: The cloud service provider. + * + * @param cloud the cloud value to set. + * @return the SchemaRegistryClusterSpecEntity object itself. + */ + public SchemaRegistryClusterSpecEntity withCloud(String cloud) { + this.cloud = cloud; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (region() != null) { + region().validate(); + } + if (environment() != null) { + environment().validate(); + } + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterStatusEntity.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterStatusEntity.java new file mode 100644 index 000000000000..bb38ca321ba0 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/SchemaRegistryClusterStatusEntity.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Status of the schema registry cluster record. + */ +@Fluent +public final class SchemaRegistryClusterStatusEntity { + /* + * The lifecycle phase of the cluster + */ + @JsonProperty(value = "phase") + private String phase; + + /** + * Creates an instance of SchemaRegistryClusterStatusEntity class. + */ + public SchemaRegistryClusterStatusEntity() { + } + + /** + * Get the phase property: The lifecycle phase of the cluster. + * + * @return the phase value. + */ + public String phase() { + return this.phase; + } + + /** + * Set the phase property: The lifecycle phase of the cluster. + * + * @param phase the phase value to set. + * @return the SchemaRegistryClusterStatusEntity object itself. + */ + public SchemaRegistryClusterStatusEntity withPhase(String phase) { + this.phase = phase; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Validations.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Validations.java index 32d9bae53f75..dde40740bb3f 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Validations.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/models/Validations.java @@ -15,7 +15,7 @@ public interface Validations { /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -30,7 +30,7 @@ Response validateOrganizationWithResponse(String resourceG /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,7 +44,7 @@ OrganizationResource validateOrganization(String resourceGroupName, String organ /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @param context The context to associate with this operation. @@ -59,7 +59,7 @@ Response validateOrganizationV2WithResponse(String resourceG /** * Organization Validate proxy resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Resource group name. * @param organizationName Organization resource name. * @param body Organization resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/module-info.java b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/module-info.java index 074b073bf483..d2bda5487cba 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/java/module-info.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/java/module-info.java @@ -4,12 +4,10 @@ module com.azure.resourcemanager.confluent { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.confluent; exports com.azure.resourcemanager.confluent.fluent; exports com.azure.resourcemanager.confluent.fluent.models; exports com.azure.resourcemanager.confluent.models; - opens com.azure.resourcemanager.confluent.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.confluent.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confluent/reflect-config.json b/sdk/confluent/azure-resourcemanager-confluent/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confluent/reflect-config.json index 127ecf52333f..5147677cd0f5 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confluent/reflect-config.json +++ b/sdk/confluent/azure-resourcemanager-confluent/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confluent/reflect-config.json @@ -183,6 +183,146 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.GetEnvironmentsResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.EnvironmentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SCMetadataEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.ListClustersSuccessResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.ClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SCClusterSpecEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SCClusterByokEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.ListSchemaRegistryClustersResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.RegionRecord", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.RegionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.RegionSpecEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.CreateApiKeyModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.ApiKeyRecordInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.fluent.models.ApiKeyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.ApiKeySpecEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.ApiKeyResourceEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.confluent.models.ApiKeyOwnerEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.confluent.models.ProvisionState", "allDeclaredConstructors" : true, diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingSamples.java new file mode 100644 index 000000000000..bfa10615dcbf --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; + +/** + * Samples for Access CreateRoleBinding. + */ +public final class AccessCreateRoleBindingSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding. + * json + */ + /** + * Sample code: Access_CreateRoleBinding. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessCreateRoleBinding(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().createRoleBindingWithResponse("myResourceGroup", "myOrganization", + new AccessCreateRoleBindingRequestModel().withPrincipal("User:u-111aaa").withRoleName("CloudClusterAdmin") + .withCrnPattern( + "crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingSamples.java new file mode 100644 index 000000000000..74795c258418 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Access DeleteRoleBinding. + */ +public final class AccessDeleteRoleBindingSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding. + * json + */ + /** + * Sample code: Access_DeleteRoleBinding. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessDeleteRoleBinding(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().deleteRoleBindingWithResponse("myResourceGroup", "myOrganization", "dlz-f3a90de", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserSamples.java index f93a052124c1..4753851e4755 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserSamples.java @@ -13,7 +13,7 @@ public final class AccessInviteUserSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InviteUser.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json */ /** * Sample code: Access_InviteUser. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListClustersSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListClustersSamples.java index 09e61bc535e8..01b3156b1e57 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListClustersSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListClustersSamples.java @@ -14,7 +14,7 @@ public final class AccessListClustersSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_ClusterList.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json */ /** * Sample code: Access_ClusterList. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsSamples.java index fa94baf15094..6fb16bfd2248 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsSamples.java @@ -14,7 +14,7 @@ public final class AccessListEnvironmentsSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_EnvironmentList. + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList. * json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsSamples.java index 451c72a2a5d8..1aab342a80cb 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsSamples.java @@ -14,7 +14,7 @@ public final class AccessListInvitationsSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_InvitationsList. + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList. * json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListSamples.java new file mode 100644 index 000000000000..71c9f3406811 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Access ListRoleBindingNameList. + */ +public final class AccessListRoleBindingNameListSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Access_RoleBindingNameList.json + */ + /** + * Sample code: Access_RoleBindingNameList. + * + * @param manager Entry point to ConfluentManager. + */ + public static void accessRoleBindingNameList(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.access().listRoleBindingNameListWithResponse("myResourceGroup", "myOrganization", + new ListAccessRequestModel().withSearchFilters(mapOf("crn_pattern", + "crn://confluent.cloud/organization=1aa7de07-298e-479c-8f2f-16ac91fd8e76", "namespace", + "public,dataplane,networking,identity,datagovernance,connect,streamcatalog,pipelines,ksql")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsSamples.java index 08cf3f78797a..396cbeeb868c 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsSamples.java @@ -14,7 +14,7 @@ public final class AccessListRoleBindingsSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_RoleBindingList. + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList. * json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsSamples.java index 84f622c51006..bb49ccc6042f 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsSamples.java @@ -13,7 +13,7 @@ */ public final class AccessListServiceAccountsSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * Access_ServiceAccountsList.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListUsersSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListUsersSamples.java index b1af1ff14b27..af9dda39484c 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListUsersSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/AccessListUsersSamples.java @@ -14,7 +14,7 @@ public final class AccessListUsersSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Access_UsersList.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json */ /** * Sample code: Access_UsersList. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateSamples.java index 9d19d658de9a..17406021a0cc 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceAgreementsCreateSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * MarketplaceAgreements_Create.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListSamples.java index 5d65608c12d6..bd445943d0bc 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceAgreementsListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * MarketplaceAgreements_List.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateApiKeySamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateApiKeySamples.java new file mode 100644 index 000000000000..4f0cdcfeb38f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateApiKeySamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; + +/** + * Samples for Organization CreateApiKey. + */ +public final class OrganizationCreateApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_CreateClusterAPIKey.json + */ + /** + * Sample code: Organization_CreateAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationCreateAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().createApiKeyWithResponse( + "myResourceGroup", "myOrganization", "env-12132", "clusterId-123", new CreateApiKeyModel() + .withName("CI kafka access key").withDescription("This API key provides kafka access to cluster x"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateSamples.java index db01d006f4bc..99e4bf3b260f 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationCreateSamples.java @@ -17,7 +17,7 @@ public final class OrganizationCreateSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Create.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json */ /** * Sample code: Organization_Create. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteClusterApiKeySamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteClusterApiKeySamples.java new file mode 100644 index 000000000000..8c2177861320 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteClusterApiKeySamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization DeleteClusterApiKey. + */ +public final class OrganizationDeleteClusterApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_DeleteClusterAPIKey.json + */ + /** + * Sample code: Organization_DeleteClusterAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationDeleteClusterAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().deleteClusterApiKeyWithResponse("myResourceGroup", "myOrganization", "ZFZ6SZZZWGYBEIFB", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteSamples.java index 27b9453bbfc4..d320cb003005 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationDeleteSamples.java @@ -10,7 +10,7 @@ public final class OrganizationDeleteSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Delete.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json */ /** * Sample code: Confluent_Delete. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetByResourceGroupSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetByResourceGroupSamples.java index 76f111765c7a..fe40b7424636 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetByResourceGroupSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class OrganizationGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Get.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json */ /** * Sample code: Organization_Get. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterApiKeySamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterApiKeySamples.java new file mode 100644 index 000000000000..3ff9ffe62d60 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterApiKeySamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization GetClusterApiKey. + */ +public final class OrganizationGetClusterApiKeySamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetClusterAPIKey.json + */ + /** + * Sample code: Organization_GetClusterAPIKey. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetClusterAPIKey(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getClusterApiKeyWithResponse("myResourceGroup", "myOrganization", "apiKeyId-123", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterByIdSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterByIdSamples.java new file mode 100644 index 000000000000..580a75e7f1b0 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetClusterByIdSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization GetClusterById. + */ +public final class OrganizationGetClusterByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetClusterById.json + */ + /** + * Sample code: Organization_GetClusterById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetClusterById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getClusterByIdWithResponse("myResourceGroup", "myOrganization", "env-12132", + "dlz-f3a90de", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetEnvironmentByIdSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetEnvironmentByIdSamples.java new file mode 100644 index 000000000000..b72cccd3d409 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetEnvironmentByIdSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization GetEnvironmentById. + */ +public final class OrganizationGetEnvironmentByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetEnvironmentById.json + */ + /** + * Sample code: Organization_GetEnvironmentById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationGetEnvironmentById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getEnvironmentByIdWithResponse("myResourceGroup", "myOrganization", "dlz-f3a90de", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetSchemaRegistryClusterByIdSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetSchemaRegistryClusterByIdSamples.java new file mode 100644 index 000000000000..da584b03de01 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationGetSchemaRegistryClusterByIdSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization GetSchemaRegistryClusterById. + */ +public final class OrganizationGetSchemaRegistryClusterByIdSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_GetSchemaRegistryClusterById.json + */ + /** + * Sample code: Organization_GetSchemaRegistryClusterById. + * + * @param manager Entry point to ConfluentManager. + */ + public static void + organizationGetSchemaRegistryClusterById(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().getSchemaRegistryClusterByIdWithResponse("myResourceGroup", "myOrganization", + "env-stgcczjp2j3", "lsrc-stgczkq22z", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListByResourceGroupSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListByResourceGroupSamples.java index b9de4b954ba1..1ac26a5e67b3 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListByResourceGroupSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class OrganizationListByResourceGroupSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * Organization_ListByResourceGroup.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListClustersSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListClustersSamples.java new file mode 100644 index 000000000000..54bdc5d07449 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListClustersSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization ListClusters. + */ +public final class OrganizationListClustersSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList. + * json + */ + /** + * Sample code: Organization_ListClusters. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListClusters(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listClusters("myResourceGroup", "myOrganization", "env-12132", 10, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListEnvironmentsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListEnvironmentsSamples.java new file mode 100644 index 000000000000..365a68c15f7a --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListEnvironmentsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization ListEnvironments. + */ +public final class OrganizationListEnvironmentsSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_EnvironmentList.json + */ + /** + * Sample code: Organization_ListEnvironments. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListEnvironments(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listEnvironments("myResourceGroup", "myOrganization", 10, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListRegionsSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListRegionsSamples.java new file mode 100644 index 000000000000..3e9aa7e61237 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListRegionsSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Organization ListRegions. + */ +public final class OrganizationListRegionsSamples { + /* + * x-ms-original-file: + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions. + * json + */ + /** + * Sample code: Organization_ListRegions. + * + * @param manager Entry point to ConfluentManager. + */ + public static void organizationListRegions(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listRegionsWithResponse("myResourceGroup", "myOrganization", + new ListAccessRequestModel() + .withSearchFilters(mapOf("cloud", "azure", "packages", "ADVANCED,ESSENTIALS", "region", "eastus")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSamples.java index b019e4375c65..a4c58397030b 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSamples.java @@ -9,7 +9,7 @@ */ public final class OrganizationListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * Organization_ListBySubscription.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSchemaRegistryClustersSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSchemaRegistryClustersSamples.java new file mode 100644 index 000000000000..b2824c81d1db --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationListSchemaRegistryClustersSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +/** + * Samples for Organization ListSchemaRegistryClusters. + */ +public final class OrganizationListSchemaRegistryClustersSamples { + /* + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ + * Organization_ListSchemaRegistryClusters.json + */ + /** + * Sample code: Organization_ListSchemaRegistryClusters. + * + * @param manager Entry point to ConfluentManager. + */ + public static void + organizationListSchemaRegistryClusters(com.azure.resourcemanager.confluent.ConfluentManager manager) { + manager.organizations().listSchemaRegistryClusters("myResourceGroup", "myOrganization", "env-stgcczjp2j3", null, + null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListSamples.java index 0d3fbd6b6903..f7e9b3da5c2c 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OrganizationOperationsListSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * OrganizationOperations_List.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationUpdateSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationUpdateSamples.java index 42039476357a..704d85e155f3 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationUpdateSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/OrganizationUpdateSamples.java @@ -14,7 +14,7 @@ public final class OrganizationUpdateSamples { /* * x-ms-original-file: - * specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/Organization_Update.json + * specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json */ /** * Sample code: Confluent_Update. diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationSamples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationSamples.java index 8e7dd1ccedea..b612fab64e0a 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationSamples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationSamples.java @@ -16,7 +16,7 @@ */ public final class ValidationsValidateOrganizationSamples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * Validations_ValidateOrganizations.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationV2Samples.java b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationV2Samples.java index 0583e45c58b2..d2ccb817e66e 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationV2Samples.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/samples/java/com/azure/resourcemanager/confluent/generated/ValidationsValidateOrganizationV2Samples.java @@ -16,7 +16,7 @@ */ public final class ValidationsValidateOrganizationV2Samples { /* - * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2023-08-22/examples/ + * x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/ * Validations_ValidateOrganizationsV2.json */ /** diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingRequestModelTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingRequestModelTests.java new file mode 100644 index 000000000000..5a11611706fd --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingRequestModelTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; +import org.junit.jupiter.api.Assertions; + +public final class AccessCreateRoleBindingRequestModelTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessCreateRoleBindingRequestModel model = BinaryData + .fromString("{\"principal\":\"i\",\"role_name\":\"byuqerpqlp\",\"crn_pattern\":\"cciuqgbdbutau\"}") + .toObject(AccessCreateRoleBindingRequestModel.class); + Assertions.assertEquals("i", model.principal()); + Assertions.assertEquals("byuqerpqlp", model.roleName()); + Assertions.assertEquals("cciuqgbdbutau", model.crnPattern()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessCreateRoleBindingRequestModel model = new AccessCreateRoleBindingRequestModel().withPrincipal("i") + .withRoleName("byuqerpqlp").withCrnPattern("cciuqgbdbutau"); + model = BinaryData.fromObject(model).toObject(AccessCreateRoleBindingRequestModel.class); + Assertions.assertEquals("i", model.principal()); + Assertions.assertEquals("byuqerpqlp", model.roleName()); + Assertions.assertEquals("cciuqgbdbutau", model.crnPattern()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingWithResponseMockTests.java new file mode 100644 index 000000000000..a69f8cae14cc --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessCreateRoleBindingWithResponseMockTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.AccessCreateRoleBindingRequestModel; +import com.azure.resourcemanager.confluent.models.RoleBindingRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class AccessCreateRoleBindingWithResponseMockTests { + @Test + public void testCreateRoleBindingWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"kind\":\"njlx\",\"id\":\"rhwpus\",\"metadata\":{\"self\":\"aqehg\",\"resource_name\":\"ohzjqatucoigeb\",\"created_at\":\"cnwfepbnwgfmxjg\",\"updated_at\":\"bjb\",\"deleted_at\":\"lfgtdysnaquflqbc\"},\"principal\":\"hamzjrwdkqze\",\"role_name\":\"jleziunjx\",\"crn_pattern\":\"zantkwceg\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + RoleBindingRecord response = manager.access() + .createRoleBindingWithResponse("gepuslvyjtc", "uwkasiz", new AccessCreateRoleBindingRequestModel() + .withPrincipal("sfuughtuqfecjx").withRoleName("gtuhxuicbu").withCrnPattern("mr"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("njlx", response.kind()); + Assertions.assertEquals("rhwpus", response.id()); + Assertions.assertEquals("aqehg", response.metadata().self()); + Assertions.assertEquals("ohzjqatucoigeb", response.metadata().resourceName()); + Assertions.assertEquals("cnwfepbnwgfmxjg", response.metadata().createdAt()); + Assertions.assertEquals("bjb", response.metadata().updatedAt()); + Assertions.assertEquals("lfgtdysnaquflqbc", response.metadata().deletedAt()); + Assertions.assertEquals("hamzjrwdkqze", response.principal()); + Assertions.assertEquals("jleziunjx", response.roleName()); + Assertions.assertEquals("zantkwceg", response.crnPattern()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingWithResponseMockTests.java new file mode 100644 index 000000000000..d4597dc29f34 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessDeleteRoleBindingWithResponseMockTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class AccessDeleteRoleBindingWithResponseMockTests { + @Test + public void testDeleteRoleBindingWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.access().deleteRoleBindingWithResponse("amlbnseqacjjvpil", "uooqjagmdit", "ueio", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserWithResponseMockTests.java index dbe12a3f07fe..ab04be4a7c89 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessInviteUserWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testInviteUserWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"ijnkrxfrdd\",\"id\":\"ratiz\",\"metadata\":{\"self\":\"nasx\",\"resource_name\":\"tozqyzhftwesgo\",\"created_at\":\"zhonnxkrlgnyhmo\",\"updated_at\":\"xkk\",\"deleted_at\":\"h\"},\"email\":\"gh\",\"auth_type\":\"bdhqxvcxgf\",\"status\":\"dsofbshrns\",\"accepted_at\":\"uswdv\",\"expires_at\":\"ybycnunvj\"}"; + = "{\"kind\":\"jlzqnhc\",\"id\":\"ql\",\"metadata\":{\"self\":\"oibgsxg\",\"resource_name\":\"fyq\",\"created_at\":\"mpqoxw\",\"updated_at\":\"fdbxiqxeiiqbim\",\"deleted_at\":\"mwwinhehfqpofv\"},\"email\":\"cblembnkbwv\",\"auth_type\":\"xk\",\"status\":\"vqihebwtswbzuwf\",\"accepted_at\":\"urageg\",\"expires_at\":\"vcjfelisdjubggb\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,26 +50,25 @@ public void testInviteUserWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - InvitationRecord response - = manager.access() - .inviteUserWithResponse( - "uu", "fdlwg", new AccessInviteUserAccountModel().withOrganizationId("tsbwtovvtgse") - .withEmail("qfi").withUpn("x").withInvitedUserDetails(new AccessInvitedUserDetails() - .withInvitedEmail("pirgnepttwq").withAuthType("niffcdmqnroj")), - com.azure.core.util.Context.NONE) - .getValue(); + InvitationRecord response = manager.access() + .inviteUserWithResponse("phai", "mxyasflvgsgzw", + new AccessInviteUserAccountModel().withOrganizationId("akoi").withEmail("nsmjbl") + .withUpn("jhlnymzotqyryu").withInvitedUserDetails( + new AccessInvitedUserDetails().withInvitedEmail("mqqvxmvwfgtay").withAuthType("nsup")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("ijnkrxfrdd", response.kind()); - Assertions.assertEquals("ratiz", response.id()); - Assertions.assertEquals("nasx", response.metadata().self()); - Assertions.assertEquals("tozqyzhftwesgo", response.metadata().resourceName()); - Assertions.assertEquals("zhonnxkrlgnyhmo", response.metadata().createdAt()); - Assertions.assertEquals("xkk", response.metadata().updatedAt()); - Assertions.assertEquals("h", response.metadata().deletedAt()); - Assertions.assertEquals("gh", response.email()); - Assertions.assertEquals("bdhqxvcxgf", response.authType()); - Assertions.assertEquals("dsofbshrns", response.status()); - Assertions.assertEquals("uswdv", response.acceptedAt()); - Assertions.assertEquals("ybycnunvj", response.expiresAt()); + Assertions.assertEquals("jlzqnhc", response.kind()); + Assertions.assertEquals("ql", response.id()); + Assertions.assertEquals("oibgsxg", response.metadata().self()); + Assertions.assertEquals("fyq", response.metadata().resourceName()); + Assertions.assertEquals("mpqoxw", response.metadata().createdAt()); + Assertions.assertEquals("fdbxiqxeiiqbim", response.metadata().updatedAt()); + Assertions.assertEquals("mwwinhehfqpofv", response.metadata().deletedAt()); + Assertions.assertEquals("cblembnkbwv", response.email()); + Assertions.assertEquals("xk", response.authType()); + Assertions.assertEquals("vqihebwtswbzuwf", response.status()); + Assertions.assertEquals("urageg", response.acceptedAt()); + Assertions.assertEquals("vcjfelisdjubggb", response.expiresAt()); } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListClustersWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListClustersWithResponseMockTests.java index 97195ab40923..b30a09fb810d 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListClustersWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListClustersWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListClustersWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"sx\",\"metadata\":{\"first\":\"msvpkjpr\",\"last\":\"wcfzqljyxgt\",\"prev\":\"heyd\",\"next\":\"dshmkxmaehvbbx\",\"total_size\":870827030},\"data\":[{\"kind\":\"fnhtbaxkgxyw\",\"id\":\"kpyklyhp\",\"metadata\":{\"self\":\"dpvruud\",\"resource_name\":\"zibt\",\"created_at\":\"stgktst\",\"updated_at\":\"xeclzedqbcvhzlhp\",\"deleted_at\":\"dqkdlwwqfbu\"},\"display_name\":\"kxtrq\",\"spec\":{\"display_name\":\"mlmbtxhwgfwsrta\",\"availability\":\"oezbrhubsk\",\"cloud\":\"dyg\",\"zone\":\"okkqfqjbvleo\",\"region\":\"ml\",\"kafka_bootstrap_endpoint\":\"qtqzfavyv\",\"http_endpoint\":\"qybaryeua\",\"api_endpoint\":\"kq\",\"config\":{\"kind\":\"gzslesjcbhernnti\"},\"environment\":{\"id\":\"jcvb\",\"environment\":\"wr\",\"related\":\"hwagohbuffkmrqe\",\"resource_name\":\"vhmxtdrjfu\"},\"network\":{\"id\":\"oe\",\"environment\":\"vewzcj\",\"related\":\"m\",\"resource_name\":\"pmguaadraufac\"},\"byok\":{\"id\":\"hzovaj\",\"related\":\"iuxxpshneekulfg\",\"resource_name\":\"qubkw\"}},\"status\":{\"phase\":\"nrdsutujbazpjuoh\",\"cku\":1097085357}},{\"kind\":\"flnorwmduvwp\",\"id\":\"vxwmygd\",\"metadata\":{\"self\":\"pqchiszep\",\"resource_name\":\"bjcrxgibbdaxco\",\"created_at\":\"ozauorsukokwb\",\"updated_at\":\"lhlv\",\"deleted_at\":\"uepzl\"},\"display_name\":\"hw\",\"spec\":{\"display_name\":\"l\",\"availability\":\"eyuqdunvmnnrwr\",\"cloud\":\"ork\",\"zone\":\"lywjhh\",\"region\":\"nhxmsi\",\"kafka_bootstrap_endpoint\":\"omi\",\"http_endpoint\":\"xggdufi\",\"api_endpoint\":\"dieuzaofj\",\"config\":{\"kind\":\"cyyysfgdot\"},\"environment\":{\"id\":\"iipuipwoqonm\",\"environment\":\"jeknizshq\",\"related\":\"impevf\",\"resource_name\":\"b\"},\"network\":{\"id\":\"ilbywdxsm\",\"environment\":\"cwrwfs\",\"related\":\"fnynszqujizdvoqy\",\"resource_name\":\"byowbblgyavutp\"},\"byok\":{\"id\":\"oxoismsksbpim\",\"related\":\"oljxkcgx\",\"resource_name\":\"xsffgcviz\"}},\"status\":{\"phase\":\"wlvwlyoupf\",\"cku\":1825475274}},{\"kind\":\"jub\",\"id\":\"hgkfmin\",\"metadata\":{\"self\":\"wzf\",\"resource_name\":\"sttktlahbqa\",\"created_at\":\"xtgzukxitmmqtgqq\",\"updated_at\":\"hrnxrxc\",\"deleted_at\":\"uisavokq\"},\"display_name\":\"fvazivjlfrqttba\",\"spec\":{\"display_name\":\"atnwxyiopi\",\"availability\":\"qqfkuv\",\"cloud\":\"xkdmligo\",\"zone\":\"brxk\",\"region\":\"loazuruocbgoo\",\"kafka_bootstrap_endpoint\":\"te\",\"http_endpoint\":\"bfhjxakvvjgsl\",\"api_endpoint\":\"dilmyww\",\"config\":{\"kind\":\"kxn\"},\"environment\":{\"id\":\"abgyvudt\",\"environment\":\"ewbcihxuuw\",\"related\":\"j\",\"resource_name\":\"ccybvp\"},\"network\":{\"id\":\"kkudzp\",\"environment\":\"wjplma\",\"related\":\"tcyohpfkyrk\",\"resource_name\":\"dg\"},\"byok\":{\"id\":\"sjkmnwqj\",\"related\":\"baiyhddviaceg\",\"resource_name\":\"m\"}},\"status\":{\"phase\":\"pmvmemfnczdwvv\",\"cku\":128886656}}]}"; + = "{\"kind\":\"iqg\",\"metadata\":{\"first\":\"okzrus\",\"last\":\"vhczznvfby\",\"prev\":\"sxjwwixz\",\"next\":\"mwmxqhndvnoamld\",\"total_size\":1759834581},\"data\":[{\"kind\":\"djh\",\"id\":\"lzok\",\"metadata\":{\"self\":\"xpelnjetagltsx\",\"resource_name\":\"tft\",\"created_at\":\"pnpbswveflocc\",\"updated_at\":\"mozi\",\"deleted_at\":\"ipgawtxx\"},\"display_name\":\"y\",\"spec\":{\"display_name\":\"cjxgrytf\",\"availability\":\"cy\",\"cloud\":\"lrmcaykg\",\"zone\":\"oxuztrksx\",\"region\":\"ndfcpfn\",\"kafka_bootstrap_endpoint\":\"thjtwk\",\"http_endpoint\":\"osrxuzvoa\",\"api_endpoint\":\"tcqiosmg\",\"config\":{\"kind\":\"hgxqdlyrt\"},\"environment\":{\"id\":\"ap\",\"environment\":\"tz\",\"related\":\"tbhjmznnbsoqe\",\"resource_name\":\"larvlagunbtg\"},\"network\":{\"id\":\"wlnbm\",\"environment\":\"reeudzqavb\",\"related\":\"qmjxlyyzglgouwtl\",\"resource_name\":\"jyuojqtobaxkjeyt\"},\"byok\":{\"id\":\"bfjkw\",\"related\":\"snkq\",\"resource_name\":\"syrq\"}},\"status\":{\"phase\":\"qhd\",\"cku\":2136418443}},{\"kind\":\"ulkpakd\",\"id\":\"fmjnnawtqa\",\"metadata\":{\"self\":\"uckpggqoweyir\",\"resource_name\":\"lisn\",\"created_at\":\"fl\",\"updated_at\":\"mpizru\",\"deleted_at\":\"pqxpx\"},\"display_name\":\"fcngjsa\",\"spec\":{\"display_name\":\"ixtmkzjvkviirhgf\",\"availability\":\"wsdpgratzvzb\",\"cloud\":\"byvi\",\"zone\":\"ctbrxkjzwrgxffm\",\"region\":\"kwfbkgo\",\"kafka_bootstrap_endpoint\":\"wopdbydpiz\",\"http_endpoint\":\"clnapxbiygnugjkn\",\"api_endpoint\":\"mfcttux\",\"config\":{\"kind\":\"i\"},\"environment\":{\"id\":\"qoiquvrehmrnjhv\",\"environment\":\"jztczytqj\",\"related\":\"h\",\"resource_name\":\"unfprnjletlxs\"},\"network\":{\"id\":\"ddoui\",\"environment\":\"mowaziynknlqwzdv\",\"related\":\"w\",\"resource_name\":\"qszdtmaajquhuxyl\"},\"byok\":{\"id\":\"m\",\"related\":\"g\",\"resource_name\":\"mzyospspshck\"}},\"status\":{\"phase\":\"jpmspbpssdfppy\",\"cku\":1546979917}},{\"kind\":\"eyujtvczkcnyxrx\",\"id\":\"njdxvglnkvxl\",\"metadata\":{\"self\":\"glqivbgkcv\",\"resource_name\":\"pzvuqdflvo\",\"created_at\":\"yp\",\"updated_at\":\"ubcpzgpxti\",\"deleted_at\":\"j\"},\"display_name\":\"idibgqjxgpn\",\"spec\":{\"display_name\":\"ov\",\"availability\":\"pikqmh\",\"cloud\":\"owjrmzvuporqz\",\"zone\":\"uydzvk\",\"region\":\"xcnqmxqpswokmvkh\",\"kafka_bootstrap_endpoint\":\"gdhbe\",\"http_endpoint\":\"qkzszuwiwtglxxh\",\"api_endpoint\":\"fpgpicrmnzhrgm\",\"config\":{\"kind\":\"sxvpqcbfrmbodths\"},\"environment\":{\"id\":\"vriibakclacjfr\",\"environment\":\"ousxauzlwvsgmw\",\"related\":\"qf\",\"resource_name\":\"zvuxm\"},\"network\":{\"id\":\"svth\",\"environment\":\"pz\",\"related\":\"kovmribiatt\",\"resource_name\":\"lu\"},\"byok\":{\"id\":\"tangcfhnykzcu\",\"related\":\"wvxwlmzqwmvt\",\"resource_name\":\"jmxmcuqud\"}},\"status\":{\"phase\":\"clxyn\",\"cku\":267466114}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,46 +51,48 @@ public void testListClustersWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - AccessListClusterSuccessResponse response = manager.access().listClustersWithResponse("jdftuljltd", "ceamtm", - new ListAccessRequestModel().withSearchFilters(mapOf("ejwcwwqiok", "o")), com.azure.core.util.Context.NONE) + AccessListClusterSuccessResponse response = manager.access() + .listClustersWithResponse("izcil", "ghgshejjtbxqmu", + new ListAccessRequestModel().withSearchFilters(mapOf("rsbycucrwn", "lxqzvn", "qbsms", "mikzeb")), + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("sx", response.kind()); - Assertions.assertEquals("msvpkjpr", response.metadata().first()); - Assertions.assertEquals("wcfzqljyxgt", response.metadata().last()); - Assertions.assertEquals("heyd", response.metadata().prev()); - Assertions.assertEquals("dshmkxmaehvbbx", response.metadata().next()); - Assertions.assertEquals(870827030, response.metadata().totalSize()); - Assertions.assertEquals("fnhtbaxkgxyw", response.data().get(0).kind()); - Assertions.assertEquals("kpyklyhp", response.data().get(0).id()); - Assertions.assertEquals("dpvruud", response.data().get(0).metadata().self()); - Assertions.assertEquals("zibt", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("stgktst", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("xeclzedqbcvhzlhp", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("dqkdlwwqfbu", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("kxtrq", response.data().get(0).displayName()); - Assertions.assertEquals("mlmbtxhwgfwsrta", response.data().get(0).spec().displayName()); - Assertions.assertEquals("oezbrhubsk", response.data().get(0).spec().availability()); - Assertions.assertEquals("dyg", response.data().get(0).spec().cloud()); - Assertions.assertEquals("okkqfqjbvleo", response.data().get(0).spec().zone()); - Assertions.assertEquals("ml", response.data().get(0).spec().region()); - Assertions.assertEquals("qtqzfavyv", response.data().get(0).spec().kafkaBootstrapEndpoint()); - Assertions.assertEquals("qybaryeua", response.data().get(0).spec().httpEndpoint()); - Assertions.assertEquals("kq", response.data().get(0).spec().apiEndpoint()); - Assertions.assertEquals("gzslesjcbhernnti", response.data().get(0).spec().config().kind()); - Assertions.assertEquals("jcvb", response.data().get(0).spec().environment().id()); - Assertions.assertEquals("wr", response.data().get(0).spec().environment().environment()); - Assertions.assertEquals("hwagohbuffkmrqe", response.data().get(0).spec().environment().related()); - Assertions.assertEquals("vhmxtdrjfu", response.data().get(0).spec().environment().resourceName()); - Assertions.assertEquals("oe", response.data().get(0).spec().network().id()); - Assertions.assertEquals("vewzcj", response.data().get(0).spec().network().environment()); - Assertions.assertEquals("m", response.data().get(0).spec().network().related()); - Assertions.assertEquals("pmguaadraufac", response.data().get(0).spec().network().resourceName()); - Assertions.assertEquals("hzovaj", response.data().get(0).spec().byok().id()); - Assertions.assertEquals("iuxxpshneekulfg", response.data().get(0).spec().byok().related()); - Assertions.assertEquals("qubkw", response.data().get(0).spec().byok().resourceName()); - Assertions.assertEquals("nrdsutujbazpjuoh", response.data().get(0).status().phase()); - Assertions.assertEquals(1097085357, response.data().get(0).status().cku()); + Assertions.assertEquals("iqg", response.kind()); + Assertions.assertEquals("okzrus", response.metadata().first()); + Assertions.assertEquals("vhczznvfby", response.metadata().last()); + Assertions.assertEquals("sxjwwixz", response.metadata().prev()); + Assertions.assertEquals("mwmxqhndvnoamld", response.metadata().next()); + Assertions.assertEquals(1759834581, response.metadata().totalSize()); + Assertions.assertEquals("djh", response.data().get(0).kind()); + Assertions.assertEquals("lzok", response.data().get(0).id()); + Assertions.assertEquals("xpelnjetagltsx", response.data().get(0).metadata().self()); + Assertions.assertEquals("tft", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("pnpbswveflocc", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("mozi", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("ipgawtxx", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("y", response.data().get(0).displayName()); + Assertions.assertEquals("cjxgrytf", response.data().get(0).spec().displayName()); + Assertions.assertEquals("cy", response.data().get(0).spec().availability()); + Assertions.assertEquals("lrmcaykg", response.data().get(0).spec().cloud()); + Assertions.assertEquals("oxuztrksx", response.data().get(0).spec().zone()); + Assertions.assertEquals("ndfcpfn", response.data().get(0).spec().region()); + Assertions.assertEquals("thjtwk", response.data().get(0).spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("osrxuzvoa", response.data().get(0).spec().httpEndpoint()); + Assertions.assertEquals("tcqiosmg", response.data().get(0).spec().apiEndpoint()); + Assertions.assertEquals("hgxqdlyrt", response.data().get(0).spec().config().kind()); + Assertions.assertEquals("ap", response.data().get(0).spec().environment().id()); + Assertions.assertEquals("tz", response.data().get(0).spec().environment().environment()); + Assertions.assertEquals("tbhjmznnbsoqe", response.data().get(0).spec().environment().related()); + Assertions.assertEquals("larvlagunbtg", response.data().get(0).spec().environment().resourceName()); + Assertions.assertEquals("wlnbm", response.data().get(0).spec().network().id()); + Assertions.assertEquals("reeudzqavb", response.data().get(0).spec().network().environment()); + Assertions.assertEquals("qmjxlyyzglgouwtl", response.data().get(0).spec().network().related()); + Assertions.assertEquals("jyuojqtobaxkjeyt", response.data().get(0).spec().network().resourceName()); + Assertions.assertEquals("bfjkw", response.data().get(0).spec().byok().id()); + Assertions.assertEquals("snkq", response.data().get(0).spec().byok().related()); + Assertions.assertEquals("syrq", response.data().get(0).spec().byok().resourceName()); + Assertions.assertEquals("qhd", response.data().get(0).status().phase()); + Assertions.assertEquals(2136418443, response.data().get(0).status().cku()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsWithResponseMockTests.java index 51c9fff5f21b..94ced199cb02 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListEnvironmentsWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListEnvironmentsWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"havgrvk\",\"metadata\":{\"first\":\"vjzhpjbib\",\"last\":\"mfxumvfcluyovw\",\"prev\":\"bkfezzxscyhwzdgi\",\"next\":\"jbzbomvzzbtdcq\",\"total_size\":1359383511},\"data\":[{\"kind\":\"jviylwdshfs\",\"id\":\"rbgyefry\",\"metadata\":{\"self\":\"aojfm\",\"resource_name\":\"cotmr\",\"created_at\":\"irctymoxoftpipiw\",\"updated_at\":\"zuhx\",\"deleted_at\":\"pqjlihhyusps\"},\"display_name\":\"sdvlmfwdgzxulucv\"},{\"kind\":\"mrsreuzvxurisjnh\",\"id\":\"txifqj\",\"metadata\":{\"self\":\"mrhublwpc\",\"resource_name\":\"utr\",\"created_at\":\"upauut\",\"updated_at\":\"oqh\",\"deleted_at\":\"ejqgw\"},\"display_name\":\"nfqn\"},{\"kind\":\"ypsxjvfoim\",\"id\":\"slirciz\",\"metadata\":{\"self\":\"ydfce\",\"resource_name\":\"vlhv\",\"created_at\":\"dyftumrtwna\",\"updated_at\":\"slbi\",\"deleted_at\":\"ojgcyzt\"},\"display_name\":\"mznbaeqphch\"},{\"kind\":\"rn\",\"id\":\"x\",\"metadata\":{\"self\":\"wrykqgai\",\"resource_name\":\"viklb\",\"created_at\":\"vkhbejdznx\",\"updated_at\":\"dsrhnjiv\",\"deleted_at\":\"v\"},\"display_name\":\"ovqfzge\"}]}"; + = "{\"kind\":\"tkvnlvxbcuiiznkt\",\"metadata\":{\"first\":\"nsnvpd\",\"last\":\"mik\",\"prev\":\"tbzbkiwbuqnyophz\",\"next\":\"l\",\"total_size\":348954725},\"data\":[{\"kind\":\"bcunezzceze\",\"id\":\"w\",\"metadata\":{\"self\":\"lwxjwetn\",\"resource_name\":\"ihclafzv\",\"created_at\":\"lpt\",\"updated_at\":\"qqwzt\",\"deleted_at\":\"w\"},\"display_name\":\"chcxwaxfewzj\"},{\"kind\":\"exfdeqvhpsylk\",\"id\":\"hkbffmbm\",\"metadata\":{\"self\":\"rgywwp\",\"resource_name\":\"xs\",\"created_at\":\"tf\",\"updated_at\":\"gicgaaoepttaq\",\"deleted_at\":\"dewemxswv\"},\"display_name\":\"unzzjgehk\"},{\"kind\":\"imrt\",\"id\":\"okffqyinljqepqwh\",\"metadata\":{\"self\":\"onsts\",\"resource_name\":\"yxgvelfcld\",\"created_at\":\"cb\",\"updated_at\":\"ds\",\"deleted_at\":\"wcobie\"},\"display_name\":\"tmninw\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,26 +52,25 @@ public void testListEnvironmentsWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); AccessListEnvironmentsSuccessResponse response = manager.access() - .listEnvironmentsWithResponse("rtkfawnopq", "ikyzirtxdy", - new ListAccessRequestModel().withSearchFilters( - mapOf("sewgioilqukr", "ejnt", "ggufhyaomtb", "dxtqmieoxo")), + .listEnvironmentsWithResponse("igkxkbsazga", "gacyrcmjdmspo", + new ListAccessRequestModel().withSearchFilters(mapOf("frzgbzjed", "vuhrylni")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("havgrvk", response.kind()); - Assertions.assertEquals("vjzhpjbib", response.metadata().first()); - Assertions.assertEquals("mfxumvfcluyovw", response.metadata().last()); - Assertions.assertEquals("bkfezzxscyhwzdgi", response.metadata().prev()); - Assertions.assertEquals("jbzbomvzzbtdcq", response.metadata().next()); - Assertions.assertEquals(1359383511, response.metadata().totalSize()); - Assertions.assertEquals("jviylwdshfs", response.data().get(0).kind()); - Assertions.assertEquals("rbgyefry", response.data().get(0).id()); - Assertions.assertEquals("aojfm", response.data().get(0).metadata().self()); - Assertions.assertEquals("cotmr", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("irctymoxoftpipiw", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("zuhx", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("pqjlihhyusps", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("sdvlmfwdgzxulucv", response.data().get(0).displayName()); + Assertions.assertEquals("tkvnlvxbcuiiznkt", response.kind()); + Assertions.assertEquals("nsnvpd", response.metadata().first()); + Assertions.assertEquals("mik", response.metadata().last()); + Assertions.assertEquals("tbzbkiwbuqnyophz", response.metadata().prev()); + Assertions.assertEquals("l", response.metadata().next()); + Assertions.assertEquals(348954725, response.metadata().totalSize()); + Assertions.assertEquals("bcunezzceze", response.data().get(0).kind()); + Assertions.assertEquals("w", response.data().get(0).id()); + Assertions.assertEquals("lwxjwetn", response.data().get(0).metadata().self()); + Assertions.assertEquals("ihclafzv", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("lpt", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("qqwzt", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("w", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("chcxwaxfewzj", response.data().get(0).displayName()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsWithResponseMockTests.java index 1e23fe56f1c3..a5a77ab41487 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListInvitationsWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListInvitationsWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"mkqjj\",\"metadata\":{\"first\":\"envrkpyouaibrebq\",\"last\":\"ysjkixqtnqttez\",\"prev\":\"fffiak\",\"next\":\"pqqmted\",\"total_size\":1028485886},\"data\":[{\"kind\":\"hyeozphvwau\",\"id\":\"ncyg\",\"metadata\":{\"self\":\"vipmdscwxqupevzh\",\"resource_name\":\"totxhojujb\",\"created_at\":\"elmcuvhixbjxyfw\",\"updated_at\":\"lrcoolsttpki\",\"deleted_at\":\"kbnujr\"},\"email\":\"vtylbfpncu\",\"auth_type\":\"oiwiithtywub\",\"status\":\"bihwqknfdnt\",\"accepted_at\":\"chrdgoihxumwcto\",\"expires_at\":\"zj\"}]}"; + = "{\"kind\":\"jwogqqnobpudc\",\"metadata\":{\"first\":\"tqwpwya\",\"last\":\"zasqbucljgkyexao\",\"prev\":\"yaipidsda\",\"next\":\"tx\",\"total_size\":634071043},\"data\":[{\"kind\":\"qwazlnqnmcjngzq\",\"id\":\"xtbjwgnyfusfzsv\",\"metadata\":{\"self\":\"kzhajqglcfhm\",\"resource_name\":\"qryxyn\",\"created_at\":\"zrdpsovwxznptgoe\",\"updated_at\":\"bbabp\",\"deleted_at\":\"vf\"},\"email\":\"kvntjlrigjkskyri\",\"auth_type\":\"vzidsxwaab\",\"status\":\"ifrygzn\",\"accepted_at\":\"axri\",\"expires_at\":\"zob\"},{\"kind\":\"pxl\",\"id\":\"lnelxieixynl\",\"metadata\":{\"self\":\"cwcrojphs\",\"resource_name\":\"cawjutifdwfmvi\",\"created_at\":\"rqjb\",\"updated_at\":\"zhraglkafh\",\"deleted_at\":\"qjujeickpzvcp\"},\"email\":\"mxelnwcltyjed\",\"auth_type\":\"xm\",\"status\":\"mkqscaz\",\"accepted_at\":\"wxtzxpuamwab\",\"expires_at\":\"rvxcush\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,30 +52,28 @@ public void testListInvitationsWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); AccessListInvitationsSuccessResponse response = manager.access() - .listInvitationsWithResponse("hjglikk", "wslolbqp", - new ListAccessRequestModel().withSearchFilters( - mapOf("elfk", "lmv", "njwmwkpnbsazejj", "gplcrpwjxeznoigb", "augzxnfaazpxdtn", "qkagfhsxt")), - com.azure.core.util.Context.NONE) + .listInvitationsWithResponse("paq", "ferr", + new ListAccessRequestModel().withSearchFilters(mapOf("kmfx", "x")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mkqjj", response.kind()); - Assertions.assertEquals("envrkpyouaibrebq", response.metadata().first()); - Assertions.assertEquals("ysjkixqtnqttez", response.metadata().last()); - Assertions.assertEquals("fffiak", response.metadata().prev()); - Assertions.assertEquals("pqqmted", response.metadata().next()); - Assertions.assertEquals(1028485886, response.metadata().totalSize()); - Assertions.assertEquals("hyeozphvwau", response.data().get(0).kind()); - Assertions.assertEquals("ncyg", response.data().get(0).id()); - Assertions.assertEquals("vipmdscwxqupevzh", response.data().get(0).metadata().self()); - Assertions.assertEquals("totxhojujb", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("elmcuvhixbjxyfw", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("lrcoolsttpki", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("kbnujr", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("vtylbfpncu", response.data().get(0).email()); - Assertions.assertEquals("oiwiithtywub", response.data().get(0).authType()); - Assertions.assertEquals("bihwqknfdnt", response.data().get(0).status()); - Assertions.assertEquals("chrdgoihxumwcto", response.data().get(0).acceptedAt()); - Assertions.assertEquals("zj", response.data().get(0).expiresAt()); + Assertions.assertEquals("jwogqqnobpudc", response.kind()); + Assertions.assertEquals("tqwpwya", response.metadata().first()); + Assertions.assertEquals("zasqbucljgkyexao", response.metadata().last()); + Assertions.assertEquals("yaipidsda", response.metadata().prev()); + Assertions.assertEquals("tx", response.metadata().next()); + Assertions.assertEquals(634071043, response.metadata().totalSize()); + Assertions.assertEquals("qwazlnqnmcjngzq", response.data().get(0).kind()); + Assertions.assertEquals("xtbjwgnyfusfzsv", response.data().get(0).id()); + Assertions.assertEquals("kzhajqglcfhm", response.data().get(0).metadata().self()); + Assertions.assertEquals("qryxyn", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("zrdpsovwxznptgoe", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("bbabp", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("vf", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("kvntjlrigjkskyri", response.data().get(0).email()); + Assertions.assertEquals("vzidsxwaab", response.data().get(0).authType()); + Assertions.assertEquals("ifrygzn", response.data().get(0).status()); + Assertions.assertEquals("axri", response.data().get(0).acceptedAt()); + Assertions.assertEquals("zob", response.data().get(0).expiresAt()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListWithResponseMockTests.java new file mode 100644 index 000000000000..2476a8d04383 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingNameListWithResponseMockTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.AccessRoleBindingNameListSuccessResponse; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class AccessListRoleBindingNameListWithResponseMockTests { + @Test + public void testListRoleBindingNameListWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"kind\":\"tuwkffdj\",\"metadata\":{\"first\":\"ysidfvclgl\",\"last\":\"fuijtkbus\",\"prev\":\"gsfikayiansha\",\"next\":\"jtjiqx\",\"total_size\":1119516110},\"data\":[\"ttvwkpqh\"]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + AccessRoleBindingNameListSuccessResponse response = manager.access() + .listRoleBindingNameListWithResponse("kjbsah", "tdtpdelqacslmo", + new ListAccessRequestModel() + .withSearchFilters(mapOf("k", "bnfxofvc", "xejw", "dirazf", "jurbuhhlkyqltqsr", "bmdujtmvcopexc")), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("tuwkffdj", response.kind()); + Assertions.assertEquals("ysidfvclgl", response.metadata().first()); + Assertions.assertEquals("fuijtkbus", response.metadata().last()); + Assertions.assertEquals("gsfikayiansha", response.metadata().prev()); + Assertions.assertEquals("jtjiqx", response.metadata().next()); + Assertions.assertEquals(1119516110, response.metadata().totalSize()); + Assertions.assertEquals("ttvwkpqh", response.data().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsWithResponseMockTests.java index 201002eeedf9..9a8e3d78dbd5 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListRoleBindingsWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListRoleBindingsWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"qcaaewdaomdjvl\",\"metadata\":{\"first\":\"xkzb\",\"last\":\"sgeivsiy\",\"prev\":\"kdncj\",\"next\":\"onbzoggculapzwy\",\"total_size\":1152319383},\"data\":[{\"kind\":\"qxepnylbfuaj\",\"id\":\"jtlvofqzhvfciby\",\"metadata\":{\"self\":\"wuxrkjpvdwxfzwi\",\"resource_name\":\"wzjbh\",\"created_at\":\"sxjrk\",\"updated_at\":\"btrnegvm\",\"deleted_at\":\"uqeqv\"},\"principal\":\"spastjbkkdmf\",\"role_name\":\"est\",\"crn_pattern\":\"lx\"},{\"kind\":\"ilozapeewchpxlk\",\"id\":\"kuziycsle\",\"metadata\":{\"self\":\"uztcktyhjtqed\",\"resource_name\":\"zulwmmrqzzrrj\",\"created_at\":\"gl\",\"updated_at\":\"zgkrvqe\",\"deleted_at\":\"toepryu\"},\"principal\":\"wytpzdmovz\",\"role_name\":\"va\",\"crn_pattern\":\"zqadf\"}]}"; + = "{\"kind\":\"qylkmqpzoyhlf\",\"metadata\":{\"first\":\"wgcloxoebqinji\",\"last\":\"wjfuj\",\"prev\":\"afcba\",\"next\":\"pzpofoiyjw\",\"total_size\":1217605698},\"data\":[{\"kind\":\"kkholvdndvia\",\"id\":\"gphuartvtiu\",\"metadata\":{\"self\":\"fchnmnah\",\"resource_name\":\"xhk\",\"created_at\":\"qirwrweoox\",\"updated_at\":\"i\",\"deleted_at\":\"xwrsnew\"},\"principal\":\"zqvbubqm\",\"role_name\":\"hsycxhxzgaz\",\"crn_pattern\":\"abo\"},{\"kind\":\"vmfqhppubo\",\"id\":\"epdfgkmtdherng\",\"metadata\":{\"self\":\"juahokqto\",\"resource_name\":\"auxofshfph\",\"created_at\":\"nulaiywzejywhsl\",\"updated_at\":\"ojpllndnpdwrpqaf\",\"deleted_at\":\"ug\"},\"principal\":\"n\",\"role_name\":\"yetefyp\",\"crn_pattern\":\"octfjgtixrjvzuyt\"},{\"kind\":\"mlmuowol\",\"id\":\"uir\",\"metadata\":{\"self\":\"ons\",\"resource_name\":\"nw\",\"created_at\":\"gajinnixjawrtmj\",\"updated_at\":\"myccx\",\"deleted_at\":\"hcoxov\"},\"principal\":\"khenlus\",\"role_name\":\"rd\",\"crn_pattern\":\"xtxrdcqtjvidt\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,30 +51,29 @@ public void testListRoleBindingsWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - AccessListRoleBindingsSuccessResponse response - = manager.access() - .listRoleBindingsWithResponse("xlllchp", "db", - new ListAccessRequestModel().withSearchFilters(mapOf("hfuk", "wrd", "fcvlerch", "vsjcswsmystuluqy", - "xsspuunnoxyhk", "qbmfpjbabwidf", "ddrihpf", "g")), - com.azure.core.util.Context.NONE) - .getValue(); + AccessListRoleBindingsSuccessResponse response = manager.access() + .listRoleBindingsWithResponse("vgfab", "iyji", + new ListAccessRequestModel() + .withSearchFilters(mapOf("neiknpg", "phdu", "btozipqwje", "xgjiuqh", "xxgewpk", "mur")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("qcaaewdaomdjvl", response.kind()); - Assertions.assertEquals("xkzb", response.metadata().first()); - Assertions.assertEquals("sgeivsiy", response.metadata().last()); - Assertions.assertEquals("kdncj", response.metadata().prev()); - Assertions.assertEquals("onbzoggculapzwy", response.metadata().next()); - Assertions.assertEquals(1152319383, response.metadata().totalSize()); - Assertions.assertEquals("qxepnylbfuaj", response.data().get(0).kind()); - Assertions.assertEquals("jtlvofqzhvfciby", response.data().get(0).id()); - Assertions.assertEquals("wuxrkjpvdwxfzwi", response.data().get(0).metadata().self()); - Assertions.assertEquals("wzjbh", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("sxjrk", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("btrnegvm", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("uqeqv", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("spastjbkkdmf", response.data().get(0).principal()); - Assertions.assertEquals("est", response.data().get(0).roleName()); - Assertions.assertEquals("lx", response.data().get(0).crnPattern()); + Assertions.assertEquals("qylkmqpzoyhlf", response.kind()); + Assertions.assertEquals("wgcloxoebqinji", response.metadata().first()); + Assertions.assertEquals("wjfuj", response.metadata().last()); + Assertions.assertEquals("afcba", response.metadata().prev()); + Assertions.assertEquals("pzpofoiyjw", response.metadata().next()); + Assertions.assertEquals(1217605698, response.metadata().totalSize()); + Assertions.assertEquals("kkholvdndvia", response.data().get(0).kind()); + Assertions.assertEquals("gphuartvtiu", response.data().get(0).id()); + Assertions.assertEquals("fchnmnah", response.data().get(0).metadata().self()); + Assertions.assertEquals("xhk", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("qirwrweoox", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("i", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("xwrsnew", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("zqvbubqm", response.data().get(0).principal()); + Assertions.assertEquals("hsycxhxzgaz", response.data().get(0).roleName()); + Assertions.assertEquals("abo", response.data().get(0).crnPattern()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsWithResponseMockTests.java index 4a8da14556a7..0975fec556d7 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListServiceAccountsWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListServiceAccountsWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"phqamvdkfwynwcvt\",\"metadata\":{\"first\":\"ayhmtnvyqiatkz\",\"last\":\"cnpwzcjaesgvvscc\",\"prev\":\"jguq\",\"next\":\"wygzlvdnkfxusem\",\"total_size\":1095077901},\"data\":[{\"kind\":\"hapfcqdpsqx\",\"id\":\"psvuoymgc\",\"metadata\":{\"self\":\"vezrypqlmfeo\",\"resource_name\":\"rqwky\",\"created_at\":\"ob\",\"updated_at\":\"gxedkow\",\"deleted_at\":\"bqpc\"},\"display_name\":\"kbwcc\",\"description\":\"jvcdwxlpqekf\"},{\"kind\":\"khtj\",\"id\":\"i\",\"metadata\":{\"self\":\"fq\",\"resource_name\":\"mtdh\",\"created_at\":\"dvypgikdgsz\",\"updated_at\":\"kbir\",\"deleted_at\":\"uzhlhkjoqrv\"},\"display_name\":\"aatjinrvgoupmfi\",\"description\":\"fggjioolvr\"},{\"kind\":\"kvtkkg\",\"id\":\"qwjygvja\",\"metadata\":{\"self\":\"lmhvkzuhbxv\",\"resource_name\":\"hgsopbyrqufegx\",\"created_at\":\"wz\",\"updated_at\":\"nhlmctlpdng\",\"deleted_at\":\"vgbmhr\"},\"display_name\":\"kw\",\"description\":\"ijejvegrhbpn\"},{\"kind\":\"xexccbdreaxhcexd\",\"id\":\"vqahqkghtpwi\",\"metadata\":{\"self\":\"yjsvfyc\",\"resource_name\":\"bfvoowvrv\",\"created_at\":\"gjqppy\",\"updated_at\":\"tronzmyhgfi\",\"deleted_at\":\"sxkm\"},\"display_name\":\"a\",\"description\":\"rrjreafxtsgu\"}]}"; + = "{\"kind\":\"rlpyznuciqdsmexi\",\"metadata\":{\"first\":\"fuxtyasiibmiybnn\",\"last\":\"tgnljhnmgixhcmav\",\"prev\":\"foudor\",\"next\":\"gyyprotwy\",\"total_size\":677853893},\"data\":[{\"kind\":\"xhugcm\",\"id\":\"avlg\",\"metadata\":{\"self\":\"mftpmdtz\",\"resource_name\":\"ltfvnz\",\"created_at\":\"jtotpvopvpbd\",\"updated_at\":\"qgqqihedsvqwthmk\",\"deleted_at\":\"bcysih\"},\"display_name\":\"qcwdhoh\",\"description\":\"tmcdzsufcohd\"},{\"kind\":\"zlmcmuapcvhdb\",\"id\":\"wqqxeysko\",\"metadata\":{\"self\":\"inkfkbgbz\",\"resource_name\":\"wxeqocljmygvkzqk\",\"created_at\":\"eokbze\",\"updated_at\":\"zrxcczurt\",\"deleted_at\":\"ipqxbkwvzgnzv\"},\"display_name\":\"bzdixzmq\",\"description\":\"odawopqhewjptmcg\"},{\"kind\":\"ostzelndlatu\",\"id\":\"zlbiojlvfhrbbpn\",\"metadata\":{\"self\":\"cwwyyur\",\"resource_name\":\"chpp\",\"created_at\":\"rsnm\",\"updated_at\":\"ayzejnhlbkpbz\",\"deleted_at\":\"piljhahzvech\"},\"display_name\":\"bnwieholew\",\"description\":\"iuubwefqsf\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,27 +52,26 @@ public void testListServiceAccountsWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); AccessListServiceAccountsSuccessResponse response = manager.access() - .listServiceAccountsWithResponse( - "dvriiiojnal", "hfkvtvsexsowuel", new ListAccessRequestModel().withSearchFilters(mapOf("wws", - "hahhxvrhmzkwpj", "qxujxukndxd", "ughftqsx", "syqtfi", "grjguufzd", "phoszqz", "whbotzingamv")), + .listServiceAccountsWithResponse("nw", "acevehjkuyx", + new ListAccessRequestModel().withSearchFilters(mapOf("faey", "gaoql", "hriypoqeyhlqhy", "inmfgvxirp")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("phqamvdkfwynwcvt", response.kind()); - Assertions.assertEquals("ayhmtnvyqiatkz", response.metadata().first()); - Assertions.assertEquals("cnpwzcjaesgvvscc", response.metadata().last()); - Assertions.assertEquals("jguq", response.metadata().prev()); - Assertions.assertEquals("wygzlvdnkfxusem", response.metadata().next()); - Assertions.assertEquals(1095077901, response.metadata().totalSize()); - Assertions.assertEquals("hapfcqdpsqx", response.data().get(0).kind()); - Assertions.assertEquals("psvuoymgc", response.data().get(0).id()); - Assertions.assertEquals("vezrypqlmfeo", response.data().get(0).metadata().self()); - Assertions.assertEquals("rqwky", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("ob", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("gxedkow", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("bqpc", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("kbwcc", response.data().get(0).displayName()); - Assertions.assertEquals("jvcdwxlpqekf", response.data().get(0).description()); + Assertions.assertEquals("rlpyznuciqdsmexi", response.kind()); + Assertions.assertEquals("fuxtyasiibmiybnn", response.metadata().first()); + Assertions.assertEquals("tgnljhnmgixhcmav", response.metadata().last()); + Assertions.assertEquals("foudor", response.metadata().prev()); + Assertions.assertEquals("gyyprotwy", response.metadata().next()); + Assertions.assertEquals(677853893, response.metadata().totalSize()); + Assertions.assertEquals("xhugcm", response.data().get(0).kind()); + Assertions.assertEquals("avlg", response.data().get(0).id()); + Assertions.assertEquals("mftpmdtz", response.data().get(0).metadata().self()); + Assertions.assertEquals("ltfvnz", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("jtotpvopvpbd", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("qgqqihedsvqwthmk", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("bcysih", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("qcwdhoh", response.data().get(0).displayName()); + Assertions.assertEquals("tmcdzsufcohd", response.data().get(0).description()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListUsersWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListUsersWithResponseMockTests.java index 014f3a9bfa91..c6ad370a3a42 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListUsersWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessListUsersWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testListUsersWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"kind\":\"fpel\",\"metadata\":{\"first\":\"pv\",\"last\":\"r\",\"prev\":\"vu\",\"next\":\"raehtwdwrft\",\"total_size\":767551661},\"data\":[{\"kind\":\"cdl\",\"id\":\"shfwpracstwity\",\"metadata\":{\"self\":\"vxccedcp\",\"resource_name\":\"dyodnwzxltj\",\"created_at\":\"nhltiugcxn\",\"updated_at\":\"vwxqibyqunyo\",\"deleted_at\":\"wlmdjrkv\"},\"email\":\"bvfvpdbod\",\"full_name\":\"izsjqlhkrr\",\"auth_type\":\"deibqip\"},{\"kind\":\"ghvxndzwmkrefa\",\"id\":\"jorwkqnyhgbij\",\"metadata\":{\"self\":\"vfxzsjab\",\"resource_name\":\"systawfsdjp\",\"created_at\":\"vp\",\"updated_at\":\"xbkzbzkdvncj\",\"deleted_at\":\"udurgkakmokz\"},\"email\":\"jk\",\"full_name\":\"fhmouwq\",\"auth_type\":\"zrfze\"},{\"kind\":\"ebizikayuh\",\"id\":\"bjbsybb\",\"metadata\":{\"self\":\"vtldgmfpgvmpip\",\"resource_name\":\"ltha\",\"created_at\":\"x\",\"updated_at\":\"mwutwbdsre\",\"deleted_at\":\"drhneuyow\"},\"email\":\"d\",\"full_name\":\"t\",\"auth_type\":\"ib\"},{\"kind\":\"cgpik\",\"id\":\"imejzanl\",\"metadata\":{\"self\":\"iavrm\",\"resource_name\":\"onok\",\"created_at\":\"rjqc\",\"updated_at\":\"gzpfrla\",\"deleted_at\":\"zrnw\"},\"email\":\"indfpwpjyl\",\"full_name\":\"tlhflsjcdhszf\",\"auth_type\":\"fbgofeljagrqmqh\"}]}"; + = "{\"kind\":\"jtlo\",\"metadata\":{\"first\":\"uojrngiflr\",\"last\":\"asccbiui\",\"prev\":\"dlyjdf\",\"next\":\"mkyoqufdvruzsl\",\"total_size\":15628056},\"data\":[{\"kind\":\"tfnmdx\",\"id\":\"ngfdgugeyzihgrky\",\"metadata\":{\"self\":\"absnmfpp\",\"resource_name\":\"jee\",\"created_at\":\"hyhsgzfczbg\",\"updated_at\":\"fgbegl\",\"deleted_at\":\"leohibetnluankr\"},\"email\":\"xeeebtijvacvbmqz\",\"full_name\":\"q\",\"auth_type\":\"aj\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,29 +51,26 @@ public void testListUsersWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - AccessListUsersSuccessResponse response = manager.access() - .listUsersWithResponse("rgzdwmsweyp", "w", - new ListAccessRequestModel().withSearchFilters( - mapOf("ktt", "gicccnxqhuex", "dtclusiypb", "stvlzywemhzrnc", "ukyhejhzis", "fgytguslfeadcyg")), - com.azure.core.util.Context.NONE) + AccessListUsersSuccessResponse response = manager.access().listUsersWithResponse("qbnj", "rcgegydcwboxjum", + new ListAccessRequestModel().withSearchFilters(mapOf("ouau", "olihrra")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fpel", response.kind()); - Assertions.assertEquals("pv", response.metadata().first()); - Assertions.assertEquals("r", response.metadata().last()); - Assertions.assertEquals("vu", response.metadata().prev()); - Assertions.assertEquals("raehtwdwrft", response.metadata().next()); - Assertions.assertEquals(767551661, response.metadata().totalSize()); - Assertions.assertEquals("cdl", response.data().get(0).kind()); - Assertions.assertEquals("shfwpracstwity", response.data().get(0).id()); - Assertions.assertEquals("vxccedcp", response.data().get(0).metadata().self()); - Assertions.assertEquals("dyodnwzxltj", response.data().get(0).metadata().resourceName()); - Assertions.assertEquals("nhltiugcxn", response.data().get(0).metadata().createdAt()); - Assertions.assertEquals("vwxqibyqunyo", response.data().get(0).metadata().updatedAt()); - Assertions.assertEquals("wlmdjrkv", response.data().get(0).metadata().deletedAt()); - Assertions.assertEquals("bvfvpdbod", response.data().get(0).email()); - Assertions.assertEquals("izsjqlhkrr", response.data().get(0).fullName()); - Assertions.assertEquals("deibqip", response.data().get(0).authType()); + Assertions.assertEquals("jtlo", response.kind()); + Assertions.assertEquals("uojrngiflr", response.metadata().first()); + Assertions.assertEquals("asccbiui", response.metadata().last()); + Assertions.assertEquals("dlyjdf", response.metadata().prev()); + Assertions.assertEquals("mkyoqufdvruzsl", response.metadata().next()); + Assertions.assertEquals(15628056, response.metadata().totalSize()); + Assertions.assertEquals("tfnmdx", response.data().get(0).kind()); + Assertions.assertEquals("ngfdgugeyzihgrky", response.data().get(0).id()); + Assertions.assertEquals("absnmfpp", response.data().get(0).metadata().self()); + Assertions.assertEquals("jee", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("hyhsgzfczbg", response.data().get(0).metadata().createdAt()); + Assertions.assertEquals("fgbegl", response.data().get(0).metadata().updatedAt()); + Assertions.assertEquals("leohibetnluankr", response.data().get(0).metadata().deletedAt()); + Assertions.assertEquals("xeeebtijvacvbmqz", response.data().get(0).email()); + Assertions.assertEquals("q", response.data().get(0).fullName()); + Assertions.assertEquals("aj", response.data().get(0).authType()); } // Use "Map.of" if available diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessRoleBindingNameListSuccessResponseInnerTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessRoleBindingNameListSuccessResponseInnerTests.java new file mode 100644 index 000000000000..179898a9b4ea --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/AccessRoleBindingNameListSuccessResponseInnerTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.AccessRoleBindingNameListSuccessResponseInner; +import com.azure.resourcemanager.confluent.models.ConfluentListMetadata; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessRoleBindingNameListSuccessResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessRoleBindingNameListSuccessResponseInner model = BinaryData.fromString( + "{\"kind\":\"btkuwhh\",\"metadata\":{\"first\":\"k\",\"last\":\"oxafn\",\"prev\":\"lpichk\",\"next\":\"mkcdyhbpkkpwdre\",\"total_size\":1405054510},\"data\":[\"qfovljxywsuws\"]}") + .toObject(AccessRoleBindingNameListSuccessResponseInner.class); + Assertions.assertEquals("btkuwhh", model.kind()); + Assertions.assertEquals("k", model.metadata().first()); + Assertions.assertEquals("oxafn", model.metadata().last()); + Assertions.assertEquals("lpichk", model.metadata().prev()); + Assertions.assertEquals("mkcdyhbpkkpwdre", model.metadata().next()); + Assertions.assertEquals(1405054510, model.metadata().totalSize()); + Assertions.assertEquals("qfovljxywsuws", model.data().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessRoleBindingNameListSuccessResponseInner model = new AccessRoleBindingNameListSuccessResponseInner() + .withKind("btkuwhh").withMetadata(new ConfluentListMetadata().withFirst("k").withLast("oxafn") + .withPrev("lpichk").withNext("mkcdyhbpkkpwdre").withTotalSize(1405054510)) + .withData(Arrays.asList("qfovljxywsuws")); + model = BinaryData.fromObject(model).toObject(AccessRoleBindingNameListSuccessResponseInner.class); + Assertions.assertEquals("btkuwhh", model.kind()); + Assertions.assertEquals("k", model.metadata().first()); + Assertions.assertEquals("oxafn", model.metadata().last()); + Assertions.assertEquals("lpichk", model.metadata().prev()); + Assertions.assertEquals("mkcdyhbpkkpwdre", model.metadata().next()); + Assertions.assertEquals(1405054510, model.metadata().totalSize()); + Assertions.assertEquals("qfovljxywsuws", model.data().get(0)); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyOwnerEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyOwnerEntityTests.java new file mode 100644 index 000000000000..78e3ff74276c --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyOwnerEntityTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.ApiKeyOwnerEntity; +import org.junit.jupiter.api.Assertions; + +public final class ApiKeyOwnerEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApiKeyOwnerEntity model = BinaryData + .fromString("{\"id\":\"htba\",\"related\":\"gx\",\"resourceName\":\"rc\",\"kind\":\"yklyhpluodpvruud\"}") + .toObject(ApiKeyOwnerEntity.class); + Assertions.assertEquals("htba", model.id()); + Assertions.assertEquals("gx", model.related()); + Assertions.assertEquals("rc", model.resourceName()); + Assertions.assertEquals("yklyhpluodpvruud", model.kind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApiKeyOwnerEntity model = new ApiKeyOwnerEntity().withId("htba").withRelated("gx").withResourceName("rc") + .withKind("yklyhpluodpvruud"); + model = BinaryData.fromObject(model).toObject(ApiKeyOwnerEntity.class); + Assertions.assertEquals("htba", model.id()); + Assertions.assertEquals("gx", model.related()); + Assertions.assertEquals("rc", model.resourceName()); + Assertions.assertEquals("yklyhpluodpvruud", model.kind()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyResourceEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyResourceEntityTests.java new file mode 100644 index 000000000000..d88ccdd1fee8 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ApiKeyResourceEntityTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.ApiKeyResourceEntity; +import org.junit.jupiter.api.Assertions; + +public final class ApiKeyResourceEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApiKeyResourceEntity model = BinaryData.fromString( + "{\"id\":\"jmsvpkjp\",\"environment\":\"kwcf\",\"related\":\"ljyxgtczhe\",\"resourceName\":\"bsdshmkxmaehvbbx\",\"kind\":\"iplt\"}") + .toObject(ApiKeyResourceEntity.class); + Assertions.assertEquals("jmsvpkjp", model.id()); + Assertions.assertEquals("kwcf", model.environment()); + Assertions.assertEquals("ljyxgtczhe", model.related()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.resourceName()); + Assertions.assertEquals("iplt", model.kind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApiKeyResourceEntity model = new ApiKeyResourceEntity().withId("jmsvpkjp").withEnvironment("kwcf") + .withRelated("ljyxgtczhe").withResourceName("bsdshmkxmaehvbbx").withKind("iplt"); + model = BinaryData.fromObject(model).toObject(ApiKeyResourceEntity.class); + Assertions.assertEquals("jmsvpkjp", model.id()); + Assertions.assertEquals("kwcf", model.environment()); + Assertions.assertEquals("ljyxgtczhe", model.related()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.resourceName()); + Assertions.assertEquals("iplt", model.kind()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ClusterPropertiesTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ClusterPropertiesTests.java new file mode 100644 index 000000000000..e7cca66af596 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ClusterPropertiesTests.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.ClusterProperties; +import com.azure.resourcemanager.confluent.models.ClusterConfigEntity; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.SCClusterByokEntity; +import com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import org.junit.jupiter.api.Assertions; + +public final class ClusterPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterProperties model = BinaryData.fromString( + "{\"metadata\":{\"self\":\"vxccedcp\",\"resourceName\":\"dyodnwzxltj\",\"createdTimestamp\":\"nhltiugcxn\",\"updatedTimestamp\":\"vwxqibyqunyo\",\"deletedTimestamp\":\"wlmdjrkv\"},\"spec\":{\"name\":\"vfvpdbodaciz\",\"availability\":\"q\",\"cloud\":\"krribdeibqi\",\"zone\":\"kghv\",\"region\":\"dzwmkrefajpj\",\"kafkaBootstrapEndpoint\":\"wkqnyhg\",\"httpEndpoint\":\"j\",\"apiEndpoint\":\"ivfxzsjabibsyst\",\"config\":{\"kind\":\"sdjpvkvp\"},\"environment\":{\"id\":\"bkzbzkd\",\"environment\":\"cjabudurgkakmo\",\"related\":\"hjjklff\",\"resourceName\":\"ouw\"},\"network\":{\"id\":\"zrfze\",\"environment\":\"ebizikayuh\",\"related\":\"bjbsybb\",\"resourceName\":\"r\"},\"byok\":{\"id\":\"dgmfpgvmpipasl\",\"related\":\"aqfxss\",\"resourceName\":\"u\"}},\"status\":{\"phase\":\"dsrezpdrhneuyow\",\"cku\":150720980}}") + .toObject(ClusterProperties.class); + Assertions.assertEquals("vxccedcp", model.metadata().self()); + Assertions.assertEquals("dyodnwzxltj", model.metadata().resourceName()); + Assertions.assertEquals("nhltiugcxn", model.metadata().createdTimestamp()); + Assertions.assertEquals("vwxqibyqunyo", model.metadata().updatedTimestamp()); + Assertions.assertEquals("wlmdjrkv", model.metadata().deletedTimestamp()); + Assertions.assertEquals("vfvpdbodaciz", model.spec().name()); + Assertions.assertEquals("q", model.spec().availability()); + Assertions.assertEquals("krribdeibqi", model.spec().cloud()); + Assertions.assertEquals("kghv", model.spec().zone()); + Assertions.assertEquals("dzwmkrefajpj", model.spec().region()); + Assertions.assertEquals("wkqnyhg", model.spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("j", model.spec().httpEndpoint()); + Assertions.assertEquals("ivfxzsjabibsyst", model.spec().apiEndpoint()); + Assertions.assertEquals("sdjpvkvp", model.spec().config().kind()); + Assertions.assertEquals("bkzbzkd", model.spec().environment().id()); + Assertions.assertEquals("cjabudurgkakmo", model.spec().environment().environment()); + Assertions.assertEquals("hjjklff", model.spec().environment().related()); + Assertions.assertEquals("ouw", model.spec().environment().resourceName()); + Assertions.assertEquals("zrfze", model.spec().network().id()); + Assertions.assertEquals("ebizikayuh", model.spec().network().environment()); + Assertions.assertEquals("bjbsybb", model.spec().network().related()); + Assertions.assertEquals("r", model.spec().network().resourceName()); + Assertions.assertEquals("dgmfpgvmpipasl", model.spec().byok().id()); + Assertions.assertEquals("aqfxss", model.spec().byok().related()); + Assertions.assertEquals("u", model.spec().byok().resourceName()); + Assertions.assertEquals("dsrezpdrhneuyow", model.status().phase()); + Assertions.assertEquals(150720980, model.status().cku()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ClusterProperties model = new ClusterProperties() + .withMetadata(new SCMetadataEntity().withSelf("vxccedcp").withResourceName("dyodnwzxltj") + .withCreatedTimestamp("nhltiugcxn").withUpdatedTimestamp("vwxqibyqunyo") + .withDeletedTimestamp("wlmdjrkv")) + .withSpec(new SCClusterSpecEntity().withName("vfvpdbodaciz").withAvailability("q").withCloud("krribdeibqi") + .withZone("kghv").withRegion("dzwmkrefajpj").withKafkaBootstrapEndpoint("wkqnyhg").withHttpEndpoint("j") + .withApiEndpoint("ivfxzsjabibsyst").withConfig(new ClusterConfigEntity().withKind("sdjpvkvp")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("bkzbzkd") + .withEnvironment("cjabudurgkakmo").withRelated("hjjklff").withResourceName("ouw")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("zrfze").withEnvironment("ebizikayuh") + .withRelated("bjbsybb").withResourceName("r")) + .withByok( + new SCClusterByokEntity().withId("dgmfpgvmpipasl").withRelated("aqfxss").withResourceName("u"))) + .withStatus(new ClusterStatusEntity().withPhase("dsrezpdrhneuyow").withCku(150720980)); + model = BinaryData.fromObject(model).toObject(ClusterProperties.class); + Assertions.assertEquals("vxccedcp", model.metadata().self()); + Assertions.assertEquals("dyodnwzxltj", model.metadata().resourceName()); + Assertions.assertEquals("nhltiugcxn", model.metadata().createdTimestamp()); + Assertions.assertEquals("vwxqibyqunyo", model.metadata().updatedTimestamp()); + Assertions.assertEquals("wlmdjrkv", model.metadata().deletedTimestamp()); + Assertions.assertEquals("vfvpdbodaciz", model.spec().name()); + Assertions.assertEquals("q", model.spec().availability()); + Assertions.assertEquals("krribdeibqi", model.spec().cloud()); + Assertions.assertEquals("kghv", model.spec().zone()); + Assertions.assertEquals("dzwmkrefajpj", model.spec().region()); + Assertions.assertEquals("wkqnyhg", model.spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("j", model.spec().httpEndpoint()); + Assertions.assertEquals("ivfxzsjabibsyst", model.spec().apiEndpoint()); + Assertions.assertEquals("sdjpvkvp", model.spec().config().kind()); + Assertions.assertEquals("bkzbzkd", model.spec().environment().id()); + Assertions.assertEquals("cjabudurgkakmo", model.spec().environment().environment()); + Assertions.assertEquals("hjjklff", model.spec().environment().related()); + Assertions.assertEquals("ouw", model.spec().environment().resourceName()); + Assertions.assertEquals("zrfze", model.spec().network().id()); + Assertions.assertEquals("ebizikayuh", model.spec().network().environment()); + Assertions.assertEquals("bjbsybb", model.spec().network().related()); + Assertions.assertEquals("r", model.spec().network().resourceName()); + Assertions.assertEquals("dgmfpgvmpipasl", model.spec().byok().id()); + Assertions.assertEquals("aqfxss", model.spec().byok().related()); + Assertions.assertEquals("u", model.spec().byok().resourceName()); + Assertions.assertEquals("dsrezpdrhneuyow", model.status().phase()); + Assertions.assertEquals(150720980, model.status().cku()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/CreateApiKeyModelTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/CreateApiKeyModelTests.java new file mode 100644 index 000000000000..38e239c1e8e2 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/CreateApiKeyModelTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.CreateApiKeyModel; +import org.junit.jupiter.api.Assertions; + +public final class CreateApiKeyModelTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CreateApiKeyModel model + = BinaryData.fromString("{\"name\":\"wp\",\"description\":\"sutrgjup\"}").toObject(CreateApiKeyModel.class); + Assertions.assertEquals("wp", model.name()); + Assertions.assertEquals("sutrgjup", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CreateApiKeyModel model = new CreateApiKeyModel().withName("wp").withDescription("sutrgjup"); + model = BinaryData.fromObject(model).toObject(CreateApiKeyModel.class); + Assertions.assertEquals("wp", model.name()); + Assertions.assertEquals("sutrgjup", model.description()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/EnvironmentPropertiesTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/EnvironmentPropertiesTests.java new file mode 100644 index 000000000000..d251f4b2b8ce --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/EnvironmentPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.EnvironmentProperties; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import org.junit.jupiter.api.Assertions; + +public final class EnvironmentPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EnvironmentProperties model = BinaryData.fromString( + "{\"metadata\":{\"self\":\"jhxbld\",\"resourceName\":\"wwrlkdmtncv\",\"createdTimestamp\":\"otllxdyhgsyo\",\"updatedTimestamp\":\"gjltdtbnnhado\",\"deletedTimestamp\":\"rkvcikhnvpa\"}}") + .toObject(EnvironmentProperties.class); + Assertions.assertEquals("jhxbld", model.metadata().self()); + Assertions.assertEquals("wwrlkdmtncv", model.metadata().resourceName()); + Assertions.assertEquals("otllxdyhgsyo", model.metadata().createdTimestamp()); + Assertions.assertEquals("gjltdtbnnhado", model.metadata().updatedTimestamp()); + Assertions.assertEquals("rkvcikhnvpa", model.metadata().deletedTimestamp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EnvironmentProperties model = new EnvironmentProperties().withMetadata(new SCMetadataEntity().withSelf("jhxbld") + .withResourceName("wwrlkdmtncv").withCreatedTimestamp("otllxdyhgsyo").withUpdatedTimestamp("gjltdtbnnhado") + .withDeletedTimestamp("rkvcikhnvpa")); + model = BinaryData.fromObject(model).toObject(EnvironmentProperties.class); + Assertions.assertEquals("jhxbld", model.metadata().self()); + Assertions.assertEquals("wwrlkdmtncv", model.metadata().resourceName()); + Assertions.assertEquals("otllxdyhgsyo", model.metadata().createdTimestamp()); + Assertions.assertEquals("gjltdtbnnhado", model.metadata().updatedTimestamp()); + Assertions.assertEquals("rkvcikhnvpa", model.metadata().deletedTimestamp()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/GetEnvironmentsResponseTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/GetEnvironmentsResponseTests.java new file mode 100644 index 000000000000..bf5db74e2766 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/GetEnvironmentsResponseTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.models.GetEnvironmentsResponse; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class GetEnvironmentsResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetEnvironmentsResponse model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"dsytgadgvr\",\"id\":\"aeneqnzarrwl\",\"properties\":{\"metadata\":{\"self\":\"jfqka\",\"resourceName\":\"wiipfpub\",\"createdTimestamp\":\"bwwift\",\"updatedTimestamp\":\"qkvpuvksgplsakn\",\"deletedTimestamp\":\"fsynljphuop\"}},\"name\":\"dlqiyntorzih\"}],\"nextLink\":\"osjswsr\"}") + .toObject(GetEnvironmentsResponse.class); + Assertions.assertEquals("dsytgadgvr", model.value().get(0).kind()); + Assertions.assertEquals("aeneqnzarrwl", model.value().get(0).id()); + Assertions.assertEquals("dlqiyntorzih", model.value().get(0).name()); + Assertions.assertEquals("jfqka", model.value().get(0).metadata().self()); + Assertions.assertEquals("wiipfpub", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("bwwift", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("qkvpuvksgplsakn", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("fsynljphuop", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("osjswsr", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GetEnvironmentsResponse model + = new GetEnvironmentsResponse().withValue(Arrays.asList( + new SCEnvironmentRecordInner().withKind("dsytgadgvr").withId("aeneqnzarrwl").withName("dlqiyntorzih") + .withMetadata(new SCMetadataEntity().withSelf("jfqka").withResourceName("wiipfpub") + .withCreatedTimestamp("bwwift").withUpdatedTimestamp("qkvpuvksgplsakn") + .withDeletedTimestamp("fsynljphuop")))) + .withNextLink("osjswsr"); + model = BinaryData.fromObject(model).toObject(GetEnvironmentsResponse.class); + Assertions.assertEquals("dsytgadgvr", model.value().get(0).kind()); + Assertions.assertEquals("aeneqnzarrwl", model.value().get(0).id()); + Assertions.assertEquals("dlqiyntorzih", model.value().get(0).name()); + Assertions.assertEquals("jfqka", model.value().get(0).metadata().self()); + Assertions.assertEquals("wiipfpub", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("bwwift", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("qkvpuvksgplsakn", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("fsynljphuop", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("osjswsr", model.nextLink()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListClustersSuccessResponseTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListClustersSuccessResponseTests.java new file mode 100644 index 000000000000..2ee82ca335f9 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListClustersSuccessResponseTests.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.models.ClusterConfigEntity; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.ListClustersSuccessResponse; +import com.azure.resourcemanager.confluent.models.SCClusterByokEntity; +import com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ListClustersSuccessResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListClustersSuccessResponse model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"mtdaa\",\"id\":\"dvwvgpio\",\"properties\":{\"metadata\":{\"self\":\"rtfudxepxg\",\"resourceName\":\"agvrvmnpkuk\",\"createdTimestamp\":\"i\",\"updatedTimestamp\":\"blxgwimf\",\"deletedTimestamp\":\"hfjx\"},\"spec\":{\"name\":\"zk\",\"availability\":\"oqreyfkzikfjawn\",\"cloud\":\"ivx\",\"zone\":\"zel\",\"region\":\"irels\",\"kafkaBootstrapEndpoint\":\"aenwabf\",\"httpEndpoint\":\"kl\",\"apiEndpoint\":\"xbjhwuaanozjosph\",\"config\":{\"kind\":\"l\"},\"environment\":{\"id\":\"v\",\"environment\":\"glrvimjwosytxi\",\"related\":\"skfc\",\"resourceName\":\"qumiek\"},\"network\":{\"id\":\"zikhl\",\"environment\":\"jhdgqggebdunyga\",\"related\":\"idb\",\"resourceName\":\"atpxl\"},\"byok\":{\"id\":\"cyjmoadsuvarmy\",\"related\":\"mjsjqb\",\"resourceName\":\"hyxxrwlycoduhpk\"}},\"status\":{\"phase\":\"ymareqnajxqugj\",\"cku\":123081657}},\"name\":\"ubeddg\"},{\"kind\":\"ofwq\",\"id\":\"qal\",\"properties\":{\"metadata\":{\"self\":\"jijpxac\",\"resourceName\":\"udfnbyxba\",\"createdTimestamp\":\"bjyvay\",\"updatedTimestamp\":\"imrzrtuzqog\",\"deletedTimestamp\":\"xnevfdnwn\"},\"spec\":{\"name\":\"wzsyyceuzs\",\"availability\":\"bjudpfrxtrthzv\",\"cloud\":\"tdwkqbrq\",\"zone\":\"paxh\",\"region\":\"iilivpdtiirqtd\",\"kafkaBootstrapEndpoint\":\"axoruzfgsquy\",\"httpEndpoint\":\"rxxle\",\"apiEndpoint\":\"ramxjezwlwnw\",\"config\":{\"kind\":\"lcvydy\"},\"environment\":{\"id\":\"dooaojkniodko\",\"environment\":\"bw\",\"related\":\"jhemms\",\"resourceName\":\"dkcrodt\"},\"network\":{\"id\":\"fw\",\"environment\":\"fltkacjv\",\"related\":\"kdlfoa\",\"resourceName\":\"gkfpaga\"},\"byok\":{\"id\":\"ulpqblylsyxkqjn\",\"related\":\"ervtiagxs\",\"resourceName\":\"zuempsbzkf\"}},\"status\":{\"phase\":\"yvpnqicvinvkjj\",\"cku\":602936654}},\"name\":\"buukzclewyhml\"},{\"kind\":\"aztz\",\"id\":\"fn\",\"properties\":{\"metadata\":{\"self\":\"yfzqwhxxbu\",\"resourceName\":\"a\",\"createdTimestamp\":\"feqztppriol\",\"updatedTimestamp\":\"rjaltolmncw\",\"deletedTimestamp\":\"bqwcsdbnwdcf\"},\"spec\":{\"name\":\"qdpfuvglsbjjca\",\"availability\":\"xbvtvudu\",\"cloud\":\"cormr\",\"zone\":\"qtvcofudflvkgj\",\"region\":\"gdknnqv\",\"kafkaBootstrapEndpoint\":\"znqntoru\",\"httpEndpoint\":\"gsahmkycgrauw\",\"apiEndpoint\":\"etaebu\",\"config\":{\"kind\":\"dmovsm\"},\"environment\":{\"id\":\"wabm\",\"environment\":\"efkifr\",\"related\":\"puqujmqlgkfbtn\",\"resourceName\":\"aongbj\"},\"network\":{\"id\":\"ujitcjedftww\",\"environment\":\"zkoj\",\"related\":\"c\",\"resourceName\":\"foqouicybx\"},\"byok\":{\"id\":\"gszufoxciqopid\",\"related\":\"mciodhkhazxkhn\",\"resourceName\":\"onlwntoeg\"}},\"status\":{\"phase\":\"wbw\",\"cku\":924333329}},\"name\":\"zcmrvexztvb\"}],\"nextLink\":\"gsfraoyzkoow\"}") + .toObject(ListClustersSuccessResponse.class); + Assertions.assertEquals("mtdaa", model.value().get(0).kind()); + Assertions.assertEquals("dvwvgpio", model.value().get(0).id()); + Assertions.assertEquals("ubeddg", model.value().get(0).name()); + Assertions.assertEquals("rtfudxepxg", model.value().get(0).metadata().self()); + Assertions.assertEquals("agvrvmnpkuk", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("i", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("blxgwimf", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("hfjx", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("zk", model.value().get(0).spec().name()); + Assertions.assertEquals("oqreyfkzikfjawn", model.value().get(0).spec().availability()); + Assertions.assertEquals("ivx", model.value().get(0).spec().cloud()); + Assertions.assertEquals("zel", model.value().get(0).spec().zone()); + Assertions.assertEquals("irels", model.value().get(0).spec().region()); + Assertions.assertEquals("aenwabf", model.value().get(0).spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("kl", model.value().get(0).spec().httpEndpoint()); + Assertions.assertEquals("xbjhwuaanozjosph", model.value().get(0).spec().apiEndpoint()); + Assertions.assertEquals("l", model.value().get(0).spec().config().kind()); + Assertions.assertEquals("v", model.value().get(0).spec().environment().id()); + Assertions.assertEquals("glrvimjwosytxi", model.value().get(0).spec().environment().environment()); + Assertions.assertEquals("skfc", model.value().get(0).spec().environment().related()); + Assertions.assertEquals("qumiek", model.value().get(0).spec().environment().resourceName()); + Assertions.assertEquals("zikhl", model.value().get(0).spec().network().id()); + Assertions.assertEquals("jhdgqggebdunyga", model.value().get(0).spec().network().environment()); + Assertions.assertEquals("idb", model.value().get(0).spec().network().related()); + Assertions.assertEquals("atpxl", model.value().get(0).spec().network().resourceName()); + Assertions.assertEquals("cyjmoadsuvarmy", model.value().get(0).spec().byok().id()); + Assertions.assertEquals("mjsjqb", model.value().get(0).spec().byok().related()); + Assertions.assertEquals("hyxxrwlycoduhpk", model.value().get(0).spec().byok().resourceName()); + Assertions.assertEquals("ymareqnajxqugj", model.value().get(0).status().phase()); + Assertions.assertEquals(123081657, model.value().get(0).status().cku()); + Assertions.assertEquals("gsfraoyzkoow", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ListClustersSuccessResponse model = new ListClustersSuccessResponse() + .withValue(Arrays.asList( + new SCClusterRecordInner().withKind("mtdaa").withId("dvwvgpio").withName("ubeddg") + .withMetadata(new SCMetadataEntity().withSelf("rtfudxepxg").withResourceName("agvrvmnpkuk") + .withCreatedTimestamp("i").withUpdatedTimestamp("blxgwimf").withDeletedTimestamp("hfjx")) + .withSpec(new SCClusterSpecEntity().withName("zk").withAvailability("oqreyfkzikfjawn") + .withCloud("ivx").withZone("zel").withRegion("irels").withKafkaBootstrapEndpoint("aenwabf") + .withHttpEndpoint("kl").withApiEndpoint("xbjhwuaanozjosph") + .withConfig(new ClusterConfigEntity().withKind("l")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("v") + .withEnvironment("glrvimjwosytxi").withRelated("skfc").withResourceName("qumiek")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("zikhl") + .withEnvironment("jhdgqggebdunyga").withRelated("idb").withResourceName("atpxl")) + .withByok(new SCClusterByokEntity().withId("cyjmoadsuvarmy").withRelated("mjsjqb") + .withResourceName("hyxxrwlycoduhpk"))) + .withStatus(new ClusterStatusEntity().withPhase("ymareqnajxqugj").withCku(123081657)), + new SCClusterRecordInner().withKind("ofwq").withId("qal").withName("buukzclewyhml") + .withMetadata(new SCMetadataEntity().withSelf("jijpxac").withResourceName("udfnbyxba") + .withCreatedTimestamp("bjyvay").withUpdatedTimestamp("imrzrtuzqog") + .withDeletedTimestamp("xnevfdnwn")) + .withSpec(new SCClusterSpecEntity().withName("wzsyyceuzs").withAvailability("bjudpfrxtrthzv") + .withCloud("tdwkqbrq").withZone("paxh").withRegion("iilivpdtiirqtd") + .withKafkaBootstrapEndpoint("axoruzfgsquy").withHttpEndpoint("rxxle") + .withApiEndpoint("ramxjezwlwnw").withConfig(new ClusterConfigEntity().withKind("lcvydy")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("dooaojkniodko") + .withEnvironment("bw").withRelated("jhemms").withResourceName("dkcrodt")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("fw").withEnvironment("fltkacjv") + .withRelated("kdlfoa").withResourceName("gkfpaga")) + .withByok(new SCClusterByokEntity().withId("ulpqblylsyxkqjn").withRelated("ervtiagxs") + .withResourceName("zuempsbzkf"))) + .withStatus(new ClusterStatusEntity().withPhase("yvpnqicvinvkjj").withCku(602936654)), + new SCClusterRecordInner().withKind("aztz").withId("fn").withName("zcmrvexztvb") + .withMetadata(new SCMetadataEntity().withSelf("yfzqwhxxbu").withResourceName("a") + .withCreatedTimestamp("feqztppriol").withUpdatedTimestamp("rjaltolmncw") + .withDeletedTimestamp("bqwcsdbnwdcf")) + .withSpec(new SCClusterSpecEntity().withName("qdpfuvglsbjjca").withAvailability("xbvtvudu") + .withCloud("cormr").withZone("qtvcofudflvkgj").withRegion("gdknnqv") + .withKafkaBootstrapEndpoint("znqntoru").withHttpEndpoint("gsahmkycgrauw") + .withApiEndpoint("etaebu").withConfig(new ClusterConfigEntity().withKind("dmovsm")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("wabm") + .withEnvironment("efkifr").withRelated("puqujmqlgkfbtn").withResourceName("aongbj")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("ujitcjedftww") + .withEnvironment("zkoj").withRelated("c").withResourceName("foqouicybx")) + .withByok(new SCClusterByokEntity().withId("gszufoxciqopid").withRelated("mciodhkhazxkhn") + .withResourceName("onlwntoeg"))) + .withStatus(new ClusterStatusEntity().withPhase("wbw").withCku(924333329)))) + .withNextLink("gsfraoyzkoow"); + model = BinaryData.fromObject(model).toObject(ListClustersSuccessResponse.class); + Assertions.assertEquals("mtdaa", model.value().get(0).kind()); + Assertions.assertEquals("dvwvgpio", model.value().get(0).id()); + Assertions.assertEquals("ubeddg", model.value().get(0).name()); + Assertions.assertEquals("rtfudxepxg", model.value().get(0).metadata().self()); + Assertions.assertEquals("agvrvmnpkuk", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("i", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("blxgwimf", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("hfjx", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("zk", model.value().get(0).spec().name()); + Assertions.assertEquals("oqreyfkzikfjawn", model.value().get(0).spec().availability()); + Assertions.assertEquals("ivx", model.value().get(0).spec().cloud()); + Assertions.assertEquals("zel", model.value().get(0).spec().zone()); + Assertions.assertEquals("irels", model.value().get(0).spec().region()); + Assertions.assertEquals("aenwabf", model.value().get(0).spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("kl", model.value().get(0).spec().httpEndpoint()); + Assertions.assertEquals("xbjhwuaanozjosph", model.value().get(0).spec().apiEndpoint()); + Assertions.assertEquals("l", model.value().get(0).spec().config().kind()); + Assertions.assertEquals("v", model.value().get(0).spec().environment().id()); + Assertions.assertEquals("glrvimjwosytxi", model.value().get(0).spec().environment().environment()); + Assertions.assertEquals("skfc", model.value().get(0).spec().environment().related()); + Assertions.assertEquals("qumiek", model.value().get(0).spec().environment().resourceName()); + Assertions.assertEquals("zikhl", model.value().get(0).spec().network().id()); + Assertions.assertEquals("jhdgqggebdunyga", model.value().get(0).spec().network().environment()); + Assertions.assertEquals("idb", model.value().get(0).spec().network().related()); + Assertions.assertEquals("atpxl", model.value().get(0).spec().network().resourceName()); + Assertions.assertEquals("cyjmoadsuvarmy", model.value().get(0).spec().byok().id()); + Assertions.assertEquals("mjsjqb", model.value().get(0).spec().byok().related()); + Assertions.assertEquals("hyxxrwlycoduhpk", model.value().get(0).spec().byok().resourceName()); + Assertions.assertEquals("ymareqnajxqugj", model.value().get(0).status().phase()); + Assertions.assertEquals(123081657, model.value().get(0).status().cku()); + Assertions.assertEquals("gsfraoyzkoow", model.nextLink()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListRegionsSuccessResponseInnerTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListRegionsSuccessResponseInnerTests.java new file mode 100644 index 000000000000..3b84bee5c205 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListRegionsSuccessResponseInnerTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.ListRegionsSuccessResponseInner; +import com.azure.resourcemanager.confluent.models.RegionRecord; +import com.azure.resourcemanager.confluent.models.RegionSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ListRegionsSuccessResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListRegionsSuccessResponseInner model = BinaryData.fromString( + "{\"data\":[{\"kind\":\"vvt\",\"id\":\"einqf\",\"properties\":{\"metadata\":{\"self\":\"qknp\",\"resourceName\":\"gnepttwqmsni\",\"createdTimestamp\":\"cdm\",\"updatedTimestamp\":\"r\",\"deletedTimestamp\":\"lpijnkrxfrd\"},\"spec\":{\"name\":\"ratiz\",\"cloud\":\"onasxifto\",\"regionName\":\"yzhftwesgogczh\",\"packages\":[\"xkr\",\"gnyhmossxkkg\",\"h\",\"rghxjb\"]}}}]}") + .toObject(ListRegionsSuccessResponseInner.class); + Assertions.assertEquals("vvt", model.data().get(0).kind()); + Assertions.assertEquals("einqf", model.data().get(0).id()); + Assertions.assertEquals("qknp", model.data().get(0).metadata().self()); + Assertions.assertEquals("gnepttwqmsni", model.data().get(0).metadata().resourceName()); + Assertions.assertEquals("cdm", model.data().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("r", model.data().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("lpijnkrxfrd", model.data().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("ratiz", model.data().get(0).spec().name()); + Assertions.assertEquals("onasxifto", model.data().get(0).spec().cloud()); + Assertions.assertEquals("yzhftwesgogczh", model.data().get(0).spec().regionName()); + Assertions.assertEquals("xkr", model.data().get(0).spec().packages().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ListRegionsSuccessResponseInner model = new ListRegionsSuccessResponseInner() + .withData(Arrays.asList(new RegionRecord().withKind("vvt").withId("einqf") + .withMetadata(new SCMetadataEntity().withSelf("qknp").withResourceName("gnepttwqmsni") + .withCreatedTimestamp("cdm").withUpdatedTimestamp("r").withDeletedTimestamp("lpijnkrxfrd")) + .withSpec( + new RegionSpecEntity().withName("ratiz").withCloud("onasxifto").withRegionName("yzhftwesgogczh") + .withPackages(Arrays.asList("xkr", "gnyhmossxkkg", "h", "rghxjb"))))); + model = BinaryData.fromObject(model).toObject(ListRegionsSuccessResponseInner.class); + Assertions.assertEquals("vvt", model.data().get(0).kind()); + Assertions.assertEquals("einqf", model.data().get(0).id()); + Assertions.assertEquals("qknp", model.data().get(0).metadata().self()); + Assertions.assertEquals("gnepttwqmsni", model.data().get(0).metadata().resourceName()); + Assertions.assertEquals("cdm", model.data().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("r", model.data().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("lpijnkrxfrd", model.data().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("ratiz", model.data().get(0).spec().name()); + Assertions.assertEquals("onasxifto", model.data().get(0).spec().cloud()); + Assertions.assertEquals("yzhftwesgogczh", model.data().get(0).spec().regionName()); + Assertions.assertEquals("xkr", model.data().get(0).spec().packages().get(0)); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListSchemaRegistryClustersResponseTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListSchemaRegistryClustersResponseTests.java new file mode 100644 index 000000000000..c72c4cbd7979 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/ListSchemaRegistryClustersResponseTests.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.ListSchemaRegistryClustersResponse; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ListSchemaRegistryClustersResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListSchemaRegistryClustersResponse model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"fhwygzlvdnkfxus\",\"id\":\"dwzrmuh\",\"properties\":{\"metadata\":{\"self\":\"qdpsqxqvpsvu\",\"resourceName\":\"mgccelvezrypq\",\"createdTimestamp\":\"feo\",\"updatedTimestamp\":\"rqwky\",\"deletedTimestamp\":\"ob\"},\"spec\":{\"name\":\"xedk\",\"httpEndpoint\":\"epbqpcrfkbw\",\"package\":\"snjvcdwxlpqekftn\",\"region\":{\"id\":\"jsyingwfqatm\",\"related\":\"htmdvy\",\"resourceName\":\"ikdgszywkbir\"},\"environment\":{\"id\":\"zh\",\"related\":\"kj\",\"resourceName\":\"rvqqaatj\"},\"cloud\":\"rv\"},\"status\":{\"phase\":\"pmfi\"}}}],\"nextLink\":\"fggjioolvr\"}") + .toObject(ListSchemaRegistryClustersResponse.class); + Assertions.assertEquals("fhwygzlvdnkfxus", model.value().get(0).kind()); + Assertions.assertEquals("dwzrmuh", model.value().get(0).id()); + Assertions.assertEquals("qdpsqxqvpsvu", model.value().get(0).metadata().self()); + Assertions.assertEquals("mgccelvezrypq", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("feo", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("rqwky", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("ob", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("xedk", model.value().get(0).spec().name()); + Assertions.assertEquals("epbqpcrfkbw", model.value().get(0).spec().httpEndpoint()); + Assertions.assertEquals("snjvcdwxlpqekftn", model.value().get(0).spec().packageProperty()); + Assertions.assertEquals("jsyingwfqatm", model.value().get(0).spec().region().id()); + Assertions.assertEquals("htmdvy", model.value().get(0).spec().region().related()); + Assertions.assertEquals("ikdgszywkbir", model.value().get(0).spec().region().resourceName()); + Assertions.assertEquals("zh", model.value().get(0).spec().environment().id()); + Assertions.assertEquals("kj", model.value().get(0).spec().environment().related()); + Assertions.assertEquals("rvqqaatj", model.value().get(0).spec().environment().resourceName()); + Assertions.assertEquals("rv", model.value().get(0).spec().cloud()); + Assertions.assertEquals("pmfi", model.value().get(0).status().phase()); + Assertions.assertEquals("fggjioolvr", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ListSchemaRegistryClustersResponse model = new ListSchemaRegistryClustersResponse().withValue( + Arrays.asList(new SchemaRegistryClusterRecordInner().withKind("fhwygzlvdnkfxus").withId("dwzrmuh") + .withMetadata(new SCMetadataEntity().withSelf("qdpsqxqvpsvu").withResourceName("mgccelvezrypq") + .withCreatedTimestamp("feo").withUpdatedTimestamp("rqwky").withDeletedTimestamp("ob")) + .withSpec(new SchemaRegistryClusterSpecEntity().withName("xedk").withHttpEndpoint("epbqpcrfkbw") + .withPackageProperty("snjvcdwxlpqekftn") + .withRegion(new SchemaRegistryClusterEnvironmentRegionEntity().withId("jsyingwfqatm") + .withRelated("htmdvy").withResourceName("ikdgszywkbir")) + .withEnvironment(new SchemaRegistryClusterEnvironmentRegionEntity().withId("zh").withRelated("kj") + .withResourceName("rvqqaatj")) + .withCloud("rv")) + .withStatus(new SchemaRegistryClusterStatusEntity().withPhase("pmfi")))) + .withNextLink("fggjioolvr"); + model = BinaryData.fromObject(model).toObject(ListSchemaRegistryClustersResponse.class); + Assertions.assertEquals("fhwygzlvdnkfxus", model.value().get(0).kind()); + Assertions.assertEquals("dwzrmuh", model.value().get(0).id()); + Assertions.assertEquals("qdpsqxqvpsvu", model.value().get(0).metadata().self()); + Assertions.assertEquals("mgccelvezrypq", model.value().get(0).metadata().resourceName()); + Assertions.assertEquals("feo", model.value().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("rqwky", model.value().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("ob", model.value().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("xedk", model.value().get(0).spec().name()); + Assertions.assertEquals("epbqpcrfkbw", model.value().get(0).spec().httpEndpoint()); + Assertions.assertEquals("snjvcdwxlpqekftn", model.value().get(0).spec().packageProperty()); + Assertions.assertEquals("jsyingwfqatm", model.value().get(0).spec().region().id()); + Assertions.assertEquals("htmdvy", model.value().get(0).spec().region().related()); + Assertions.assertEquals("ikdgszywkbir", model.value().get(0).spec().region().resourceName()); + Assertions.assertEquals("zh", model.value().get(0).spec().environment().id()); + Assertions.assertEquals("kj", model.value().get(0).spec().environment().related()); + Assertions.assertEquals("rvqqaatj", model.value().get(0).spec().environment().resourceName()); + Assertions.assertEquals("rv", model.value().get(0).spec().cloud()); + Assertions.assertEquals("pmfi", model.value().get(0).status().phase()); + Assertions.assertEquals("fggjioolvr", model.nextLink()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateWithResponseMockTests.java index 1b23e78da2c1..7db090c51bdd 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateWithResponseMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsCreateWithResponseMockTests.java @@ -32,7 +32,7 @@ public void testCreateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"publisher\":\"zrpzb\",\"product\":\"ckqqzqioxiysui\",\"plan\":\"ynkedyatrwyhqmib\",\"licenseTextLink\":\"hwit\",\"privacyPolicyLink\":\"ypyynpcdpumnzg\",\"retrieveDatetime\":\"2021-04-26T17:55:24Z\",\"signature\":\"mabiknsorgjhxb\",\"accepted\":false},\"id\":\"lwwrl\",\"name\":\"dmtnc\",\"type\":\"ok\"}"; + = "{\"properties\":{\"publisher\":\"kmr\",\"product\":\"mvvhmxtdrjfuta\",\"plan\":\"ebjvewzcjzn\",\"licenseTextLink\":\"cpmguaadraufact\",\"privacyPolicyLink\":\"hzovaj\",\"retrieveDatetime\":\"2021-02-15T15:09:11Z\",\"signature\":\"xxpshneeku\",\"accepted\":false},\"id\":\"slqubkwdl\",\"name\":\"nrdsutujbazpjuoh\",\"type\":\"inyflnorwmduvwp\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,19 +50,19 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ConfluentAgreementResource response = manager.marketplaceAgreements() - .createWithResponse(new ConfluentAgreementResourceInner().withPublisher("tgadgvraeaen").withProduct("nzar") - .withPlan("lquuijfqkacewii").withLicenseTextLink("pubjibw").withPrivacyPolicyLink("f") - .withRetrieveDatetime(OffsetDateTime.parse("2021-01-20T11:33:50Z")).withSignature("kvpuvksgplsaknyn") + .createWithResponse(new ConfluentAgreementResourceInner().withPublisher("oookkqfq").withProduct("vleo") + .withPlan("ml").withLicenseTextLink("qtqzfavyv").withPrivacyPolicyLink("qybaryeua") + .withRetrieveDatetime(OffsetDateTime.parse("2021-06-23T02:25:47Z")).withSignature("abqgzslesjcbh") .withAccepted(false), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zrpzb", response.publisher()); - Assertions.assertEquals("ckqqzqioxiysui", response.product()); - Assertions.assertEquals("ynkedyatrwyhqmib", response.plan()); - Assertions.assertEquals("hwit", response.licenseTextLink()); - Assertions.assertEquals("ypyynpcdpumnzg", response.privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T17:55:24Z"), response.retrieveDatetime()); - Assertions.assertEquals("mabiknsorgjhxb", response.signature()); + Assertions.assertEquals("kmr", response.publisher()); + Assertions.assertEquals("mvvhmxtdrjfuta", response.product()); + Assertions.assertEquals("ebjvewzcjzn", response.plan()); + Assertions.assertEquals("cpmguaadraufact", response.licenseTextLink()); + Assertions.assertEquals("hzovaj", response.privacyPolicyLink()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T15:09:11Z"), response.retrieveDatetime()); + Assertions.assertEquals("xxpshneeku", response.signature()); Assertions.assertEquals(false, response.accepted()); } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListMockTests.java index 52f9c8bdbf4f..8a699f067dc1 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/MarketplaceAgreementsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"obyu\",\"product\":\"rpqlp\",\"plan\":\"cciuqgbdbutau\",\"licenseTextLink\":\"btkuwhh\",\"privacyPolicyLink\":\"ykojoxafnndlpic\",\"retrieveDatetime\":\"2021-09-25T08:27:56Z\",\"signature\":\"mkcdyhbpkkpwdre\",\"accepted\":true},\"id\":\"vvqfovljxyws\",\"name\":\"w\",\"type\":\"yrs\"}]}"; + = "{\"value\":[{\"properties\":{\"publisher\":\"bth\",\"product\":\"tgk\",\"plan\":\"tvdxeclzedqb\",\"licenseTextLink\":\"hzlhplodqkdlww\",\"privacyPolicyLink\":\"bum\",\"retrieveDatetime\":\"2021-01-09T13:22:40Z\",\"signature\":\"rqjfsmlm\",\"accepted\":true},\"id\":\"hwgfwsrt\",\"name\":\"wcoezbrhub\",\"type\":\"kh\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,14 +52,14 @@ public void testList() throws Exception { PagedIterable response = manager.marketplaceAgreements().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("obyu", response.iterator().next().publisher()); - Assertions.assertEquals("rpqlp", response.iterator().next().product()); - Assertions.assertEquals("cciuqgbdbutau", response.iterator().next().plan()); - Assertions.assertEquals("btkuwhh", response.iterator().next().licenseTextLink()); - Assertions.assertEquals("ykojoxafnndlpic", response.iterator().next().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-25T08:27:56Z"), + Assertions.assertEquals("bth", response.iterator().next().publisher()); + Assertions.assertEquals("tgk", response.iterator().next().product()); + Assertions.assertEquals("tvdxeclzedqb", response.iterator().next().plan()); + Assertions.assertEquals("hzlhplodqkdlww", response.iterator().next().licenseTextLink()); + Assertions.assertEquals("bum", response.iterator().next().privacyPolicyLink()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-09T13:22:40Z"), response.iterator().next().retrieveDatetime()); - Assertions.assertEquals("mkcdyhbpkkpwdre", response.iterator().next().signature()); + Assertions.assertEquals("rqjfsmlm", response.iterator().next().signature()); Assertions.assertEquals(true, response.iterator().next().accepted()); } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListMockTests.java index e663d0b7e9c2..ef344d83d310 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationOperationsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"name\":\"llxdyhgs\",\"display\":{\"provider\":\"ogjltdtbnnhad\",\"resource\":\"crkvcikhnv\",\"operation\":\"mqg\",\"description\":\"queziky\"},\"isDataAction\":false}]}"; + = "{\"value\":[{\"name\":\"vxwmygd\",\"display\":{\"provider\":\"pqchiszep\",\"resource\":\"bjcrxgibbdaxco\",\"operation\":\"ozauorsukokwb\",\"description\":\"lhlv\"},\"isDataAction\":false}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,11 +52,11 @@ public void testList() throws Exception { PagedIterable response = manager.organizationOperations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("llxdyhgs", response.iterator().next().name()); - Assertions.assertEquals("ogjltdtbnnhad", response.iterator().next().display().provider()); - Assertions.assertEquals("crkvcikhnv", response.iterator().next().display().resource()); - Assertions.assertEquals("mqg", response.iterator().next().display().operation()); - Assertions.assertEquals("queziky", response.iterator().next().display().description()); + Assertions.assertEquals("vxwmygd", response.iterator().next().name()); + Assertions.assertEquals("pqchiszep", response.iterator().next().display().provider()); + Assertions.assertEquals("bjcrxgibbdaxco", response.iterator().next().display().resource()); + Assertions.assertEquals("ozauorsukokwb", response.iterator().next().display().operation()); + Assertions.assertEquals("lhlv", response.iterator().next().display().description()); Assertions.assertEquals(false, response.iterator().next().isDataAction()); } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteClusterApiKeyWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteClusterApiKeyWithResponseMockTests.java new file mode 100644 index 000000000000..80670f7f3b68 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteClusterApiKeyWithResponseMockTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsDeleteClusterApiKeyWithResponseMockTests { + @Test + public void testDeleteClusterApiKeyWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.organizations().deleteClusterApiKeyWithResponse("tilaxh", "fhqlyvi", "ouwivkxoyzunbixx", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteMockTests.java index 4f09c3fe0645..6b39e9a40254 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteMockTests.java +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsDeleteMockTests.java @@ -45,7 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.organizations().delete("ggkfpagaowpul", "qblylsyxkqj", com.azure.core.util.Context.NONE); + manager.organizations().delete("sspuunnoxyhkx", "qddrihpfhoqcaae", com.azure.core.util.Context.NONE); } } diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetClusterByIdWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetClusterByIdWithResponseMockTests.java new file mode 100644 index 000000000000..f1648610186f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetClusterByIdWithResponseMockTests.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SCClusterRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsGetClusterByIdWithResponseMockTests { + @Test + public void testGetClusterByIdWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"kind\":\"bxv\",\"id\":\"htnsi\",\"properties\":{\"metadata\":{\"self\":\"z\",\"resourceName\":\"es\",\"createdTimestamp\":\"dlpagzrcxfail\",\"updatedTimestamp\":\"xwmdboxd\",\"deletedTimestamp\":\"sftufqobrjlna\"},\"spec\":{\"name\":\"ckknhxkizvy\",\"availability\":\"rzvul\",\"cloud\":\"aaeranokqgukk\",\"zone\":\"nvbroylaxx\",\"region\":\"cdisd\",\"kafkaBootstrapEndpoint\":\"fj\",\"httpEndpoint\":\"svgjrwhryvy\",\"apiEndpoint\":\"t\",\"config\":{\"kind\":\"xgccknfnw\"},\"environment\":{\"id\":\"mvpdvjdhttzaef\",\"environment\":\"x\",\"related\":\"ch\",\"resourceName\":\"hk\"},\"network\":{\"id\":\"jdqnsdfzpbgt\",\"environment\":\"ylkdghrje\",\"related\":\"tl\",\"resourceName\":\"ez\"},\"byok\":{\"id\":\"okvbwnhhtqlgehg\",\"related\":\"ipifhpfeoajvg\",\"resourceName\":\"txjcsheafidlt\"}},\"status\":{\"phase\":\"resmkssjhoiftxfk\",\"cku\":182361785}},\"name\":\"prhptillu\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SCClusterRecord response = manager.organizations().getClusterByIdWithResponse("zeexavoxtfgle", "dmdqb", + "pypqtgsfj", "cbslhhx", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("bxv", response.kind()); + Assertions.assertEquals("htnsi", response.id()); + Assertions.assertEquals("prhptillu", response.name()); + Assertions.assertEquals("z", response.metadata().self()); + Assertions.assertEquals("es", response.metadata().resourceName()); + Assertions.assertEquals("dlpagzrcxfail", response.metadata().createdTimestamp()); + Assertions.assertEquals("xwmdboxd", response.metadata().updatedTimestamp()); + Assertions.assertEquals("sftufqobrjlna", response.metadata().deletedTimestamp()); + Assertions.assertEquals("ckknhxkizvy", response.spec().name()); + Assertions.assertEquals("rzvul", response.spec().availability()); + Assertions.assertEquals("aaeranokqgukk", response.spec().cloud()); + Assertions.assertEquals("nvbroylaxx", response.spec().zone()); + Assertions.assertEquals("cdisd", response.spec().region()); + Assertions.assertEquals("fj", response.spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("svgjrwhryvy", response.spec().httpEndpoint()); + Assertions.assertEquals("t", response.spec().apiEndpoint()); + Assertions.assertEquals("xgccknfnw", response.spec().config().kind()); + Assertions.assertEquals("mvpdvjdhttzaef", response.spec().environment().id()); + Assertions.assertEquals("x", response.spec().environment().environment()); + Assertions.assertEquals("ch", response.spec().environment().related()); + Assertions.assertEquals("hk", response.spec().environment().resourceName()); + Assertions.assertEquals("jdqnsdfzpbgt", response.spec().network().id()); + Assertions.assertEquals("ylkdghrje", response.spec().network().environment()); + Assertions.assertEquals("tl", response.spec().network().related()); + Assertions.assertEquals("ez", response.spec().network().resourceName()); + Assertions.assertEquals("okvbwnhhtqlgehg", response.spec().byok().id()); + Assertions.assertEquals("ipifhpfeoajvg", response.spec().byok().related()); + Assertions.assertEquals("txjcsheafidlt", response.spec().byok().resourceName()); + Assertions.assertEquals("resmkssjhoiftxfk", response.status().phase()); + Assertions.assertEquals(182361785, response.status().cku()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetEnvironmentByIdWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetEnvironmentByIdWithResponseMockTests.java new file mode 100644 index 000000000000..8ad9dde789a6 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetEnvironmentByIdWithResponseMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SCEnvironmentRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsGetEnvironmentByIdWithResponseMockTests { + @Test + public void testGetEnvironmentByIdWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"kind\":\"lds\",\"id\":\"stjbkkdmfl\",\"properties\":{\"metadata\":{\"self\":\"mjlxrrilozapeewc\",\"resourceName\":\"xlktwkuzi\",\"createdTimestamp\":\"slevufuztc\",\"updatedTimestamp\":\"yhjtqedcgzu\",\"deletedTimestamp\":\"mmrqz\"}},\"name\":\"rjvpglydzgkrvqee\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SCEnvironmentRecord response = manager.organizations() + .getEnvironmentByIdWithResponse("wzjbh", "zsxjrkambtrneg", "mnvuqe", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("lds", response.kind()); + Assertions.assertEquals("stjbkkdmfl", response.id()); + Assertions.assertEquals("rjvpglydzgkrvqee", response.name()); + Assertions.assertEquals("mjlxrrilozapeewc", response.metadata().self()); + Assertions.assertEquals("xlktwkuzi", response.metadata().resourceName()); + Assertions.assertEquals("slevufuztc", response.metadata().createdTimestamp()); + Assertions.assertEquals("yhjtqedcgzu", response.metadata().updatedTimestamp()); + Assertions.assertEquals("mmrqz", response.metadata().deletedTimestamp()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetSchemaRegistryClusterByIdWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetSchemaRegistryClusterByIdWithResponseMockTests.java new file mode 100644 index 000000000000..135dbe7da441 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsGetSchemaRegistryClusterByIdWithResponseMockTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsGetSchemaRegistryClusterByIdWithResponseMockTests { + @Test + public void testGetSchemaRegistryClusterByIdWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"kind\":\"vjskgfmoc\",\"id\":\"hpqgatjeaahhvj\",\"properties\":{\"metadata\":{\"self\":\"kzyb\",\"resourceName\":\"jid\",\"createdTimestamp\":\"syxkyxvxevblb\",\"updatedTimestamp\":\"dnlj\",\"deletedTimestamp\":\"geuaulx\"},\"spec\":{\"name\":\"mjbnk\",\"httpEndpoint\":\"xynenl\",\"package\":\"xeizzg\",\"region\":{\"id\":\"nsrmffeycx\",\"related\":\"tpiymerteea\",\"resourceName\":\"xqiekkkzddrtk\"},\"environment\":{\"id\":\"jbmxvavre\",\"related\":\"eesvecu\",\"resourceName\":\"pxtxsuwp\"},\"cloud\":\"ujwsawddjibabxvi\"},\"status\":{\"phase\":\"v\"}}}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SchemaRegistryClusterRecord response + = manager.organizations().getSchemaRegistryClusterByIdWithResponse("ajuwas", "vdaeyyguxakjsq", "hzbezkgi", + "sidxasicdd", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("vjskgfmoc", response.kind()); + Assertions.assertEquals("hpqgatjeaahhvj", response.id()); + Assertions.assertEquals("kzyb", response.metadata().self()); + Assertions.assertEquals("jid", response.metadata().resourceName()); + Assertions.assertEquals("syxkyxvxevblb", response.metadata().createdTimestamp()); + Assertions.assertEquals("dnlj", response.metadata().updatedTimestamp()); + Assertions.assertEquals("geuaulx", response.metadata().deletedTimestamp()); + Assertions.assertEquals("mjbnk", response.spec().name()); + Assertions.assertEquals("xynenl", response.spec().httpEndpoint()); + Assertions.assertEquals("xeizzg", response.spec().packageProperty()); + Assertions.assertEquals("nsrmffeycx", response.spec().region().id()); + Assertions.assertEquals("tpiymerteea", response.spec().region().related()); + Assertions.assertEquals("xqiekkkzddrtk", response.spec().region().resourceName()); + Assertions.assertEquals("jbmxvavre", response.spec().environment().id()); + Assertions.assertEquals("eesvecu", response.spec().environment().related()); + Assertions.assertEquals("pxtxsuwp", response.spec().environment().resourceName()); + Assertions.assertEquals("ujwsawddjibabxvi", response.spec().cloud()); + Assertions.assertEquals("v", response.status().phase()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListClustersMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListClustersMockTests.java new file mode 100644 index 000000000000..50b7ad3944b1 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListClustersMockTests.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SCClusterRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsListClustersMockTests { + @Test + public void testListClusters() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"kind\":\"dflgzuri\",\"id\":\"aecxndtic\",\"properties\":{\"metadata\":{\"self\":\"zmlqtmldgxo\",\"resourceName\":\"irclnpk\",\"createdTimestamp\":\"ayzri\",\"updatedTimestamp\":\"hya\",\"deletedTimestamp\":\"vjlboxqvk\"},\"spec\":{\"name\":\"xhom\",\"availability\":\"nhdwdigumbnra\",\"cloud\":\"zzp\",\"zone\":\"a\",\"region\":\"sdzhezww\",\"kafkaBootstrapEndpoint\":\"iqyuvvfo\",\"httpEndpoint\":\"p\",\"apiEndpoint\":\"qyikvy\",\"config\":{\"kind\":\"yavluwmncstt\"},\"environment\":{\"id\":\"y\",\"environment\":\"poekrsgsgb\",\"related\":\"uzqgnjdgkynsc\",\"resourceName\":\"qhzvhxnkomt\"},\"network\":{\"id\":\"otppnv\",\"environment\":\"zxhi\",\"related\":\"rbbcevq\",\"resourceName\":\"tltdhlfkqojpy\"},\"byok\":{\"id\":\"trdcnifmzzs\",\"related\":\"m\",\"resourceName\":\"nysuxmprafwgckh\"}},\"status\":{\"phase\":\"vdff\",\"cku\":848051352}},\"name\":\"qrouda\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.organizations().listClusters("toepryu", "nwy", "pzdm", + 1383258036, "zvfvaawz", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dflgzuri", response.iterator().next().kind()); + Assertions.assertEquals("aecxndtic", response.iterator().next().id()); + Assertions.assertEquals("qrouda", response.iterator().next().name()); + Assertions.assertEquals("zmlqtmldgxo", response.iterator().next().metadata().self()); + Assertions.assertEquals("irclnpk", response.iterator().next().metadata().resourceName()); + Assertions.assertEquals("ayzri", response.iterator().next().metadata().createdTimestamp()); + Assertions.assertEquals("hya", response.iterator().next().metadata().updatedTimestamp()); + Assertions.assertEquals("vjlboxqvk", response.iterator().next().metadata().deletedTimestamp()); + Assertions.assertEquals("xhom", response.iterator().next().spec().name()); + Assertions.assertEquals("nhdwdigumbnra", response.iterator().next().spec().availability()); + Assertions.assertEquals("zzp", response.iterator().next().spec().cloud()); + Assertions.assertEquals("a", response.iterator().next().spec().zone()); + Assertions.assertEquals("sdzhezww", response.iterator().next().spec().region()); + Assertions.assertEquals("iqyuvvfo", response.iterator().next().spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("p", response.iterator().next().spec().httpEndpoint()); + Assertions.assertEquals("qyikvy", response.iterator().next().spec().apiEndpoint()); + Assertions.assertEquals("yavluwmncstt", response.iterator().next().spec().config().kind()); + Assertions.assertEquals("y", response.iterator().next().spec().environment().id()); + Assertions.assertEquals("poekrsgsgb", response.iterator().next().spec().environment().environment()); + Assertions.assertEquals("uzqgnjdgkynsc", response.iterator().next().spec().environment().related()); + Assertions.assertEquals("qhzvhxnkomt", response.iterator().next().spec().environment().resourceName()); + Assertions.assertEquals("otppnv", response.iterator().next().spec().network().id()); + Assertions.assertEquals("zxhi", response.iterator().next().spec().network().environment()); + Assertions.assertEquals("rbbcevq", response.iterator().next().spec().network().related()); + Assertions.assertEquals("tltdhlfkqojpy", response.iterator().next().spec().network().resourceName()); + Assertions.assertEquals("trdcnifmzzs", response.iterator().next().spec().byok().id()); + Assertions.assertEquals("m", response.iterator().next().spec().byok().related()); + Assertions.assertEquals("nysuxmprafwgckh", response.iterator().next().spec().byok().resourceName()); + Assertions.assertEquals("vdff", response.iterator().next().status().phase()); + Assertions.assertEquals(848051352, response.iterator().next().status().cku()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListEnvironmentsMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListEnvironmentsMockTests.java new file mode 100644 index 000000000000..4860f0e0abaf --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListEnvironmentsMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SCEnvironmentRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsListEnvironmentsMockTests { + @Test + public void testListEnvironments() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"kind\":\"kdncj\",\"id\":\"onbzoggculapzwy\",\"properties\":{\"metadata\":{\"self\":\"gtqxep\",\"resourceName\":\"lbfu\",\"createdTimestamp\":\"lyjt\",\"updatedTimestamp\":\"of\",\"deletedTimestamp\":\"hvfcibyfmow\"}},\"name\":\"rkjpvdwxfzwii\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.organizations().listEnvironments("dao", "djvlpj", + 945284283, "kzbrmsgeivsiy", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("kdncj", response.iterator().next().kind()); + Assertions.assertEquals("onbzoggculapzwy", response.iterator().next().id()); + Assertions.assertEquals("rkjpvdwxfzwii", response.iterator().next().name()); + Assertions.assertEquals("gtqxep", response.iterator().next().metadata().self()); + Assertions.assertEquals("lbfu", response.iterator().next().metadata().resourceName()); + Assertions.assertEquals("lyjt", response.iterator().next().metadata().createdTimestamp()); + Assertions.assertEquals("of", response.iterator().next().metadata().updatedTimestamp()); + Assertions.assertEquals("hvfcibyfmow", response.iterator().next().metadata().deletedTimestamp()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListRegionsWithResponseMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListRegionsWithResponseMockTests.java new file mode 100644 index 000000000000..bc6c140a4d4f --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListRegionsWithResponseMockTests.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.ListAccessRequestModel; +import com.azure.resourcemanager.confluent.models.ListRegionsSuccessResponse; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsListRegionsWithResponseMockTests { + @Test + public void testListRegionsWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"data\":[{\"kind\":\"vekqvgqo\",\"id\":\"ifzmpjwyivqi\",\"properties\":{\"metadata\":{\"self\":\"vhrfsphuagrt\",\"resourceName\":\"kteusqczk\",\"createdTimestamp\":\"klxubyja\",\"updatedTimestamp\":\"mmfblcqcuubgqib\",\"deletedTimestamp\":\"a\"},\"spec\":{\"name\":\"tttwgdslqxih\",\"cloud\":\"moo\",\"regionName\":\"qseypxiutcxa\",\"packages\":[\"y\",\"petogebjox\",\"lhvnhlab\",\"q\"]}}},{\"kind\":\"kzjcjbtrgae\",\"id\":\"vibr\",\"properties\":{\"metadata\":{\"self\":\"toqbeitpkxztmoob\",\"resourceName\":\"ft\",\"createdTimestamp\":\"gfcwqmpimaqxzhem\",\"updatedTimestamp\":\"h\",\"deletedTimestamp\":\"uj\"},\"spec\":{\"name\":\"wkozz\",\"cloud\":\"ulkb\",\"regionName\":\"pfajnjwltlwtjj\",\"packages\":[\"talhsnvkcdmxzr\",\"oaimlnw\",\"aaomylweazu\",\"cse\"]}}},{\"kind\":\"wwnpj\",\"id\":\"fz\",\"properties\":{\"metadata\":{\"self\":\"hwahfbousn\",\"resourceName\":\"pgfewetwlyx\",\"createdTimestamp\":\"cxy\",\"updatedTimestamp\":\"hdjhlimmbcx\",\"deletedTimestamp\":\"bcporxvxcjzhqizx\"},\"spec\":{\"name\":\"tgqscjavftjuh\",\"cloud\":\"azkmtgguwp\",\"regionName\":\"r\",\"packages\":[\"ivmmghfcfiwrxgk\",\"euvyinzqodfvpgs\"]}}}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ListRegionsSuccessResponse response = manager.organizations() + .listRegionsWithResponse("cuplcplcwkhih", "hlhzdsqtzbsrgno", + new ListAccessRequestModel().withSearchFilters(mapOf("oteyowc", "hfgmvecactxm")), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("vekqvgqo", response.data().get(0).kind()); + Assertions.assertEquals("ifzmpjwyivqi", response.data().get(0).id()); + Assertions.assertEquals("vhrfsphuagrt", response.data().get(0).metadata().self()); + Assertions.assertEquals("kteusqczk", response.data().get(0).metadata().resourceName()); + Assertions.assertEquals("klxubyja", response.data().get(0).metadata().createdTimestamp()); + Assertions.assertEquals("mmfblcqcuubgqib", response.data().get(0).metadata().updatedTimestamp()); + Assertions.assertEquals("a", response.data().get(0).metadata().deletedTimestamp()); + Assertions.assertEquals("tttwgdslqxih", response.data().get(0).spec().name()); + Assertions.assertEquals("moo", response.data().get(0).spec().cloud()); + Assertions.assertEquals("qseypxiutcxa", response.data().get(0).spec().regionName()); + Assertions.assertEquals("y", response.data().get(0).spec().packages().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListSchemaRegistryClustersMockTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListSchemaRegistryClustersMockTests.java new file mode 100644 index 000000000000..8fd2bba70197 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/OrganizationsListSchemaRegistryClustersMockTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.confluent.ConfluentManager; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterRecord; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OrganizationsListSchemaRegistryClustersMockTests { + @Test + public void testListSchemaRegistryClusters() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"kind\":\"fdn\",\"id\":\"ydvfvfcjnae\",\"properties\":{\"metadata\":{\"self\":\"vhmgorffukis\",\"resourceName\":\"w\",\"createdTimestamp\":\"hwplefaxvx\",\"updatedTimestamp\":\"cbtgnhnz\",\"deletedTimestamp\":\"qxtjjfzqlqhyca\"},\"spec\":{\"name\":\"ggxdb\",\"httpEndpoint\":\"smieknlra\",\"package\":\"aawiuagydwqfb\",\"region\":{\"id\":\"rfgi\",\"related\":\"tcojocqwo\",\"resourceName\":\"nzjvusfzldm\"},\"environment\":{\"id\":\"xylfsb\",\"related\":\"adpysownbt\",\"resourceName\":\"bugrj\"},\"cloud\":\"to\"},\"status\":{\"phase\":\"isofieypefojyqd\"}}}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + ConfluentManager manager = ConfluentManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.organizations().listSchemaRegistryClusters( + "pavehhr", "kbunzoz", "dhcxgkmoy", 1670062911, "dyuib", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("fdn", response.iterator().next().kind()); + Assertions.assertEquals("ydvfvfcjnae", response.iterator().next().id()); + Assertions.assertEquals("vhmgorffukis", response.iterator().next().metadata().self()); + Assertions.assertEquals("w", response.iterator().next().metadata().resourceName()); + Assertions.assertEquals("hwplefaxvx", response.iterator().next().metadata().createdTimestamp()); + Assertions.assertEquals("cbtgnhnz", response.iterator().next().metadata().updatedTimestamp()); + Assertions.assertEquals("qxtjjfzqlqhyca", response.iterator().next().metadata().deletedTimestamp()); + Assertions.assertEquals("ggxdb", response.iterator().next().spec().name()); + Assertions.assertEquals("smieknlra", response.iterator().next().spec().httpEndpoint()); + Assertions.assertEquals("aawiuagydwqfb", response.iterator().next().spec().packageProperty()); + Assertions.assertEquals("rfgi", response.iterator().next().spec().region().id()); + Assertions.assertEquals("tcojocqwo", response.iterator().next().spec().region().related()); + Assertions.assertEquals("nzjvusfzldm", response.iterator().next().spec().region().resourceName()); + Assertions.assertEquals("xylfsb", response.iterator().next().spec().environment().id()); + Assertions.assertEquals("adpysownbt", response.iterator().next().spec().environment().related()); + Assertions.assertEquals("bugrj", response.iterator().next().spec().environment().resourceName()); + Assertions.assertEquals("to", response.iterator().next().spec().cloud()); + Assertions.assertEquals("isofieypefojyqd", response.iterator().next().status().phase()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionPropertiesTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionPropertiesTests.java new file mode 100644 index 000000000000..6d02f33d7c60 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionPropertiesTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.RegionProperties; +import com.azure.resourcemanager.confluent.models.RegionSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RegionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegionProperties model = BinaryData.fromString( + "{\"metadata\":{\"self\":\"uyovw\",\"resourceName\":\"bkfezzxscyhwzdgi\",\"createdTimestamp\":\"jbzbomvzzbtdcq\",\"updatedTimestamp\":\"niyujv\",\"deletedTimestamp\":\"l\"},\"spec\":{\"name\":\"hfssnrb\",\"cloud\":\"efr\",\"regionName\":\"sgaojfmwncot\",\"packages\":[\"hirctymoxoftpipi\"]}}") + .toObject(RegionProperties.class); + Assertions.assertEquals("uyovw", model.metadata().self()); + Assertions.assertEquals("bkfezzxscyhwzdgi", model.metadata().resourceName()); + Assertions.assertEquals("jbzbomvzzbtdcq", model.metadata().createdTimestamp()); + Assertions.assertEquals("niyujv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("l", model.metadata().deletedTimestamp()); + Assertions.assertEquals("hfssnrb", model.spec().name()); + Assertions.assertEquals("efr", model.spec().cloud()); + Assertions.assertEquals("sgaojfmwncot", model.spec().regionName()); + Assertions.assertEquals("hirctymoxoftpipi", model.spec().packages().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegionProperties model = new RegionProperties() + .withMetadata(new SCMetadataEntity().withSelf("uyovw").withResourceName("bkfezzxscyhwzdgi") + .withCreatedTimestamp("jbzbomvzzbtdcq").withUpdatedTimestamp("niyujv").withDeletedTimestamp("l")) + .withSpec(new RegionSpecEntity().withName("hfssnrb").withCloud("efr").withRegionName("sgaojfmwncot") + .withPackages(Arrays.asList("hirctymoxoftpipi"))); + model = BinaryData.fromObject(model).toObject(RegionProperties.class); + Assertions.assertEquals("uyovw", model.metadata().self()); + Assertions.assertEquals("bkfezzxscyhwzdgi", model.metadata().resourceName()); + Assertions.assertEquals("jbzbomvzzbtdcq", model.metadata().createdTimestamp()); + Assertions.assertEquals("niyujv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("l", model.metadata().deletedTimestamp()); + Assertions.assertEquals("hfssnrb", model.spec().name()); + Assertions.assertEquals("efr", model.spec().cloud()); + Assertions.assertEquals("sgaojfmwncot", model.spec().regionName()); + Assertions.assertEquals("hirctymoxoftpipi", model.spec().packages().get(0)); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionRecordTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionRecordTests.java new file mode 100644 index 000000000000..4e9f7c640a56 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionRecordTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.RegionRecord; +import com.azure.resourcemanager.confluent.models.RegionSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RegionRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegionRecord model = BinaryData.fromString( + "{\"kind\":\"qxvcxgfrpdsofb\",\"id\":\"rnsvbuswd\",\"properties\":{\"metadata\":{\"self\":\"bycnunvjsrtkf\",\"resourceName\":\"nopqgikyzirtx\",\"createdTimestamp\":\"uxzejntpsew\",\"updatedTimestamp\":\"oi\",\"deletedTimestamp\":\"ukry\"},\"spec\":{\"name\":\"qmi\",\"cloud\":\"xorgg\",\"regionName\":\"hyaomtbghhavgr\",\"packages\":[\"fo\",\"jzhpjbibgjmfx\",\"mv\"]}}}") + .toObject(RegionRecord.class); + Assertions.assertEquals("qxvcxgfrpdsofb", model.kind()); + Assertions.assertEquals("rnsvbuswd", model.id()); + Assertions.assertEquals("bycnunvjsrtkf", model.metadata().self()); + Assertions.assertEquals("nopqgikyzirtx", model.metadata().resourceName()); + Assertions.assertEquals("uxzejntpsew", model.metadata().createdTimestamp()); + Assertions.assertEquals("oi", model.metadata().updatedTimestamp()); + Assertions.assertEquals("ukry", model.metadata().deletedTimestamp()); + Assertions.assertEquals("qmi", model.spec().name()); + Assertions.assertEquals("xorgg", model.spec().cloud()); + Assertions.assertEquals("hyaomtbghhavgr", model.spec().regionName()); + Assertions.assertEquals("fo", model.spec().packages().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegionRecord model = new RegionRecord().withKind("qxvcxgfrpdsofb").withId("rnsvbuswd") + .withMetadata(new SCMetadataEntity().withSelf("bycnunvjsrtkf").withResourceName("nopqgikyzirtx") + .withCreatedTimestamp("uxzejntpsew").withUpdatedTimestamp("oi").withDeletedTimestamp("ukry")) + .withSpec(new RegionSpecEntity().withName("qmi").withCloud("xorgg").withRegionName("hyaomtbghhavgr") + .withPackages(Arrays.asList("fo", "jzhpjbibgjmfx", "mv"))); + model = BinaryData.fromObject(model).toObject(RegionRecord.class); + Assertions.assertEquals("qxvcxgfrpdsofb", model.kind()); + Assertions.assertEquals("rnsvbuswd", model.id()); + Assertions.assertEquals("bycnunvjsrtkf", model.metadata().self()); + Assertions.assertEquals("nopqgikyzirtx", model.metadata().resourceName()); + Assertions.assertEquals("uxzejntpsew", model.metadata().createdTimestamp()); + Assertions.assertEquals("oi", model.metadata().updatedTimestamp()); + Assertions.assertEquals("ukry", model.metadata().deletedTimestamp()); + Assertions.assertEquals("qmi", model.spec().name()); + Assertions.assertEquals("xorgg", model.spec().cloud()); + Assertions.assertEquals("hyaomtbghhavgr", model.spec().regionName()); + Assertions.assertEquals("fo", model.spec().packages().get(0)); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionSpecEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionSpecEntityTests.java new file mode 100644 index 000000000000..31dbe74df663 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/RegionSpecEntityTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.RegionSpecEntity; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RegionSpecEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RegionSpecEntity model = BinaryData.fromString( + "{\"name\":\"czuhxacpqjlihh\",\"cloud\":\"spskasdvlmfwdgz\",\"regionName\":\"lucvpam\",\"packages\":[\"euzvx\",\"risjnhnytxifqjz\",\"xmrhu\"]}") + .toObject(RegionSpecEntity.class); + Assertions.assertEquals("czuhxacpqjlihh", model.name()); + Assertions.assertEquals("spskasdvlmfwdgz", model.cloud()); + Assertions.assertEquals("lucvpam", model.regionName()); + Assertions.assertEquals("euzvx", model.packages().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RegionSpecEntity model = new RegionSpecEntity().withName("czuhxacpqjlihh").withCloud("spskasdvlmfwdgz") + .withRegionName("lucvpam").withPackages(Arrays.asList("euzvx", "risjnhnytxifqjz", "xmrhu")); + model = BinaryData.fromObject(model).toObject(RegionSpecEntity.class); + Assertions.assertEquals("czuhxacpqjlihh", model.name()); + Assertions.assertEquals("spskasdvlmfwdgz", model.cloud()); + Assertions.assertEquals("lucvpam", model.regionName()); + Assertions.assertEquals("euzvx", model.packages().get(0)); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterByokEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterByokEntityTests.java new file mode 100644 index 000000000000..399d3e5c8097 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterByokEntityTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SCClusterByokEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCClusterByokEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCClusterByokEntity model + = BinaryData.fromString("{\"id\":\"hmtnvy\",\"related\":\"atkzwpcnpw\",\"resourceName\":\"jaesgvvsccya\"}") + .toObject(SCClusterByokEntity.class); + Assertions.assertEquals("hmtnvy", model.id()); + Assertions.assertEquals("atkzwpcnpw", model.related()); + Assertions.assertEquals("jaesgvvsccya", model.resourceName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCClusterByokEntity model + = new SCClusterByokEntity().withId("hmtnvy").withRelated("atkzwpcnpw").withResourceName("jaesgvvsccya"); + model = BinaryData.fromObject(model).toObject(SCClusterByokEntity.class); + Assertions.assertEquals("hmtnvy", model.id()); + Assertions.assertEquals("atkzwpcnpw", model.related()); + Assertions.assertEquals("jaesgvvsccya", model.resourceName()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterNetworkEnvironmentEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterNetworkEnvironmentEntityTests.java new file mode 100644 index 000000000000..65b2aaabe7e4 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterNetworkEnvironmentEntityTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCClusterNetworkEnvironmentEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCClusterNetworkEnvironmentEntity model = BinaryData.fromString( + "{\"id\":\"zdmsyqtfi\",\"environment\":\"hbotzingamvppho\",\"related\":\"qzudphq\",\"resourceName\":\"vdkfwynwcvtbvk\"}") + .toObject(SCClusterNetworkEnvironmentEntity.class); + Assertions.assertEquals("zdmsyqtfi", model.id()); + Assertions.assertEquals("hbotzingamvppho", model.environment()); + Assertions.assertEquals("qzudphq", model.related()); + Assertions.assertEquals("vdkfwynwcvtbvk", model.resourceName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCClusterNetworkEnvironmentEntity model = new SCClusterNetworkEnvironmentEntity().withId("zdmsyqtfi") + .withEnvironment("hbotzingamvppho").withRelated("qzudphq").withResourceName("vdkfwynwcvtbvk"); + model = BinaryData.fromObject(model).toObject(SCClusterNetworkEnvironmentEntity.class); + Assertions.assertEquals("zdmsyqtfi", model.id()); + Assertions.assertEquals("hbotzingamvppho", model.environment()); + Assertions.assertEquals("qzudphq", model.related()); + Assertions.assertEquals("vdkfwynwcvtbvk", model.resourceName()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterRecordInnerTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterRecordInnerTests.java new file mode 100644 index 000000000000..98e284703ca3 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterRecordInnerTests.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SCClusterRecordInner; +import com.azure.resourcemanager.confluent.models.ClusterConfigEntity; +import com.azure.resourcemanager.confluent.models.ClusterStatusEntity; +import com.azure.resourcemanager.confluent.models.SCClusterByokEntity; +import com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCClusterRecordInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCClusterRecordInner model = BinaryData.fromString( + "{\"kind\":\"mnguxawqaldsyu\",\"id\":\"imerqfobwyznk\",\"properties\":{\"metadata\":{\"self\":\"t\",\"resourceName\":\"fhpagmhrskdsnf\",\"createdTimestamp\":\"doakgtdlmkkzevdl\",\"updatedTimestamp\":\"wpusdsttwvogv\",\"deletedTimestamp\":\"ejdcngqqmoakuf\"},\"spec\":{\"name\":\"zr\",\"availability\":\"dgrtwaenuuzkopbm\",\"cloud\":\"rfdwoyu\",\"zone\":\"ziuiefozbhdm\",\"region\":\"l\",\"kafkaBootstrapEndpoint\":\"qhoftrmaequiah\",\"httpEndpoint\":\"cslfaoqzpiyylha\",\"apiEndpoint\":\"swhccsphk\",\"config\":{\"kind\":\"witqscywuggwoluh\"},\"environment\":{\"id\":\"wem\",\"environment\":\"i\",\"related\":\"brgz\",\"resourceName\":\"msweypqwdxggicc\"},\"network\":{\"id\":\"qhuexm\",\"environment\":\"tlstvlzywem\",\"related\":\"rncsdtclu\",\"resourceName\":\"ypbsfgytguslfead\"},\"byok\":{\"id\":\"qukyhejhzi\",\"related\":\"gfpelolppvksrpqv\",\"resourceName\":\"zraehtwd\"}},\"status\":{\"phase\":\"tswiby\",\"cku\":403427600}},\"name\":\"bhshfwpracstwity\"}") + .toObject(SCClusterRecordInner.class); + Assertions.assertEquals("mnguxawqaldsyu", model.kind()); + Assertions.assertEquals("imerqfobwyznk", model.id()); + Assertions.assertEquals("bhshfwpracstwity", model.name()); + Assertions.assertEquals("t", model.metadata().self()); + Assertions.assertEquals("fhpagmhrskdsnf", model.metadata().resourceName()); + Assertions.assertEquals("doakgtdlmkkzevdl", model.metadata().createdTimestamp()); + Assertions.assertEquals("wpusdsttwvogv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("ejdcngqqmoakuf", model.metadata().deletedTimestamp()); + Assertions.assertEquals("zr", model.spec().name()); + Assertions.assertEquals("dgrtwaenuuzkopbm", model.spec().availability()); + Assertions.assertEquals("rfdwoyu", model.spec().cloud()); + Assertions.assertEquals("ziuiefozbhdm", model.spec().zone()); + Assertions.assertEquals("l", model.spec().region()); + Assertions.assertEquals("qhoftrmaequiah", model.spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("cslfaoqzpiyylha", model.spec().httpEndpoint()); + Assertions.assertEquals("swhccsphk", model.spec().apiEndpoint()); + Assertions.assertEquals("witqscywuggwoluh", model.spec().config().kind()); + Assertions.assertEquals("wem", model.spec().environment().id()); + Assertions.assertEquals("i", model.spec().environment().environment()); + Assertions.assertEquals("brgz", model.spec().environment().related()); + Assertions.assertEquals("msweypqwdxggicc", model.spec().environment().resourceName()); + Assertions.assertEquals("qhuexm", model.spec().network().id()); + Assertions.assertEquals("tlstvlzywem", model.spec().network().environment()); + Assertions.assertEquals("rncsdtclu", model.spec().network().related()); + Assertions.assertEquals("ypbsfgytguslfead", model.spec().network().resourceName()); + Assertions.assertEquals("qukyhejhzi", model.spec().byok().id()); + Assertions.assertEquals("gfpelolppvksrpqv", model.spec().byok().related()); + Assertions.assertEquals("zraehtwd", model.spec().byok().resourceName()); + Assertions.assertEquals("tswiby", model.status().phase()); + Assertions.assertEquals(403427600, model.status().cku()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCClusterRecordInner model + = new SCClusterRecordInner().withKind("mnguxawqaldsyu").withId("imerqfobwyznk").withName("bhshfwpracstwity") + .withMetadata(new SCMetadataEntity().withSelf("t").withResourceName("fhpagmhrskdsnf") + .withCreatedTimestamp("doakgtdlmkkzevdl").withUpdatedTimestamp("wpusdsttwvogv") + .withDeletedTimestamp("ejdcngqqmoakuf")) + .withSpec(new SCClusterSpecEntity().withName("zr").withAvailability("dgrtwaenuuzkopbm") + .withCloud("rfdwoyu").withZone("ziuiefozbhdm").withRegion("l") + .withKafkaBootstrapEndpoint("qhoftrmaequiah").withHttpEndpoint("cslfaoqzpiyylha") + .withApiEndpoint("swhccsphk").withConfig(new ClusterConfigEntity().withKind("witqscywuggwoluh")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("wem").withEnvironment("i") + .withRelated("brgz").withResourceName("msweypqwdxggicc")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("qhuexm").withEnvironment("tlstvlzywem") + .withRelated("rncsdtclu").withResourceName("ypbsfgytguslfead")) + .withByok(new SCClusterByokEntity().withId("qukyhejhzi").withRelated("gfpelolppvksrpqv") + .withResourceName("zraehtwd"))) + .withStatus(new ClusterStatusEntity().withPhase("tswiby").withCku(403427600)); + model = BinaryData.fromObject(model).toObject(SCClusterRecordInner.class); + Assertions.assertEquals("mnguxawqaldsyu", model.kind()); + Assertions.assertEquals("imerqfobwyznk", model.id()); + Assertions.assertEquals("bhshfwpracstwity", model.name()); + Assertions.assertEquals("t", model.metadata().self()); + Assertions.assertEquals("fhpagmhrskdsnf", model.metadata().resourceName()); + Assertions.assertEquals("doakgtdlmkkzevdl", model.metadata().createdTimestamp()); + Assertions.assertEquals("wpusdsttwvogv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("ejdcngqqmoakuf", model.metadata().deletedTimestamp()); + Assertions.assertEquals("zr", model.spec().name()); + Assertions.assertEquals("dgrtwaenuuzkopbm", model.spec().availability()); + Assertions.assertEquals("rfdwoyu", model.spec().cloud()); + Assertions.assertEquals("ziuiefozbhdm", model.spec().zone()); + Assertions.assertEquals("l", model.spec().region()); + Assertions.assertEquals("qhoftrmaequiah", model.spec().kafkaBootstrapEndpoint()); + Assertions.assertEquals("cslfaoqzpiyylha", model.spec().httpEndpoint()); + Assertions.assertEquals("swhccsphk", model.spec().apiEndpoint()); + Assertions.assertEquals("witqscywuggwoluh", model.spec().config().kind()); + Assertions.assertEquals("wem", model.spec().environment().id()); + Assertions.assertEquals("i", model.spec().environment().environment()); + Assertions.assertEquals("brgz", model.spec().environment().related()); + Assertions.assertEquals("msweypqwdxggicc", model.spec().environment().resourceName()); + Assertions.assertEquals("qhuexm", model.spec().network().id()); + Assertions.assertEquals("tlstvlzywem", model.spec().network().environment()); + Assertions.assertEquals("rncsdtclu", model.spec().network().related()); + Assertions.assertEquals("ypbsfgytguslfead", model.spec().network().resourceName()); + Assertions.assertEquals("qukyhejhzi", model.spec().byok().id()); + Assertions.assertEquals("gfpelolppvksrpqv", model.spec().byok().related()); + Assertions.assertEquals("zraehtwd", model.spec().byok().resourceName()); + Assertions.assertEquals("tswiby", model.status().phase()); + Assertions.assertEquals(403427600, model.status().cku()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterSpecEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterSpecEntityTests.java new file mode 100644 index 000000000000..cf753b1c1240 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCClusterSpecEntityTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.ClusterConfigEntity; +import com.azure.resourcemanager.confluent.models.SCClusterByokEntity; +import com.azure.resourcemanager.confluent.models.SCClusterNetworkEnvironmentEntity; +import com.azure.resourcemanager.confluent.models.SCClusterSpecEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCClusterSpecEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCClusterSpecEntity model = BinaryData.fromString( + "{\"name\":\"ytisibir\",\"availability\":\"pikpz\",\"cloud\":\"ejzanlfz\",\"zone\":\"av\",\"region\":\"bzonok\",\"kafkaBootstrapEndpoint\":\"rjqc\",\"httpEndpoint\":\"gzpfrla\",\"apiEndpoint\":\"zrnw\",\"config\":{\"kind\":\"ndfpwpj\"},\"environment\":{\"id\":\"bt\",\"environment\":\"flsjc\",\"related\":\"szfjvfbgofelja\",\"resourceName\":\"qmqhldvriii\"},\"network\":{\"id\":\"al\",\"environment\":\"fk\",\"related\":\"vsexsowuelu\",\"resourceName\":\"hahhxvrhmzkwpj\"},\"byok\":{\"id\":\"spughftqsxhq\",\"related\":\"j\",\"resourceName\":\"kndxdigrjgu\"}}") + .toObject(SCClusterSpecEntity.class); + Assertions.assertEquals("ytisibir", model.name()); + Assertions.assertEquals("pikpz", model.availability()); + Assertions.assertEquals("ejzanlfz", model.cloud()); + Assertions.assertEquals("av", model.zone()); + Assertions.assertEquals("bzonok", model.region()); + Assertions.assertEquals("rjqc", model.kafkaBootstrapEndpoint()); + Assertions.assertEquals("gzpfrla", model.httpEndpoint()); + Assertions.assertEquals("zrnw", model.apiEndpoint()); + Assertions.assertEquals("ndfpwpj", model.config().kind()); + Assertions.assertEquals("bt", model.environment().id()); + Assertions.assertEquals("flsjc", model.environment().environment()); + Assertions.assertEquals("szfjvfbgofelja", model.environment().related()); + Assertions.assertEquals("qmqhldvriii", model.environment().resourceName()); + Assertions.assertEquals("al", model.network().id()); + Assertions.assertEquals("fk", model.network().environment()); + Assertions.assertEquals("vsexsowuelu", model.network().related()); + Assertions.assertEquals("hahhxvrhmzkwpj", model.network().resourceName()); + Assertions.assertEquals("spughftqsxhq", model.byok().id()); + Assertions.assertEquals("j", model.byok().related()); + Assertions.assertEquals("kndxdigrjgu", model.byok().resourceName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCClusterSpecEntity model = new SCClusterSpecEntity().withName("ytisibir").withAvailability("pikpz") + .withCloud("ejzanlfz").withZone("av").withRegion("bzonok").withKafkaBootstrapEndpoint("rjqc") + .withHttpEndpoint("gzpfrla").withApiEndpoint("zrnw") + .withConfig(new ClusterConfigEntity().withKind("ndfpwpj")) + .withEnvironment(new SCClusterNetworkEnvironmentEntity().withId("bt").withEnvironment("flsjc") + .withRelated("szfjvfbgofelja").withResourceName("qmqhldvriii")) + .withNetwork(new SCClusterNetworkEnvironmentEntity().withId("al").withEnvironment("fk") + .withRelated("vsexsowuelu").withResourceName("hahhxvrhmzkwpj")) + .withByok( + new SCClusterByokEntity().withId("spughftqsxhq").withRelated("j").withResourceName("kndxdigrjgu")); + model = BinaryData.fromObject(model).toObject(SCClusterSpecEntity.class); + Assertions.assertEquals("ytisibir", model.name()); + Assertions.assertEquals("pikpz", model.availability()); + Assertions.assertEquals("ejzanlfz", model.cloud()); + Assertions.assertEquals("av", model.zone()); + Assertions.assertEquals("bzonok", model.region()); + Assertions.assertEquals("rjqc", model.kafkaBootstrapEndpoint()); + Assertions.assertEquals("gzpfrla", model.httpEndpoint()); + Assertions.assertEquals("zrnw", model.apiEndpoint()); + Assertions.assertEquals("ndfpwpj", model.config().kind()); + Assertions.assertEquals("bt", model.environment().id()); + Assertions.assertEquals("flsjc", model.environment().environment()); + Assertions.assertEquals("szfjvfbgofelja", model.environment().related()); + Assertions.assertEquals("qmqhldvriii", model.environment().resourceName()); + Assertions.assertEquals("al", model.network().id()); + Assertions.assertEquals("fk", model.network().environment()); + Assertions.assertEquals("vsexsowuelu", model.network().related()); + Assertions.assertEquals("hahhxvrhmzkwpj", model.network().resourceName()); + Assertions.assertEquals("spughftqsxhq", model.byok().id()); + Assertions.assertEquals("j", model.byok().related()); + Assertions.assertEquals("kndxdigrjgu", model.byok().resourceName()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCEnvironmentRecordInnerTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCEnvironmentRecordInnerTests.java new file mode 100644 index 000000000000..6e737539ebac --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCEnvironmentRecordInnerTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SCEnvironmentRecordInner; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCEnvironmentRecordInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCEnvironmentRecordInner model = BinaryData.fromString( + "{\"kind\":\"lyzrpzbchckqqzqi\",\"id\":\"iysui\",\"properties\":{\"metadata\":{\"self\":\"ked\",\"resourceName\":\"trwyhqmib\",\"createdTimestamp\":\"hwit\",\"updatedTimestamp\":\"ypyynpcdpumnzg\",\"deletedTimestamp\":\"z\"}},\"name\":\"abikns\"}") + .toObject(SCEnvironmentRecordInner.class); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.kind()); + Assertions.assertEquals("iysui", model.id()); + Assertions.assertEquals("abikns", model.name()); + Assertions.assertEquals("ked", model.metadata().self()); + Assertions.assertEquals("trwyhqmib", model.metadata().resourceName()); + Assertions.assertEquals("hwit", model.metadata().createdTimestamp()); + Assertions.assertEquals("ypyynpcdpumnzg", model.metadata().updatedTimestamp()); + Assertions.assertEquals("z", model.metadata().deletedTimestamp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCEnvironmentRecordInner model = new SCEnvironmentRecordInner().withKind("lyzrpzbchckqqzqi").withId("iysui") + .withName("abikns").withMetadata(new SCMetadataEntity().withSelf("ked").withResourceName("trwyhqmib") + .withCreatedTimestamp("hwit").withUpdatedTimestamp("ypyynpcdpumnzg").withDeletedTimestamp("z")); + model = BinaryData.fromObject(model).toObject(SCEnvironmentRecordInner.class); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.kind()); + Assertions.assertEquals("iysui", model.id()); + Assertions.assertEquals("abikns", model.name()); + Assertions.assertEquals("ked", model.metadata().self()); + Assertions.assertEquals("trwyhqmib", model.metadata().resourceName()); + Assertions.assertEquals("hwit", model.metadata().createdTimestamp()); + Assertions.assertEquals("ypyynpcdpumnzg", model.metadata().updatedTimestamp()); + Assertions.assertEquals("z", model.metadata().deletedTimestamp()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCMetadataEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCMetadataEntityTests.java new file mode 100644 index 000000000000..85142cc2fadd --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SCMetadataEntityTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import org.junit.jupiter.api.Assertions; + +public final class SCMetadataEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SCMetadataEntity model = BinaryData.fromString( + "{\"self\":\"gxqquezik\",\"resourceName\":\"ggxkallatmelwuip\",\"createdTimestamp\":\"cjzkzivgvvcna\",\"updatedTimestamp\":\"hyrnxxmu\",\"deletedTimestamp\":\"dndrdvstkwqqtche\"}") + .toObject(SCMetadataEntity.class); + Assertions.assertEquals("gxqquezik", model.self()); + Assertions.assertEquals("ggxkallatmelwuip", model.resourceName()); + Assertions.assertEquals("cjzkzivgvvcna", model.createdTimestamp()); + Assertions.assertEquals("hyrnxxmu", model.updatedTimestamp()); + Assertions.assertEquals("dndrdvstkwqqtche", model.deletedTimestamp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SCMetadataEntity model = new SCMetadataEntity().withSelf("gxqquezik").withResourceName("ggxkallatmelwuip") + .withCreatedTimestamp("cjzkzivgvvcna").withUpdatedTimestamp("hyrnxxmu") + .withDeletedTimestamp("dndrdvstkwqqtche"); + model = BinaryData.fromObject(model).toObject(SCMetadataEntity.class); + Assertions.assertEquals("gxqquezik", model.self()); + Assertions.assertEquals("ggxkallatmelwuip", model.resourceName()); + Assertions.assertEquals("cjzkzivgvvcna", model.createdTimestamp()); + Assertions.assertEquals("hyrnxxmu", model.updatedTimestamp()); + Assertions.assertEquals("dndrdvstkwqqtche", model.deletedTimestamp()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterEnvironmentRegionEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterEnvironmentRegionEntityTests.java new file mode 100644 index 000000000000..901321e8b496 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterEnvironmentRegionEntityTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity; +import org.junit.jupiter.api.Assertions; + +public final class SchemaRegistryClusterEnvironmentRegionEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchemaRegistryClusterEnvironmentRegionEntity model + = BinaryData.fromString("{\"id\":\"xum\",\"related\":\"ton\",\"resourceName\":\"jl\"}") + .toObject(SchemaRegistryClusterEnvironmentRegionEntity.class); + Assertions.assertEquals("xum", model.id()); + Assertions.assertEquals("ton", model.related()); + Assertions.assertEquals("jl", model.resourceName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SchemaRegistryClusterEnvironmentRegionEntity model = new SchemaRegistryClusterEnvironmentRegionEntity() + .withId("xum").withRelated("ton").withResourceName("jl"); + model = BinaryData.fromObject(model).toObject(SchemaRegistryClusterEnvironmentRegionEntity.class); + Assertions.assertEquals("xum", model.id()); + Assertions.assertEquals("ton", model.related()); + Assertions.assertEquals("jl", model.resourceName()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterPropertiesTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterPropertiesTests.java new file mode 100644 index 000000000000..015f26564f96 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterPropertiesTests.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterProperties; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import org.junit.jupiter.api.Assertions; + +public final class SchemaRegistryClusterPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchemaRegistryClusterProperties model = BinaryData.fromString( + "{\"metadata\":{\"self\":\"olbq\",\"resourceName\":\"uzlm\",\"createdTimestamp\":\"elfk\",\"updatedTimestamp\":\"plcrpwjxeznoig\",\"deletedTimestamp\":\"njwmwkpnbsazejj\"},\"spec\":{\"name\":\"agfhsxtta\",\"httpEndpoint\":\"zxnfaaz\",\"package\":\"dtnkdmkq\",\"region\":{\"id\":\"wuenvr\",\"related\":\"yo\",\"resourceName\":\"ibreb\"},\"environment\":{\"id\":\"ysjkixqtnqttez\",\"related\":\"fffiak\",\"resourceName\":\"pqqmted\"},\"cloud\":\"mmji\"},\"status\":{\"phase\":\"ozphvwauyqncygu\"}}") + .toObject(SchemaRegistryClusterProperties.class); + Assertions.assertEquals("olbq", model.metadata().self()); + Assertions.assertEquals("uzlm", model.metadata().resourceName()); + Assertions.assertEquals("elfk", model.metadata().createdTimestamp()); + Assertions.assertEquals("plcrpwjxeznoig", model.metadata().updatedTimestamp()); + Assertions.assertEquals("njwmwkpnbsazejj", model.metadata().deletedTimestamp()); + Assertions.assertEquals("agfhsxtta", model.spec().name()); + Assertions.assertEquals("zxnfaaz", model.spec().httpEndpoint()); + Assertions.assertEquals("dtnkdmkq", model.spec().packageProperty()); + Assertions.assertEquals("wuenvr", model.spec().region().id()); + Assertions.assertEquals("yo", model.spec().region().related()); + Assertions.assertEquals("ibreb", model.spec().region().resourceName()); + Assertions.assertEquals("ysjkixqtnqttez", model.spec().environment().id()); + Assertions.assertEquals("fffiak", model.spec().environment().related()); + Assertions.assertEquals("pqqmted", model.spec().environment().resourceName()); + Assertions.assertEquals("mmji", model.spec().cloud()); + Assertions.assertEquals("ozphvwauyqncygu", model.status().phase()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SchemaRegistryClusterProperties model = new SchemaRegistryClusterProperties() + .withMetadata(new SCMetadataEntity().withSelf("olbq").withResourceName("uzlm").withCreatedTimestamp("elfk") + .withUpdatedTimestamp("plcrpwjxeznoig").withDeletedTimestamp("njwmwkpnbsazejj")) + .withSpec(new SchemaRegistryClusterSpecEntity().withName("agfhsxtta").withHttpEndpoint("zxnfaaz") + .withPackageProperty("dtnkdmkq") + .withRegion(new SchemaRegistryClusterEnvironmentRegionEntity().withId("wuenvr").withRelated("yo") + .withResourceName("ibreb")) + .withEnvironment(new SchemaRegistryClusterEnvironmentRegionEntity().withId("ysjkixqtnqttez") + .withRelated("fffiak").withResourceName("pqqmted")) + .withCloud("mmji")) + .withStatus(new SchemaRegistryClusterStatusEntity().withPhase("ozphvwauyqncygu")); + model = BinaryData.fromObject(model).toObject(SchemaRegistryClusterProperties.class); + Assertions.assertEquals("olbq", model.metadata().self()); + Assertions.assertEquals("uzlm", model.metadata().resourceName()); + Assertions.assertEquals("elfk", model.metadata().createdTimestamp()); + Assertions.assertEquals("plcrpwjxeznoig", model.metadata().updatedTimestamp()); + Assertions.assertEquals("njwmwkpnbsazejj", model.metadata().deletedTimestamp()); + Assertions.assertEquals("agfhsxtta", model.spec().name()); + Assertions.assertEquals("zxnfaaz", model.spec().httpEndpoint()); + Assertions.assertEquals("dtnkdmkq", model.spec().packageProperty()); + Assertions.assertEquals("wuenvr", model.spec().region().id()); + Assertions.assertEquals("yo", model.spec().region().related()); + Assertions.assertEquals("ibreb", model.spec().region().resourceName()); + Assertions.assertEquals("ysjkixqtnqttez", model.spec().environment().id()); + Assertions.assertEquals("fffiak", model.spec().environment().related()); + Assertions.assertEquals("pqqmted", model.spec().environment().resourceName()); + Assertions.assertEquals("mmji", model.spec().cloud()); + Assertions.assertEquals("ozphvwauyqncygu", model.status().phase()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterRecordInnerTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterRecordInnerTests.java new file mode 100644 index 000000000000..7126afbd36d4 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterRecordInnerTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.fluent.models.SchemaRegistryClusterRecordInner; +import com.azure.resourcemanager.confluent.models.SCMetadataEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import org.junit.jupiter.api.Assertions; + +public final class SchemaRegistryClusterRecordInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchemaRegistryClusterRecordInner model = BinaryData.fromString( + "{\"kind\":\"kvtkkg\",\"id\":\"qwjygvja\",\"properties\":{\"metadata\":{\"self\":\"mhvkzuhbxvvyh\",\"resourceName\":\"opbyrqufegxu\",\"createdTimestamp\":\"zfbn\",\"updatedTimestamp\":\"mctlpdngitv\",\"deletedTimestamp\":\"mhrixkwmyijejve\"},\"spec\":{\"name\":\"bpnaixexccbdre\",\"httpEndpoint\":\"hcexdrrvqa\",\"package\":\"kghtpwijnh\",\"region\":{\"id\":\"vfycxzb\",\"related\":\"oowvrv\",\"resourceName\":\"gjqppy\"},\"environment\":{\"id\":\"ronzmyhgfip\",\"related\":\"xkmcwaekrrjre\",\"resourceName\":\"xt\"},\"cloud\":\"umh\"},\"status\":{\"phase\":\"ikkx\"}}}") + .toObject(SchemaRegistryClusterRecordInner.class); + Assertions.assertEquals("kvtkkg", model.kind()); + Assertions.assertEquals("qwjygvja", model.id()); + Assertions.assertEquals("mhvkzuhbxvvyh", model.metadata().self()); + Assertions.assertEquals("opbyrqufegxu", model.metadata().resourceName()); + Assertions.assertEquals("zfbn", model.metadata().createdTimestamp()); + Assertions.assertEquals("mctlpdngitv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("mhrixkwmyijejve", model.metadata().deletedTimestamp()); + Assertions.assertEquals("bpnaixexccbdre", model.spec().name()); + Assertions.assertEquals("hcexdrrvqa", model.spec().httpEndpoint()); + Assertions.assertEquals("kghtpwijnh", model.spec().packageProperty()); + Assertions.assertEquals("vfycxzb", model.spec().region().id()); + Assertions.assertEquals("oowvrv", model.spec().region().related()); + Assertions.assertEquals("gjqppy", model.spec().region().resourceName()); + Assertions.assertEquals("ronzmyhgfip", model.spec().environment().id()); + Assertions.assertEquals("xkmcwaekrrjre", model.spec().environment().related()); + Assertions.assertEquals("xt", model.spec().environment().resourceName()); + Assertions.assertEquals("umh", model.spec().cloud()); + Assertions.assertEquals("ikkx", model.status().phase()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SchemaRegistryClusterRecordInner model + = new SchemaRegistryClusterRecordInner().withKind("kvtkkg").withId("qwjygvja") + .withMetadata(new SCMetadataEntity().withSelf("mhvkzuhbxvvyh").withResourceName("opbyrqufegxu") + .withCreatedTimestamp("zfbn").withUpdatedTimestamp("mctlpdngitv") + .withDeletedTimestamp("mhrixkwmyijejve")) + .withSpec(new SchemaRegistryClusterSpecEntity().withName("bpnaixexccbdre") + .withHttpEndpoint("hcexdrrvqa").withPackageProperty("kghtpwijnh") + .withRegion(new SchemaRegistryClusterEnvironmentRegionEntity().withId("vfycxzb") + .withRelated("oowvrv").withResourceName("gjqppy")) + .withEnvironment(new SchemaRegistryClusterEnvironmentRegionEntity().withId("ronzmyhgfip") + .withRelated("xkmcwaekrrjre").withResourceName("xt")) + .withCloud("umh")) + .withStatus(new SchemaRegistryClusterStatusEntity().withPhase("ikkx")); + model = BinaryData.fromObject(model).toObject(SchemaRegistryClusterRecordInner.class); + Assertions.assertEquals("kvtkkg", model.kind()); + Assertions.assertEquals("qwjygvja", model.id()); + Assertions.assertEquals("mhvkzuhbxvvyh", model.metadata().self()); + Assertions.assertEquals("opbyrqufegxu", model.metadata().resourceName()); + Assertions.assertEquals("zfbn", model.metadata().createdTimestamp()); + Assertions.assertEquals("mctlpdngitv", model.metadata().updatedTimestamp()); + Assertions.assertEquals("mhrixkwmyijejve", model.metadata().deletedTimestamp()); + Assertions.assertEquals("bpnaixexccbdre", model.spec().name()); + Assertions.assertEquals("hcexdrrvqa", model.spec().httpEndpoint()); + Assertions.assertEquals("kghtpwijnh", model.spec().packageProperty()); + Assertions.assertEquals("vfycxzb", model.spec().region().id()); + Assertions.assertEquals("oowvrv", model.spec().region().related()); + Assertions.assertEquals("gjqppy", model.spec().region().resourceName()); + Assertions.assertEquals("ronzmyhgfip", model.spec().environment().id()); + Assertions.assertEquals("xkmcwaekrrjre", model.spec().environment().related()); + Assertions.assertEquals("xt", model.spec().environment().resourceName()); + Assertions.assertEquals("umh", model.spec().cloud()); + Assertions.assertEquals("ikkx", model.status().phase()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterSpecEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterSpecEntityTests.java new file mode 100644 index 000000000000..7f0a3c0464fb --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterSpecEntityTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterEnvironmentRegionEntity; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterSpecEntity; +import org.junit.jupiter.api.Assertions; + +public final class SchemaRegistryClusterSpecEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchemaRegistryClusterSpecEntity model = BinaryData.fromString( + "{\"name\":\"vipmdscwxqupevzh\",\"httpEndpoint\":\"totxhojujb\",\"package\":\"elmcuvhixbjxyfw\",\"region\":{\"id\":\"r\",\"related\":\"o\",\"resourceName\":\"ttpkiwkkbnujrywv\"},\"environment\":{\"id\":\"bfpncurdo\",\"related\":\"iithtywu\",\"resourceName\":\"cbihwqk\"},\"cloud\":\"dntwjchrdgo\"}") + .toObject(SchemaRegistryClusterSpecEntity.class); + Assertions.assertEquals("vipmdscwxqupevzh", model.name()); + Assertions.assertEquals("totxhojujb", model.httpEndpoint()); + Assertions.assertEquals("elmcuvhixbjxyfw", model.packageProperty()); + Assertions.assertEquals("r", model.region().id()); + Assertions.assertEquals("o", model.region().related()); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.region().resourceName()); + Assertions.assertEquals("bfpncurdo", model.environment().id()); + Assertions.assertEquals("iithtywu", model.environment().related()); + Assertions.assertEquals("cbihwqk", model.environment().resourceName()); + Assertions.assertEquals("dntwjchrdgo", model.cloud()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SchemaRegistryClusterSpecEntity model = new SchemaRegistryClusterSpecEntity().withName("vipmdscwxqupevzh") + .withHttpEndpoint("totxhojujb").withPackageProperty("elmcuvhixbjxyfw") + .withRegion(new SchemaRegistryClusterEnvironmentRegionEntity().withId("r").withRelated("o") + .withResourceName("ttpkiwkkbnujrywv")) + .withEnvironment(new SchemaRegistryClusterEnvironmentRegionEntity().withId("bfpncurdo") + .withRelated("iithtywu").withResourceName("cbihwqk")) + .withCloud("dntwjchrdgo"); + model = BinaryData.fromObject(model).toObject(SchemaRegistryClusterSpecEntity.class); + Assertions.assertEquals("vipmdscwxqupevzh", model.name()); + Assertions.assertEquals("totxhojujb", model.httpEndpoint()); + Assertions.assertEquals("elmcuvhixbjxyfw", model.packageProperty()); + Assertions.assertEquals("r", model.region().id()); + Assertions.assertEquals("o", model.region().related()); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.region().resourceName()); + Assertions.assertEquals("bfpncurdo", model.environment().id()); + Assertions.assertEquals("iithtywu", model.environment().related()); + Assertions.assertEquals("cbihwqk", model.environment().resourceName()); + Assertions.assertEquals("dntwjchrdgo", model.cloud()); + } +} diff --git a/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterStatusEntityTests.java b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterStatusEntityTests.java new file mode 100644 index 000000000000..fc0ac24a9c06 --- /dev/null +++ b/sdk/confluent/azure-resourcemanager-confluent/src/test/java/com/azure/resourcemanager/confluent/generated/SchemaRegistryClusterStatusEntityTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confluent.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confluent.models.SchemaRegistryClusterStatusEntity; +import org.junit.jupiter.api.Assertions; + +public final class SchemaRegistryClusterStatusEntityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchemaRegistryClusterStatusEntity model + = BinaryData.fromString("{\"phase\":\"dfdlwggyts\"}").toObject(SchemaRegistryClusterStatusEntity.class); + Assertions.assertEquals("dfdlwggyts", model.phase()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SchemaRegistryClusterStatusEntity model = new SchemaRegistryClusterStatusEntity().withPhase("dfdlwggyts"); + model = BinaryData.fromObject(model).toObject(SchemaRegistryClusterStatusEntity.class); + Assertions.assertEquals("dfdlwggyts", model.phase()); + } +}