From 412a7e5bb2a9bfda1cd0343882e69fb1353ec0eb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 Oct 2023 09:09:36 +0000 Subject: [PATCH] CodeGen from PR 26189 in Azure/azure-rest-api-specs Merge 35c7dc7b5bb8b4ed8b52b2422b7235ea63f0a25e into 622891e1923a4fd9501263d1c14da7f040c1b1f2 --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-devcenter/README.md | 6 +- .../azure-resourcemanager-devcenter/SAMPLE.md | 476 +++++++++-- .../azure-resourcemanager-devcenter/pom.xml | 3 +- .../devcenter/DevCenterManager.java | 58 +- .../CatalogDevBoxDefinitionsClient.java | 122 +++ .../devcenter/fluent/CatalogsClient.java | 88 ++ .../fluent/CustomizationTasksClient.java | 113 +++ .../fluent/DevCenterManagementClient.java | 21 + .../fluent/EnvironmentDefinitionsClient.java | 122 +++ .../devcenter/fluent/models/CatalogInner.java | 29 + .../fluent/models/CatalogProperties.java | 50 ++ ...ogResourceValidationErrorDetailsInner.java | 47 + .../fluent/models/CustomizationTaskInner.java | 89 ++ .../models/CustomizationTaskProperties.java | 84 ++ .../fluent/models/DevBoxDefinitionInner.java | 10 + .../models/DevBoxDefinitionProperties.java | 16 + .../fluent/models/DevCenterInner.java | 26 + .../fluent/models/DevCenterProperties.java | 16 +- .../models/DevCenterUpdateProperties.java | 57 ++ .../models/EnvironmentDefinitionInner.java | 98 +++ .../EnvironmentDefinitionProperties.java | 90 ++ .../devcenter/fluent/models/PoolInner.java | 35 + .../fluent/models/PoolProperties.java | 23 + .../fluent/models/PoolUpdateProperties.java | 30 + .../fluent/models/SyncErrorDetailsInner.java | 82 ++ .../CatalogDevBoxDefinitionsClientImpl.java | 792 +++++++++++++++++ .../CatalogDevBoxDefinitionsImpl.java | 119 +++ .../devcenter/implementation/CatalogImpl.java | 34 + ...logResourceValidationErrorDetailsImpl.java | 41 + .../implementation/CatalogsClientImpl.java | 442 ++++++++++ .../implementation/CatalogsImpl.java | 37 + .../implementation/CustomizationTaskImpl.java | 66 ++ .../CustomizationTasksClientImpl.java | 763 +++++++++++++++++ .../CustomizationTasksImpl.java | 106 +++ .../implementation/DevBoxDefinitionImpl.java | 5 + .../implementation/DevCenterImpl.java | 15 + .../DevCenterManagementClientBuilder.java | 2 +- .../DevCenterManagementClientImpl.java | 44 +- .../EnvironmentDefinitionImpl.java | 70 ++ .../EnvironmentDefinitionsClientImpl.java | 801 ++++++++++++++++++ .../EnvironmentDefinitionsImpl.java | 120 +++ .../devcenter/implementation/PoolImpl.java | 19 + .../implementation/SyncErrorDetailsImpl.java | 55 ++ .../models/AttachedNetworkConnection.java | 7 + .../devcenter/models/Catalog.java | 70 ++ .../models/CatalogConflictError.java | 54 ++ .../models/CatalogConnectionState.java | 47 + .../models/CatalogDevBoxDefinitions.java | 111 +++ .../devcenter/models/CatalogErrorDetails.java | 76 ++ ...CatalogResourceValidationErrorDetails.java | 26 + .../CatalogResourceValidationStatus.java | 53 ++ .../devcenter/models/CatalogSyncError.java | 58 ++ .../devcenter/models/Catalogs.java | 53 ++ .../models/CustomerManagedKeyEncryption.java | 89 ++ ...stomerManagedKeyEncryptionKeyIdentity.java | 125 +++ .../devcenter/models/CustomizationTask.java | 68 ++ .../models/CustomizationTaskInput.java | 69 ++ .../models/CustomizationTaskInputType.java | 50 ++ .../models/CustomizationTaskListResult.java | 59 ++ .../devcenter/models/CustomizationTasks.java | 102 +++ .../devcenter/models/DevBoxDefinition.java | 23 + .../devcenter/models/DevCenter.java | 49 +- .../devcenter/models/DevCenterUpdate.java | 44 + .../devcenter/models/Encryption.java | 53 ++ .../models/EnvironmentDefinition.java | 75 ++ .../EnvironmentDefinitionListResult.java | 59 ++ .../EnvironmentDefinitionParameter.java | 114 +++ .../models/EnvironmentDefinitions.java | 112 +++ .../devcenter/models/EnvironmentType.java | 7 + .../devcenter/models/Gallery.java | 7 + .../devcenter/models/IdentityType.java | 50 ++ .../devcenter/models/LocalAdminStatus.java | 5 +- .../devcenter/models/NetworkConnection.java | 20 + .../devcenter/models/ParameterType.java | 59 ++ .../devcenter/models/Pool.java | 65 +- .../devcenter/models/PoolUpdate.java | 25 + .../devcenter/models/Project.java | 14 + .../models/ProjectEnvironmentType.java | 18 + .../devcenter/models/Schedule.java | 18 + .../devcenter/models/SingleSignOnStatus.java | 50 ++ .../devcenter/models/SyncErrorDetails.java | 39 + .../devcenter/models/SyncStats.java | 114 +++ ...AttachedNetworksCreateOrUpdateSamples.java | 2 +- .../AttachedNetworksDeleteSamples.java | 2 +- ...AttachedNetworksGetByDevCenterSamples.java | 2 +- .../AttachedNetworksGetByProjectSamples.java | 2 +- ...ttachedNetworksListByDevCenterSamples.java | 2 +- .../AttachedNetworksListByProjectSamples.java | 2 +- ...vBoxDefinitionsGetErrorDetailsSamples.java | 24 + .../CatalogDevBoxDefinitionsGetSamples.java | 22 + ...DevBoxDefinitionsListByCatalogSamples.java | 23 + .../generated/CatalogsConnectSamples.java | 20 + .../CatalogsCreateOrUpdateSamples.java | 4 +- .../generated/CatalogsDeleteSamples.java | 2 +- .../generated/CatalogsGetSamples.java | 2 +- .../CatalogsGetSyncErrorDetailsSamples.java | 22 + .../CatalogsListByDevCenterSamples.java | 2 +- .../generated/CatalogsSyncSamples.java | 2 +- .../generated/CatalogsUpdateSamples.java | 2 +- .../CheckNameAvailabilityExecuteSamples.java | 2 +- ...tomizationTasksGetErrorDetailsSamples.java | 23 + .../CustomizationTasksGetSamples.java | 22 + ...ustomizationTasksListByCatalogSamples.java | 22 + ...evBoxDefinitionsCreateOrUpdateSamples.java | 2 +- .../DevBoxDefinitionsDeleteSamples.java | 2 +- .../DevBoxDefinitionsGetByProjectSamples.java | 2 +- .../DevBoxDefinitionsGetSamples.java | 2 +- ...vBoxDefinitionsListByDevCenterSamples.java | 2 +- ...DevBoxDefinitionsListByProjectSamples.java | 2 +- .../DevBoxDefinitionsUpdateSamples.java | 2 +- .../DevCentersCreateOrUpdateSamples.java | 48 +- .../generated/DevCentersDeleteSamples.java | 2 +- .../DevCentersGetByResourceGroupSamples.java | 2 +- .../DevCentersListByResourceGroupSamples.java | 2 +- .../generated/DevCentersListSamples.java | 2 +- .../generated/DevCentersUpdateSamples.java | 5 +- ...mentDefinitionsGetErrorDetailsSamples.java | 24 + .../EnvironmentDefinitionsGetSamples.java | 23 + ...onmentDefinitionsListByCatalogSamples.java | 23 + ...EnvironmentTypesCreateOrUpdateSamples.java | 3 +- .../EnvironmentTypesDeleteSamples.java | 2 +- .../generated/EnvironmentTypesGetSamples.java | 2 +- ...nvironmentTypesListByDevCenterSamples.java | 2 +- .../EnvironmentTypesUpdateSamples.java | 3 +- .../GalleriesCreateOrUpdateSamples.java | 2 +- .../generated/GalleriesDeleteSamples.java | 2 +- .../generated/GalleriesGetSamples.java | 2 +- .../GalleriesListByDevCenterSamples.java | 2 +- .../generated/ImageVersionsGetSamples.java | 2 +- .../ImageVersionsListByImageSamples.java | 2 +- .../devcenter/generated/ImagesGetSamples.java | 2 +- .../ImagesListByDevCenterSamples.java | 2 +- .../generated/ImagesListByGallerySamples.java | 2 +- ...tworkConnectionsCreateOrUpdateSamples.java | 2 +- .../NetworkConnectionsDeleteSamples.java | 2 +- ...kConnectionsGetByResourceGroupSamples.java | 2 +- ...orkConnectionsGetHealthDetailsSamples.java | 2 +- ...ConnectionsListByResourceGroupSamples.java | 2 +- ...rkConnectionsListHealthDetailsSamples.java | 2 +- ...ndNetworkDependenciesEndpointsSamples.java | 2 +- .../NetworkConnectionsListSamples.java | 2 +- ...workConnectionsRunHealthChecksSamples.java | 2 +- .../NetworkConnectionsUpdateSamples.java | 2 +- .../OperationStatusesGetSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../generated/PoolsCreateOrUpdateSamples.java | 4 +- .../generated/PoolsDeleteSamples.java | 2 +- .../devcenter/generated/PoolsGetSamples.java | 4 +- .../generated/PoolsListByProjectSamples.java | 2 +- .../PoolsRunHealthChecksSamples.java | 2 +- .../generated/PoolsUpdateSamples.java | 2 +- ...jectAllowedEnvironmentTypesGetSamples.java | 2 +- ...ectAllowedEnvironmentTypesListSamples.java | 2 +- ...EnvironmentTypesCreateOrUpdateSamples.java | 3 +- .../ProjectEnvironmentTypesDeleteSamples.java | 2 +- .../ProjectEnvironmentTypesGetSamples.java | 2 +- .../ProjectEnvironmentTypesListSamples.java | 2 +- .../ProjectEnvironmentTypesUpdateSamples.java | 3 +- .../ProjectsCreateOrUpdateSamples.java | 5 +- .../generated/ProjectsDeleteSamples.java | 2 +- .../ProjectsGetByResourceGroupSamples.java | 2 +- .../ProjectsListByResourceGroupSamples.java | 2 +- .../generated/ProjectsListSamples.java | 2 +- .../generated/ProjectsUpdateSamples.java | 3 +- .../SchedulesCreateOrUpdateSamples.java | 2 +- .../generated/SchedulesDeleteSamples.java | 2 +- .../generated/SchedulesGetSamples.java | 2 +- .../generated/SchedulesListByPoolSamples.java | 2 +- .../generated/SchedulesUpdateSamples.java | 2 +- .../devcenter/generated/SkusListSamples.java | 2 +- .../UsagesListByLocationSamples.java | 2 +- .../AllowedEnvironmentTypeInnerTests.java | 25 - ...AllowedEnvironmentTypeListResultTests.java | 25 - ...AllowedEnvironmentTypePropertiesTests.java | 24 - .../AttachedNetworkConnectionInnerTests.java | 28 - ...achedNetworkConnectionPropertiesTests.java | 29 - .../AttachedNetworkListResultTests.java | 25 - .../AttachedNetworksDeleteMockTests.java | 61 -- ...ksGetByDevCenterWithResponseMockTests.java | 70 -- ...orksGetByProjectWithResponseMockTests.java | 70 -- ...achedNetworksListByDevCenterMockTests.java | 70 -- ...ttachedNetworksListByProjectMockTests.java | 70 -- .../devcenter/generated/CapabilityTests.java | 22 - .../generated/CatalogListResultTests.java | 25 - .../generated/CatalogsDeleteMockTests.java | 61 -- ...abilitiesExecuteWithResponseMockTests.java | 75 -- .../CheckNameAvailabilityRequestTests.java | 30 - ...eckNameAvailabilityResponseInnerTests.java | 36 - .../DevBoxDefinitionListResultTests.java | 25 - ...DevBoxDefinitionUpdatePropertiesTests.java | 57 -- .../DevBoxDefinitionUpdateTests.java | 76 -- .../DevBoxDefinitionsDeleteMockTests.java | 61 -- .../generated/DevCenterInnerTests.java | 56 -- .../generated/DevCenterListResultTests.java | 25 - .../generated/DevCenterPropertiesTests.java | 24 - .../generated/DevCenterSkuInnerTests.java | 43 - .../generated/DevCenterUpdateTests.java | 62 -- .../DevCentersCreateOrUpdateMockTests.java | 95 --- .../generated/DevCentersDeleteMockTests.java | 61 -- ...tByResourceGroupWithResponseMockTests.java | 74 -- ...evCentersListByResourceGroupMockTests.java | 72 -- .../generated/DevCentersListMockTests.java | 71 -- .../generated/EndpointDependencyTests.java | 25 - .../generated/EndpointDetailTests.java | 21 - .../generated/EnvironmentRoleTests.java | 22 - .../generated/EnvironmentTypeInnerTests.java | 52 -- .../EnvironmentTypeListResultTests.java | 25 - .../EnvironmentTypePropertiesTests.java | 22 - .../generated/EnvironmentTypeUpdateTests.java | 40 - ...esCreateOrUpdateWithResponseMockTests.java | 85 -- ...nmentTypesDeleteWithResponseMockTests.java | 63 -- ...ironmentTypesGetWithResponseMockTests.java | 70 -- ...ironmentTypesListByDevCenterMockTests.java | 70 -- .../generated/GalleriesDeleteMockTests.java | 61 -- .../GalleriesGetWithResponseMockTests.java | 67 -- .../GalleriesListByDevCenterMockTests.java | 68 -- .../generated/GalleryInnerTests.java | 28 - .../generated/GalleryListResultTests.java | 25 - .../generated/GalleryPropertiesTests.java | 27 - .../HealthCheckStatusDetailsInnerTests.java | 25 - ...althCheckStatusDetailsListResultTests.java | 25 - ...althCheckStatusDetailsPropertiesTests.java | 25 - .../devcenter/generated/HealthCheckTests.java | 25 - .../devcenter/generated/ImageInnerTests.java | 25 - .../generated/ImageListResultTests.java | 25 - .../generated/ImagePropertiesTests.java | 25 - .../generated/ImageReferenceTests.java | 27 - .../generated/ImageVersionInnerTests.java | 25 - .../ImageVersionListResultTests.java | 25 - .../ImageVersionPropertiesTests.java | 25 - ...ImageVersionsGetWithResponseMockTests.java | 67 -- .../ImageVersionsListByImageMockTests.java | 68 -- .../ImagesGetWithResponseMockTests.java | 67 -- .../ImagesListByDevCenterMockTests.java | 65 -- .../ImagesListByGalleryMockTests.java | 67 -- .../generated/ListUsagesResultTests.java | 25 - .../ManagedServiceIdentityTests.java | 47 - .../NetworkConnectionsDeleteMockTests.java | 61 -- ...GetHealthDetailsWithResponseMockTests.java | 67 -- ...ConnectionsListHealthDetailsMockTests.java | 67 -- ...NetworkDependenciesEndpointsMockTests.java | 68 -- ...rkConnectionsRunHealthChecksMockTests.java | 61 -- .../generated/OperationDisplayTests.java | 25 - .../generated/OperationInnerTests.java | 26 - .../generated/OperationListResultTests.java | 25 - .../generated/OperationStatusInnerTests.java | 87 -- .../generated/OperationStatusResultTests.java | 94 -- ...ationStatusesGetWithResponseMockTests.java | 78 -- .../generated/OperationsListMockTests.java | 64 -- ...undEnvironmentEndpointCollectionTests.java | 29 - ...OutboundEnvironmentEndpointInnerTests.java | 25 - .../generated/PoolListResultTests.java | 25 - .../generated/PoolUpdatePropertiesTests.java | 51 -- .../devcenter/generated/PoolUpdateTests.java | 70 -- .../PoolsCreateOrUpdateMockTests.java | 105 --- .../generated/PoolsDeleteMockTests.java | 61 -- .../PoolsGetWithResponseMockTests.java | 80 -- .../PoolsListByProjectMockTests.java | 79 -- .../PoolsRunHealthChecksMockTests.java | 61 -- ...ironmentTypesGetWithResponseMockTests.java | 67 -- ...tAllowedEnvironmentTypesListMockTests.java | 67 -- .../ProjectEnvironmentTypeInnerTests.java | 77 -- ...ProjectEnvironmentTypeListResultTests.java | 25 - ...ProjectEnvironmentTypePropertiesTests.java | 63 -- ...ePropertiesCreatorRoleAssignmentTests.java | 51 -- ...tEnvironmentTypeUpdatePropertiesTests.java | 63 -- .../ProjectEnvironmentTypeUpdateTests.java | 64 -- ...esCreateOrUpdateWithResponseMockTests.java | 105 --- ...nmentTypesDeleteWithResponseMockTests.java | 63 -- ...ironmentTypesGetWithResponseMockTests.java | 77 -- .../ProjectEnvironmentTypesListMockTests.java | 75 -- .../generated/ProjectInnerTests.java | 55 -- .../generated/ProjectListResultTests.java | 25 - .../generated/ProjectPropertiesTests.java | 36 - .../ProjectUpdatePropertiesTests.java | 36 - .../generated/ProjectUpdateTests.java | 55 -- .../ProjectsCreateOrUpdateMockTests.java | 93 -- .../generated/ProjectsDeleteMockTests.java | 61 -- ...tByResourceGroupWithResponseMockTests.java | 74 -- .../ProjectsListByResourceGroupMockTests.java | 72 -- .../generated/ProjectsListMockTests.java | 71 -- .../RecommendedMachineConfigurationTests.java | 25 - .../generated/ResourceRangeTests.java | 22 - .../generated/ScheduleInnerTests.java | 45 - .../generated/ScheduleListResultTests.java | 25 - .../generated/SchedulePropertiesTests.java | 45 - .../ScheduleUpdatePropertiesTests.java | 45 - .../generated/ScheduleUpdateTests.java | 64 -- .../SchedulesCreateOrUpdateMockTests.java | 84 -- .../generated/SchedulesDeleteMockTests.java | 69 -- .../SchedulesGetWithResponseMockTests.java | 77 -- .../SchedulesListByPoolMockTests.java | 78 -- .../generated/SkuListResultTests.java | 25 - .../devcenter/generated/SkuTests.java | 43 - .../generated/SkusListMockTests.java | 72 -- .../StopOnDisconnectConfigurationTests.java | 33 - .../generated/TrackedResourceUpdateTests.java | 55 -- .../devcenter/generated/UsageInnerTests.java | 43 - .../devcenter/generated/UsageNameTests.java | 27 - .../UsagesListByLocationMockTests.java | 72 -- .../generated/UserAssignedIdentityTests.java | 25 - .../UserRoleAssignmentValueTests.java | 38 - 303 files changed, 7743 insertions(+), 6885 deletions(-) create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogDevBoxDefinitionsClient.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CustomizationTasksClient.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/EnvironmentDefinitionsClient.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogResourceValidationErrorDetailsInner.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskInner.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskProperties.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterUpdateProperties.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionInner.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionProperties.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/SyncErrorDetailsInner.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsClientImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogResourceValidationErrorDetailsImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTaskImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksClientImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsClientImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SyncErrorDetailsImpl.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConflictError.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConnectionState.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogDevBoxDefinitions.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogErrorDetails.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationErrorDetails.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationStatus.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncError.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryption.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryptionKeyIdentity.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTask.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInput.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInputType.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskListResult.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTasks.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Encryption.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinition.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionListResult.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionParameter.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitions.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/IdentityType.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ParameterType.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SingleSignOnStatus.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncErrorDetails.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncStats.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetErrorDetailsSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsListByCatalogSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsConnectSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSyncErrorDetailsSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetErrorDetailsSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksListByCatalogSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetErrorDetailsSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetSamples.java create mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsListByCatalogSamples.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDependencyTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDetailTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointCollectionTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/StopOnDisconnectConfigurationTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md b/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md index f05511a77cbde..39c85db00373c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2023-10-12) + +- Azure Resource Manager DevCenter client library for Java. This package contains Microsoft Azure SDK for DevCenter Management SDK. DevCenter Management API. Package tag package-preview-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/README.md b/sdk/devcenter/azure-resourcemanager-devcenter/README.md index e4111ed723c7e..b3dbd68f3f6c5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/README.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DevCenter client library for Java. -This package contains Microsoft Azure SDK for DevCenter Management SDK. DevCenter Management API. Package tag package-2023-04. 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 DevCenter Management SDK. DevCenter Management API. Package tag package-preview-2023-08. 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-devcenter - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fdevcenter%2Fazure-resourcemanager-devcenter%2FREADME.png) diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md b/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md index 10ab754379f6f..58d02a9d660de 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md @@ -10,11 +10,19 @@ - [ListByDevCenter](#attachednetworks_listbydevcenter) - [ListByProject](#attachednetworks_listbyproject) +## CatalogDevBoxDefinitions + +- [Get](#catalogdevboxdefinitions_get) +- [GetErrorDetails](#catalogdevboxdefinitions_geterrordetails) +- [ListByCatalog](#catalogdevboxdefinitions_listbycatalog) + ## Catalogs +- [Connect](#catalogs_connect) - [CreateOrUpdate](#catalogs_createorupdate) - [Delete](#catalogs_delete) - [Get](#catalogs_get) +- [GetSyncErrorDetails](#catalogs_getsyncerrordetails) - [ListByDevCenter](#catalogs_listbydevcenter) - [Sync](#catalogs_sync) - [Update](#catalogs_update) @@ -23,6 +31,12 @@ - [Execute](#checknameavailability_execute) +## CustomizationTasks + +- [Get](#customizationtasks_get) +- [GetErrorDetails](#customizationtasks_geterrordetails) +- [ListByCatalog](#customizationtasks_listbycatalog) + ## DevBoxDefinitions - [CreateOrUpdate](#devboxdefinitions_createorupdate) @@ -42,6 +56,12 @@ - [ListByResourceGroup](#devcenters_listbyresourcegroup) - [Update](#devcenters_update) +## EnvironmentDefinitions + +- [Get](#environmentdefinitions_get) +- [GetErrorDetails](#environmentdefinitions_geterrordetails) +- [ListByCatalog](#environmentdefinitions_listbycatalog) + ## EnvironmentTypes - [CreateOrUpdate](#environmenttypes_createorupdate) @@ -141,7 +161,7 @@ /** Samples for AttachedNetworks CreateOrUpdate. */ public final class AttachedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_Create.json */ /** * Sample code: AttachedNetworks_Create. @@ -166,7 +186,7 @@ public final class AttachedNetworksCreateOrUpdateSamples { /** Samples for AttachedNetworks Delete. */ public final class AttachedNetworksDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_Delete.json */ /** * Sample code: AttachedNetworks_Delete. @@ -185,7 +205,7 @@ public final class AttachedNetworksDeleteSamples { /** Samples for AttachedNetworks GetByDevCenter. */ public final class AttachedNetworksGetByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_GetByDevCenter.json */ /** * Sample code: AttachedNetworks_GetByDevCenter. @@ -206,7 +226,7 @@ public final class AttachedNetworksGetByDevCenterSamples { /** Samples for AttachedNetworks GetByProject. */ public final class AttachedNetworksGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_GetByProject.json */ /** * Sample code: AttachedNetworks_GetByProject. @@ -227,7 +247,7 @@ public final class AttachedNetworksGetByProjectSamples { /** Samples for AttachedNetworks ListByDevCenter. */ public final class AttachedNetworksListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_ListByDevCenter.json */ /** * Sample code: AttachedNetworks_ListByDevCenter. @@ -246,7 +266,7 @@ public final class AttachedNetworksListByDevCenterSamples { /** Samples for AttachedNetworks ListByProject. */ public final class AttachedNetworksListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_ListByProject.json */ /** * Sample code: AttachedNetworks_ListByProject. @@ -259,6 +279,91 @@ public final class AttachedNetworksListByProjectSamples { } ``` +### CatalogDevBoxDefinitions_Get + +```java +/** Samples for CatalogDevBoxDefinitions Get. */ +public final class CatalogDevBoxDefinitionsGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_Get.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .getWithResponse("rg1", "Contoso", "CentralCatalog", "WebDevBox", com.azure.core.util.Context.NONE); + } +} +``` + +### CatalogDevBoxDefinitions_GetErrorDetails + +```java +/** Samples for CatalogDevBoxDefinitions GetErrorDetails. */ +public final class CatalogDevBoxDefinitionsGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_GetErrorDetails.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsGetErrorDetails( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "CentralCatalog", "WebDevBox", com.azure.core.util.Context.NONE); + } +} +``` + +### CatalogDevBoxDefinitions_ListByCatalog + +```java +/** Samples for CatalogDevBoxDefinitions ListByCatalog. */ +public final class CatalogDevBoxDefinitionsListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_ListByCatalog.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsListByCatalog( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .listByCatalog("rg1", "Contoso", "CentralCatalog", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Catalogs_Connect + +```java +/** Samples for Catalogs Connect. */ +public final class CatalogsConnectSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Connect.json + */ + /** + * Sample code: Catalogs_Connect. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogsConnect(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.catalogs().connect("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); + } +} +``` + ### Catalogs_CreateOrUpdate ```java @@ -267,7 +372,7 @@ import com.azure.resourcemanager.devcenter.models.GitCatalog; /** Samples for Catalogs CreateOrUpdate. */ public final class CatalogsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateAdo.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_CreateAdo.json */ /** * Sample code: Catalogs_CreateOrUpdateAdo. @@ -289,7 +394,7 @@ public final class CatalogsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateGitHub.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_CreateGitHub.json */ /** * Sample code: Catalogs_CreateOrUpdateGitHub. @@ -318,7 +423,7 @@ public final class CatalogsCreateOrUpdateSamples { /** Samples for Catalogs Delete. */ public final class CatalogsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Delete.json */ /** * Sample code: Catalogs_Delete. @@ -337,7 +442,7 @@ public final class CatalogsDeleteSamples { /** Samples for Catalogs Get. */ public final class CatalogsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Get.json */ /** * Sample code: Catalogs_Get. @@ -350,13 +455,34 @@ public final class CatalogsGetSamples { } ``` +### Catalogs_GetSyncErrorDetails + +```java +/** Samples for Catalogs GetSyncErrorDetails. */ +public final class CatalogsGetSyncErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_GetSyncErrorDetails.json + */ + /** + * Sample code: Catalogs_GetSyncErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogsGetSyncErrorDetails(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogs() + .getSyncErrorDetailsWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); + } +} +``` + ### Catalogs_ListByDevCenter ```java /** Samples for Catalogs ListByDevCenter. */ public final class CatalogsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_List.json */ /** * Sample code: Catalogs_ListByDevCenter. @@ -375,7 +501,7 @@ public final class CatalogsListByDevCenterSamples { /** Samples for Catalogs Sync. */ public final class CatalogsSyncSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Sync.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Sync.json */ /** * Sample code: Catalogs_Sync. @@ -397,7 +523,7 @@ import com.azure.resourcemanager.devcenter.models.GitCatalog; /** Samples for Catalogs Update. */ public final class CatalogsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Patch.json */ /** * Sample code: Catalogs_Update. @@ -423,7 +549,7 @@ import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; /** Samples for CheckNameAvailability Execute. */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: NameAvailability. @@ -440,6 +566,70 @@ public final class CheckNameAvailabilityExecuteSamples { } ``` +### CustomizationTasks_Get + +```java +/** Samples for CustomizationTasks Get. */ +public final class CustomizationTasksGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_Get.json + */ + /** + * Sample code: CustomizationTasks_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .getWithResponse("rg1", "Contoso", "CentralCatalog", "SampleTask", com.azure.core.util.Context.NONE); + } +} +``` + +### CustomizationTasks_GetErrorDetails + +```java +/** Samples for CustomizationTasks GetErrorDetails. */ +public final class CustomizationTasksGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_GetErrorDetails.json + */ + /** + * Sample code: CustomizationTasks_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksGetErrorDetails(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "CentralCatalog", "SampleTask", com.azure.core.util.Context.NONE); + } +} +``` + +### CustomizationTasks_ListByCatalog + +```java +/** Samples for CustomizationTasks ListByCatalog. */ +public final class CustomizationTasksListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_ListByCatalog.json + */ + /** + * Sample code: CustomizationTasks_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksListByCatalog(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .listByCatalog("rg1", "Contoso", "CentralCatalog", null, com.azure.core.util.Context.NONE); + } +} +``` + ### DevBoxDefinitions_CreateOrUpdate ```java @@ -450,7 +640,7 @@ import com.azure.resourcemanager.devcenter.models.Sku; /** Samples for DevBoxDefinitions CreateOrUpdate. */ public final class DevBoxDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Create.json */ /** * Sample code: DevBoxDefinitions_Create. @@ -480,7 +670,7 @@ public final class DevBoxDefinitionsCreateOrUpdateSamples { /** Samples for DevBoxDefinitions Delete. */ public final class DevBoxDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Delete.json */ /** * Sample code: DevBoxDefinitions_Delete. @@ -499,7 +689,7 @@ public final class DevBoxDefinitionsDeleteSamples { /** Samples for DevBoxDefinitions Get. */ public final class DevBoxDefinitionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Get.json */ /** * Sample code: DevBoxDefinitions_Get. @@ -518,7 +708,7 @@ public final class DevBoxDefinitionsGetSamples { /** Samples for DevBoxDefinitions GetByProject. */ public final class DevBoxDefinitionsGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_GetByProject.json */ /** * Sample code: DevBoxDefinitions_GetByProject. @@ -539,7 +729,7 @@ public final class DevBoxDefinitionsGetByProjectSamples { /** Samples for DevBoxDefinitions ListByDevCenter. */ public final class DevBoxDefinitionsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json */ /** * Sample code: DevBoxDefinitions_ListByDevCenter. @@ -558,7 +748,7 @@ public final class DevBoxDefinitionsListByDevCenterSamples { /** Samples for DevBoxDefinitions ListByProject. */ public final class DevBoxDefinitionsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_ListByProject.json */ /** * Sample code: DevBoxDefinitions_ListByProject. @@ -580,7 +770,7 @@ import com.azure.resourcemanager.devcenter.models.ImageReference; /** Samples for DevBoxDefinitions Update. */ public final class DevBoxDefinitionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Patch.json */ /** * Sample code: DevBoxDefinitions_Patch. @@ -607,6 +797,10 @@ public final class DevBoxDefinitionsUpdateSamples { ### DevCenters_CreateOrUpdate ```java +import com.azure.resourcemanager.devcenter.models.CustomerManagedKeyEncryption; +import com.azure.resourcemanager.devcenter.models.CustomerManagedKeyEncryptionKeyIdentity; +import com.azure.resourcemanager.devcenter.models.Encryption; +import com.azure.resourcemanager.devcenter.models.IdentityType; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; @@ -616,7 +810,7 @@ import java.util.Map; /** Samples for DevCenters CreateOrUpdate. */ public final class DevCentersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Create.json */ /** * Sample code: DevCenters_Create. @@ -629,12 +823,12 @@ public final class DevCentersCreateOrUpdateSamples { .define("Contoso") .withRegion("centralus") .withExistingResourceGroup("rg1") - .withTags(mapOf("CostCode", "12345")) + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) .create(); } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_CreateWithUserIdentity.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_CreateWithUserIdentity.json */ /** * Sample code: DevCenters_CreateWithUserIdentity. @@ -647,7 +841,7 @@ public final class DevCentersCreateOrUpdateSamples { .define("Contoso") .withRegion("centralus") .withExistingResourceGroup("rg1") - .withTags(mapOf("CostCode", "12345")) + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) .withIdentity( new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.USER_ASSIGNED) @@ -658,6 +852,42 @@ public final class DevCentersCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_CreateWithEncryption.json + */ + /** + * Sample code: DevCenters_CreateWithEncryption. + * + * @param manager Entry point to DevCenterManager. + */ + public static void devCentersCreateWithEncryption(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .devCenters() + .define("Contoso") + .withRegion("centralus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", + new UserAssignedIdentity()))) + .withEncryption( + new Encryption() + .withCustomerManagedKeyEncryption( + new CustomerManagedKeyEncryption() + .withKeyEncryptionKeyIdentity( + new CustomerManagedKeyEncryptionKeyIdentity() + .withIdentityType(IdentityType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")) + .withKeyEncryptionKeyUrl("fakeTokenPlaceholder"))) + .create(); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -677,7 +907,7 @@ public final class DevCentersCreateOrUpdateSamples { /** Samples for DevCenters Delete. */ public final class DevCentersDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Delete.json */ /** * Sample code: DevCenters_Delete. @@ -696,7 +926,7 @@ public final class DevCentersDeleteSamples { /** Samples for DevCenters GetByResourceGroup. */ public final class DevCentersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Get.json */ /** * Sample code: DevCenters_Get. @@ -715,7 +945,7 @@ public final class DevCentersGetByResourceGroupSamples { /** Samples for DevCenters List. */ public final class DevCentersListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_ListBySubscription.json */ /** * Sample code: DevCenters_ListBySubscription. @@ -734,7 +964,7 @@ public final class DevCentersListSamples { /** Samples for DevCenters ListByResourceGroup. */ public final class DevCentersListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_ListByResourceGroup.json */ /** * Sample code: DevCenters_ListByResourceGroup. @@ -757,7 +987,7 @@ import java.util.Map; /** Samples for DevCenters Update. */ public final class DevCentersUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Patch.json */ /** * Sample code: DevCenters_Update. @@ -770,9 +1000,10 @@ public final class DevCentersUpdateSamples { .devCenters() .getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("CostCode", "12345")).apply(); + resource.update().withTags(mapOf("CostCode", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -786,6 +1017,73 @@ public final class DevCentersUpdateSamples { } ``` +### EnvironmentDefinitions_Get + +```java +/** Samples for EnvironmentDefinitions Get. */ +public final class EnvironmentDefinitionsGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_Get.json + */ + /** + * Sample code: EnvironmentDefinitions_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .getWithResponse( + "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentDefinitions_GetErrorDetails + +```java +/** Samples for EnvironmentDefinitions GetErrorDetails. */ +public final class EnvironmentDefinitionsGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_GetErrorDetails.json + */ + /** + * Sample code: EnvironmentDefinitions_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsGetErrorDetails( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentDefinitions_ListByCatalog + +```java +/** Samples for EnvironmentDefinitions ListByCatalog. */ +public final class EnvironmentDefinitionsListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_ListByCatalog.json + */ + /** + * Sample code: EnvironmentDefinitions_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsListByCatalog( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .listByCatalog("rg1", "Contoso", "myCatalog", null, com.azure.core.util.Context.NONE); + } +} +``` + ### EnvironmentTypes_CreateOrUpdate ```java @@ -795,7 +1093,7 @@ import java.util.Map; /** Samples for EnvironmentTypes CreateOrUpdate. */ public final class EnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Put.json */ /** * Sample code: EnvironmentTypes_CreateOrUpdate. @@ -811,6 +1109,7 @@ public final class EnvironmentTypesCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -830,7 +1129,7 @@ public final class EnvironmentTypesCreateOrUpdateSamples { /** Samples for EnvironmentTypes Delete. */ public final class EnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Delete.json */ /** * Sample code: EnvironmentTypes_Delete. @@ -849,7 +1148,7 @@ public final class EnvironmentTypesDeleteSamples { /** Samples for EnvironmentTypes Get. */ public final class EnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Get.json */ /** * Sample code: EnvironmentTypes_Get. @@ -868,7 +1167,7 @@ public final class EnvironmentTypesGetSamples { /** Samples for EnvironmentTypes ListByDevCenter. */ public final class EnvironmentTypesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_List.json */ /** * Sample code: EnvironmentTypes_ListByDevCenter. @@ -891,7 +1190,7 @@ import java.util.Map; /** Samples for EnvironmentTypes Update. */ public final class EnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Patch.json */ /** * Sample code: EnvironmentTypes_Update. @@ -907,6 +1206,7 @@ public final class EnvironmentTypesUpdateSamples { resource.update().withTags(mapOf("Owner", "superuser")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -926,7 +1226,7 @@ public final class EnvironmentTypesUpdateSamples { /** Samples for Galleries CreateOrUpdate. */ public final class GalleriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Create.json */ /** * Sample code: Galleries_CreateOrUpdate. @@ -951,7 +1251,7 @@ public final class GalleriesCreateOrUpdateSamples { /** Samples for Galleries Delete. */ public final class GalleriesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Delete.json */ /** * Sample code: Galleries_Delete. @@ -970,7 +1270,7 @@ public final class GalleriesDeleteSamples { /** Samples for Galleries Get. */ public final class GalleriesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Get.json */ /** * Sample code: Galleries_Get. @@ -989,7 +1289,7 @@ public final class GalleriesGetSamples { /** Samples for Galleries ListByDevCenter. */ public final class GalleriesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_List.json */ /** * Sample code: Galleries_ListByDevCenter. @@ -1008,7 +1308,7 @@ public final class GalleriesListByDevCenterSamples { /** Samples for ImageVersions Get. */ public final class ImageVersionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ImageVersions_Get.json */ /** * Sample code: Versions_Get. @@ -1029,7 +1329,7 @@ public final class ImageVersionsGetSamples { /** Samples for ImageVersions ListByImage. */ public final class ImageVersionsListByImageSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ImageVersions_List.json */ /** * Sample code: ImageVersions_ListByImage. @@ -1050,7 +1350,7 @@ public final class ImageVersionsListByImageSamples { /** Samples for Images Get. */ public final class ImagesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_Get.json */ /** * Sample code: Images_Get. @@ -1072,7 +1372,7 @@ public final class ImagesGetSamples { /** Samples for Images ListByDevCenter. */ public final class ImagesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_ListByDevCenter.json */ /** * Sample code: Images_ListByDevCenter. @@ -1091,7 +1391,7 @@ public final class ImagesListByDevCenterSamples { /** Samples for Images ListByGallery. */ public final class ImagesListByGallerySamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByGallery.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_ListByGallery.json */ /** * Sample code: Images_ListByGallery. @@ -1112,7 +1412,7 @@ import com.azure.resourcemanager.devcenter.models.DomainJoinType; /** Samples for NetworkConnections CreateOrUpdate. */ public final class NetworkConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Put.json */ /** * Sample code: NetworkConnections_CreateOrUpdate. @@ -1143,7 +1443,7 @@ public final class NetworkConnectionsCreateOrUpdateSamples { /** Samples for NetworkConnections Delete. */ public final class NetworkConnectionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Delete.json */ /** * Sample code: NetworkConnections_Delete. @@ -1162,7 +1462,7 @@ public final class NetworkConnectionsDeleteSamples { /** Samples for NetworkConnections GetByResourceGroup. */ public final class NetworkConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Get.json */ /** * Sample code: NetworkConnections_Get. @@ -1183,7 +1483,7 @@ public final class NetworkConnectionsGetByResourceGroupSamples { /** Samples for NetworkConnections GetHealthDetails. */ public final class NetworkConnectionsGetHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_GetHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_GetHealthDetails.json */ /** * Sample code: NetworkConnections_GetHealthDetails. @@ -1205,7 +1505,7 @@ public final class NetworkConnectionsGetHealthDetailsSamples { /** Samples for NetworkConnections List. */ public final class NetworkConnectionsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListBySubscription.json */ /** * Sample code: NetworkConnections_ListBySubscription. @@ -1225,7 +1525,7 @@ public final class NetworkConnectionsListSamples { /** Samples for NetworkConnections ListByResourceGroup. */ public final class NetworkConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListByResourceGroup.json */ /** * Sample code: NetworkConnections_ListByResourceGroup. @@ -1245,7 +1545,7 @@ public final class NetworkConnectionsListByResourceGroupSamples { /** Samples for NetworkConnections ListHealthDetails. */ public final class NetworkConnectionsListHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListHealthDetails.json */ /** * Sample code: NetworkConnections_ListHealthDetails. @@ -1265,7 +1565,7 @@ public final class NetworkConnectionsListHealthDetailsSamples { /** Samples for NetworkConnections ListOutboundNetworkDependenciesEndpoints. */ public final class NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. @@ -1286,7 +1586,7 @@ public final class NetworkConnectionsListOutboundNetworkDependenciesEndpointsSam /** Samples for NetworkConnections RunHealthChecks. */ public final class NetworkConnectionsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_RunHealthChecks.json */ /** * Sample code: NetworkConnections_RunHealthChecks. @@ -1307,7 +1607,7 @@ import com.azure.resourcemanager.devcenter.models.NetworkConnection; /** Samples for NetworkConnections Update. */ public final class NetworkConnectionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Patch.json */ /** * Sample code: NetworkConnections_Update. @@ -1331,7 +1631,7 @@ public final class NetworkConnectionsUpdateSamples { /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/OperationStatus_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/OperationStatus_Get.json */ /** * Sample code: Get OperationStatus. @@ -1352,7 +1652,7 @@ public final class OperationStatusesGetSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Operations_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Operations_Get.json */ /** * Sample code: Operations_Get. @@ -1370,13 +1670,14 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Put.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1397,6 +1698,7 @@ public final class PoolsCreateOrUpdateSamples { new StopOnDisconnectConfiguration() .withStatus(StopOnDisconnectEnableStatus.ENABLED) .withGracePeriodMinutes(60)) + .withSingleSignOnStatus(SingleSignOnStatus.DISABLED) .create(); } } @@ -1408,7 +1710,7 @@ public final class PoolsCreateOrUpdateSamples { /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1427,7 +1729,7 @@ public final class PoolsDeleteSamples { /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_GetUnhealthyStatus.json */ /** * Sample code: Pools_GetUnhealthyStatus. @@ -1439,7 +1741,7 @@ public final class PoolsGetSamples { } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1458,7 +1760,7 @@ public final class PoolsGetSamples { /** Samples for Pools ListByProject. */ public final class PoolsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_List.json */ /** * Sample code: Pools_ListByProject. @@ -1477,7 +1779,7 @@ public final class PoolsListByProjectSamples { /** Samples for Pools RunHealthChecks. */ public final class PoolsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_RunHealthChecks.json */ /** * Sample code: Pools_RefreshStatus. @@ -1498,7 +1800,7 @@ import com.azure.resourcemanager.devcenter.models.Pool; /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Patch.json */ /** * Sample code: Pools_Update. @@ -1522,7 +1824,7 @@ public final class PoolsUpdateSamples { /** Samples for ProjectAllowedEnvironmentTypes Get. */ public final class ProjectAllowedEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_Get. @@ -1543,7 +1845,7 @@ public final class ProjectAllowedEnvironmentTypesGetSamples { /** Samples for ProjectAllowedEnvironmentTypes List. */ public final class ProjectAllowedEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_List. @@ -1573,7 +1875,7 @@ import java.util.Map; /** Samples for ProjectEnvironmentTypes CreateOrUpdate. */ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Put.json */ /** * Sample code: ProjectEnvironmentTypes_CreateOrUpdate. @@ -1607,6 +1909,7 @@ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1626,7 +1929,7 @@ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { /** Samples for ProjectEnvironmentTypes Delete. */ public final class ProjectEnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Delete.json */ /** * Sample code: ProjectEnvironmentTypes_Delete. @@ -1647,7 +1950,7 @@ public final class ProjectEnvironmentTypesDeleteSamples { /** Samples for ProjectEnvironmentTypes Get. */ public final class ProjectEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Get.json */ /** * Sample code: ProjectEnvironmentTypes_Get. @@ -1668,7 +1971,7 @@ public final class ProjectEnvironmentTypesGetSamples { /** Samples for ProjectEnvironmentTypes List. */ public final class ProjectEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_List.json */ /** * Sample code: ProjectEnvironmentTypes_List. @@ -1697,7 +2000,7 @@ import java.util.Map; /** Samples for ProjectEnvironmentTypes Update. */ public final class ProjectEnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Patch.json */ /** * Sample code: ProjectEnvironmentTypes_Update. @@ -1730,6 +2033,7 @@ public final class ProjectEnvironmentTypesUpdateSamples { .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1752,7 +2056,7 @@ import java.util.Map; /** Samples for Projects CreateOrUpdate. */ public final class ProjectsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_PutWithMaxDevBoxPerUser.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json */ /** * Sample code: Projects_CreateOrUpdateWithLimitsPerDev. @@ -1775,7 +2079,7 @@ public final class ProjectsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Put.json */ /** * Sample code: Projects_CreateOrUpdate. @@ -1795,6 +2099,7 @@ public final class ProjectsCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1814,7 +2119,7 @@ public final class ProjectsCreateOrUpdateSamples { /** Samples for Projects Delete. */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Delete.json */ /** * Sample code: Projects_Delete. @@ -1833,7 +2138,7 @@ public final class ProjectsDeleteSamples { /** Samples for Projects GetByResourceGroup. */ public final class ProjectsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Get.json */ /** * Sample code: Projects_Get. @@ -1852,7 +2157,7 @@ public final class ProjectsGetByResourceGroupSamples { /** Samples for Projects List. */ public final class ProjectsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_ListBySubscription.json */ /** * Sample code: Projects_ListBySubscription. @@ -1871,7 +2176,7 @@ public final class ProjectsListSamples { /** Samples for Projects ListByResourceGroup. */ public final class ProjectsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_ListByResourceGroup.json */ /** * Sample code: Projects_ListByResourceGroup. @@ -1894,7 +2199,7 @@ import java.util.Map; /** Samples for Projects Update. */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Patch.json */ /** * Sample code: Projects_Update. @@ -1910,6 +2215,7 @@ public final class ProjectsUpdateSamples { resource.update().withTags(mapOf("CostCenter", "R&D")).withDescription("This is my first project.").apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1933,7 +2239,7 @@ import com.azure.resourcemanager.devcenter.models.ScheduledType; /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json */ /** * Sample code: Schedules_CreateDailyShutdownPoolSchedule. @@ -1962,7 +2268,7 @@ public final class SchedulesCreateOrUpdateSamples { /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Delete.json */ /** * Sample code: Schedules_Delete. @@ -1983,7 +2289,7 @@ public final class SchedulesDeleteSamples { /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Get.json */ /** * Sample code: Schedules_GetByPool. @@ -2004,7 +2310,7 @@ public final class SchedulesGetSamples { /** Samples for Schedules ListByPool. */ public final class SchedulesListByPoolSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_ListByPool.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_ListByPool.json */ /** * Sample code: Schedules_ListByPool. @@ -2025,7 +2331,7 @@ import com.azure.resourcemanager.devcenter.models.Schedule; /** Samples for Schedules Update. */ public final class SchedulesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Patch.json */ /** * Sample code: Schedules_Update. @@ -2050,7 +2356,7 @@ public final class SchedulesUpdateSamples { /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Skus_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Skus_ListBySubscription.json */ /** * Sample code: Skus_ListBySubscription. @@ -2069,7 +2375,7 @@ public final class SkusListSamples { /** Samples for Usages ListByLocation. */ public final class UsagesListByLocationSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Usages_ListByLocation.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Usages_ListByLocation.json */ /** * Sample code: listUsages. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml b/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml index 23e14b31ebfc9..19af1b1db5915 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml +++ b/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for DevCenter Management - This package contains Microsoft Azure SDK for DevCenter Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DevCenter Management API. Package tag package-2023-04. + This package contains Microsoft Azure SDK for DevCenter Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DevCenter Management API. Package tag package-preview-2023-08. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java index 6cd7eb5a37484..7a47e9c0d215a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java @@ -25,11 +25,14 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devcenter.fluent.DevCenterManagementClient; import com.azure.resourcemanager.devcenter.implementation.AttachedNetworksImpl; +import com.azure.resourcemanager.devcenter.implementation.CatalogDevBoxDefinitionsImpl; import com.azure.resourcemanager.devcenter.implementation.CatalogsImpl; import com.azure.resourcemanager.devcenter.implementation.CheckNameAvailabilitiesImpl; +import com.azure.resourcemanager.devcenter.implementation.CustomizationTasksImpl; import com.azure.resourcemanager.devcenter.implementation.DevBoxDefinitionsImpl; import com.azure.resourcemanager.devcenter.implementation.DevCenterManagementClientBuilder; import com.azure.resourcemanager.devcenter.implementation.DevCentersImpl; +import com.azure.resourcemanager.devcenter.implementation.EnvironmentDefinitionsImpl; import com.azure.resourcemanager.devcenter.implementation.EnvironmentTypesImpl; import com.azure.resourcemanager.devcenter.implementation.GalleriesImpl; import com.azure.resourcemanager.devcenter.implementation.ImageVersionsImpl; @@ -45,10 +48,13 @@ import com.azure.resourcemanager.devcenter.implementation.SkusImpl; import com.azure.resourcemanager.devcenter.implementation.UsagesImpl; import com.azure.resourcemanager.devcenter.models.AttachedNetworks; +import com.azure.resourcemanager.devcenter.models.CatalogDevBoxDefinitions; import com.azure.resourcemanager.devcenter.models.Catalogs; import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilities; +import com.azure.resourcemanager.devcenter.models.CustomizationTasks; import com.azure.resourcemanager.devcenter.models.DevBoxDefinitions; import com.azure.resourcemanager.devcenter.models.DevCenters; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitions; import com.azure.resourcemanager.devcenter.models.EnvironmentTypes; import com.azure.resourcemanager.devcenter.models.Galleries; import com.azure.resourcemanager.devcenter.models.ImageVersions; @@ -102,6 +108,12 @@ public final class DevCenterManager { private CheckNameAvailabilities checkNameAvailabilities; + private CatalogDevBoxDefinitions catalogDevBoxDefinitions; + + private CustomizationTasks customizationTasks; + + private EnvironmentDefinitions environmentDefinitions; + private Skus skus; private Pools pools; @@ -275,7 +287,7 @@ public DevCenterManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.devcenter") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -515,6 +527,44 @@ public CheckNameAvailabilities checkNameAvailabilities() { return checkNameAvailabilities; } + /** + * Gets the resource collection API of CatalogDevBoxDefinitions. + * + * @return Resource collection API of CatalogDevBoxDefinitions. + */ + public CatalogDevBoxDefinitions catalogDevBoxDefinitions() { + if (this.catalogDevBoxDefinitions == null) { + this.catalogDevBoxDefinitions = + new CatalogDevBoxDefinitionsImpl(clientObject.getCatalogDevBoxDefinitions(), this); + } + return catalogDevBoxDefinitions; + } + + /** + * Gets the resource collection API of CustomizationTasks. + * + * @return Resource collection API of CustomizationTasks. + */ + public CustomizationTasks customizationTasks() { + if (this.customizationTasks == null) { + this.customizationTasks = new CustomizationTasksImpl(clientObject.getCustomizationTasks(), this); + } + return customizationTasks; + } + + /** + * Gets the resource collection API of EnvironmentDefinitions. + * + * @return Resource collection API of EnvironmentDefinitions. + */ + public EnvironmentDefinitions environmentDefinitions() { + if (this.environmentDefinitions == null) { + this.environmentDefinitions = + new EnvironmentDefinitionsImpl(clientObject.getEnvironmentDefinitions(), this); + } + return environmentDefinitions; + } + /** * Gets the resource collection API of Skus. * @@ -564,8 +614,10 @@ public NetworkConnections networkConnections() { } /** - * @return Wrapped service client DevCenterManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. + * Gets wrapped service client DevCenterManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client DevCenterManagementClient. */ public DevCenterManagementClient serviceClient() { return this.clientObject; diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogDevBoxDefinitionsClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogDevBoxDefinitionsClient.java new file mode 100644 index 0000000000000..b9afc6ee954fd --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogDevBoxDefinitionsClient.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionInner; + +/** An instance of this class provides access to all the operations defined in CatalogDevBoxDefinitionsClient. */ +public interface CatalogDevBoxDefinitionsClient { + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName); + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context); + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevBoxDefinitionInner get( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName); + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context); + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogsClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogsClient.java index 83543bc630739..16ffbfcbfdb05 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogsClient.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CatalogsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devcenter.fluent.models.CatalogInner; +import com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner; import com.azure.resourcemanager.devcenter.models.CatalogUpdate; /** An instance of this class provides access to all the operations defined in CatalogsClient. */ @@ -262,6 +263,36 @@ SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String devCenterName, String catalogName, Context context); + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSyncErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, Context context); + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncErrorDetailsInner getSyncErrorDetails(String resourceGroupName, String devCenterName, String catalogName); + /** * Syncs templates for a template source. * @@ -318,4 +349,61 @@ SyncPoller, Void> beginSync( */ @ServiceMethod(returns = ReturnType.SINGLE) void sync(String resourceGroupName, String devCenterName, String catalogName, Context context); + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginConnect(String resourceGroupName, String devCenterName, String catalogName); + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginConnect( + String resourceGroupName, String devCenterName, String catalogName, Context context); + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 connect(String resourceGroupName, String devCenterName, String catalogName); + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void connect(String resourceGroupName, String devCenterName, String catalogName, Context context); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CustomizationTasksClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CustomizationTasksClient.java new file mode 100644 index 0000000000000..7d7d4600d6387 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/CustomizationTasksClient.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; + +/** An instance of this class provides access to all the operations defined in CustomizationTasksClient. */ +public interface CustomizationTasksClient { + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName); + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context); + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomizationTaskInner get(String resourceGroupName, String devCenterName, String catalogName, String taskName); + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context); + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String taskName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java index 24967b10b14ef..f79a18340376a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java @@ -149,6 +149,27 @@ public interface DevCenterManagementClient { */ CheckNameAvailabilitiesClient getCheckNameAvailabilities(); + /** + * Gets the CatalogDevBoxDefinitionsClient object to access its operations. + * + * @return the CatalogDevBoxDefinitionsClient object. + */ + CatalogDevBoxDefinitionsClient getCatalogDevBoxDefinitions(); + + /** + * Gets the CustomizationTasksClient object to access its operations. + * + * @return the CustomizationTasksClient object. + */ + CustomizationTasksClient getCustomizationTasks(); + + /** + * Gets the EnvironmentDefinitionsClient object to access its operations. + * + * @return the EnvironmentDefinitionsClient object. + */ + EnvironmentDefinitionsClient getEnvironmentDefinitions(); + /** * Gets the SkusClient object to access its operations. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/EnvironmentDefinitionsClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/EnvironmentDefinitionsClient.java new file mode 100644 index 0000000000000..83964a1b893b7 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/EnvironmentDefinitionsClient.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; + +/** An instance of this class provides access to all the operations defined in EnvironmentDefinitionsClient. */ +public interface EnvironmentDefinitionsClient { + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName); + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context); + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentDefinitionInner get( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName); + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context); + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogInner.java index 29f9b9c01c701..8539674c927e9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogInner.java @@ -7,9 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.CatalogConnectionState; import com.azure.resourcemanager.devcenter.models.CatalogSyncState; import com.azure.resourcemanager.devcenter.models.GitCatalog; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SyncStats; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -68,6 +70,33 @@ public CatalogSyncState syncState() { return this.innerProperties() == null ? null : this.innerProperties().syncState(); } + /** + * Get the lastSyncStats property: Stats of the latest synchronization. + * + * @return the lastSyncStats value. + */ + public SyncStats lastSyncStats() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncStats(); + } + + /** + * Get the connectionState property: The connection state of the catalog. + * + * @return the connectionState value. + */ + public CatalogConnectionState connectionState() { + return this.innerProperties() == null ? null : this.innerProperties().connectionState(); + } + + /** + * Get the lastConnectionTime property: When the catalog was last connected. + * + * @return the lastConnectionTime value. + */ + public OffsetDateTime lastConnectionTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastConnectionTime(); + } + /** * Get the lastSyncTime property: When the catalog was last synced. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogProperties.java index f0318105fe1ec..fd06e5f8fcf0f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogProperties.java @@ -5,9 +5,11 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.models.CatalogConnectionState; import com.azure.resourcemanager.devcenter.models.CatalogSyncState; import com.azure.resourcemanager.devcenter.models.GitCatalog; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SyncStats; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -26,6 +28,24 @@ public final class CatalogProperties extends CatalogUpdateProperties { @JsonProperty(value = "syncState", access = JsonProperty.Access.WRITE_ONLY) private CatalogSyncState syncState; + /* + * Stats of the latest synchronization. + */ + @JsonProperty(value = "lastSyncStats", access = JsonProperty.Access.WRITE_ONLY) + private SyncStats lastSyncStats; + + /* + * The connection state of the catalog. + */ + @JsonProperty(value = "connectionState", access = JsonProperty.Access.WRITE_ONLY) + private CatalogConnectionState connectionState; + + /* + * When the catalog was last connected. + */ + @JsonProperty(value = "lastConnectionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastConnectionTime; + /* * When the catalog was last synced. */ @@ -54,6 +74,33 @@ public CatalogSyncState syncState() { return this.syncState; } + /** + * Get the lastSyncStats property: Stats of the latest synchronization. + * + * @return the lastSyncStats value. + */ + public SyncStats lastSyncStats() { + return this.lastSyncStats; + } + + /** + * Get the connectionState property: The connection state of the catalog. + * + * @return the connectionState value. + */ + public CatalogConnectionState connectionState() { + return this.connectionState; + } + + /** + * Get the lastConnectionTime property: When the catalog was last connected. + * + * @return the lastConnectionTime value. + */ + public OffsetDateTime lastConnectionTime() { + return this.lastConnectionTime; + } + /** * Get the lastSyncTime property: When the catalog was last synced. * @@ -85,5 +132,8 @@ public CatalogProperties withAdoGit(GitCatalog adoGit) { @Override public void validate() { super.validate(); + if (lastSyncStats() != null) { + lastSyncStats().validate(); + } } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogResourceValidationErrorDetailsInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogResourceValidationErrorDetailsInner.java new file mode 100644 index 0000000000000..454d2626f05d3 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CatalogResourceValidationErrorDetailsInner.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.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.CatalogErrorDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of validator error details. Populated when changes are made to the resource or its dependent resources that + * impact the validity of the Catalog resource. + */ +@Immutable +public final class CatalogResourceValidationErrorDetailsInner { + /* + * Errors associated with resources synchronized from the catalog. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** Creates an instance of CatalogResourceValidationErrorDetailsInner class. */ + public CatalogResourceValidationErrorDetailsInner() { + } + + /** + * Get the errors property: Errors associated with resources synchronized from the catalog. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (errors() != null) { + errors().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskInner.java new file mode 100644 index 0000000000000..fc0a62609fd73 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.CustomizationTaskInput; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Represents a Task to be used in customizing a Dev Box. */ +@Immutable +public final class CustomizationTaskInner extends ProxyResource { + /* + * Task properties + */ + @JsonProperty(value = "properties") + private CustomizationTaskProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CustomizationTaskInner class. */ + public CustomizationTaskInner() { + } + + /** + * Get the innerProperties property: Task properties. + * + * @return the innerProperties value. + */ + private CustomizationTaskProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the inputs property: Inputs to the task. + * + * @return the inputs value. + */ + public Map inputs() { + return this.innerProperties() == null ? null : this.innerProperties().inputs(); + } + + /** + * Get the timeout property: The default timeout for the task. + * + * @return the timeout value. + */ + public Integer timeout() { + return this.innerProperties() == null ? null : this.innerProperties().timeout(); + } + + /** + * Get the validationStatus property: Validation status for the Task. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().validationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskProperties.java new file mode 100644 index 0000000000000..0a8e7b191bcc2 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/CustomizationTaskProperties.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.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.CustomizationTaskInput; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Properties of a Task. */ +@Immutable +public final class CustomizationTaskProperties { + /* + * Inputs to the task. + */ + @JsonProperty(value = "inputs", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputs; + + /* + * The default timeout for the task. + */ + @JsonProperty(value = "timeout", access = JsonProperty.Access.WRITE_ONLY) + private Integer timeout; + + /* + * Validation status for the Task. + */ + @JsonProperty(value = "validationStatus", access = JsonProperty.Access.WRITE_ONLY) + private CatalogResourceValidationStatus validationStatus; + + /** Creates an instance of CustomizationTaskProperties class. */ + public CustomizationTaskProperties() { + } + + /** + * Get the inputs property: Inputs to the task. + * + * @return the inputs value. + */ + public Map inputs() { + return this.inputs; + } + + /** + * Get the timeout property: The default timeout for the task. + * + * @return the timeout value. + */ + public Integer timeout() { + return this.timeout; + } + + /** + * Get the validationStatus property: Validation status for the Task. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.validationStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (inputs() != null) { + inputs() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionInner.java index 4c18aed812d6e..2d3481103c572 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; import com.azure.resourcemanager.devcenter.models.HibernateSupport; import com.azure.resourcemanager.devcenter.models.ImageReference; import com.azure.resourcemanager.devcenter.models.ImageValidationErrorDetails; @@ -95,6 +96,15 @@ public ImageValidationErrorDetails imageValidationErrorDetails() { return this.innerProperties() == null ? null : this.innerProperties().imageValidationErrorDetails(); } + /** + * Get the validationStatus property: Validation status for the Dev Box Definition. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().validationStatus(); + } + /** * Get the activeImageReference property: Image reference information for the currently active image (only populated * during updates). diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionProperties.java index 8f2854b2cedea..0b28f549e4a88 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevBoxDefinitionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; import com.azure.resourcemanager.devcenter.models.HibernateSupport; import com.azure.resourcemanager.devcenter.models.ImageReference; import com.azure.resourcemanager.devcenter.models.ImageValidationErrorDetails; @@ -34,6 +35,12 @@ public final class DevBoxDefinitionProperties extends DevBoxDefinitionUpdateProp @JsonProperty(value = "imageValidationErrorDetails", access = JsonProperty.Access.WRITE_ONLY) private ImageValidationErrorDetails imageValidationErrorDetails; + /* + * Validation status for the Dev Box Definition. + */ + @JsonProperty(value = "validationStatus", access = JsonProperty.Access.WRITE_ONLY) + private CatalogResourceValidationStatus validationStatus; + /* * Image reference information for the currently active image (only populated during updates). */ @@ -72,6 +79,15 @@ public ImageValidationErrorDetails imageValidationErrorDetails() { return this.imageValidationErrorDetails; } + /** + * Get the validationStatus property: Validation status for the Dev Box Definition. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.validationStatus; + } + /** * Get the activeImageReference property: Image reference information for the currently active image (only populated * during updates). diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterInner.java index 000792e503131..a935a9d6a7f2f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.Encryption; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -107,6 +108,31 @@ public String devCenterUri() { return this.innerProperties() == null ? null : this.innerProperties().devCenterUri(); } + /** + * Get the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @param encryption the encryption value to set. + * @return the DevCenterInner object itself. + */ + public DevCenterInner withEncryption(Encryption encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new DevCenterProperties(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterProperties.java index adc9cc219de55..c9b6a44fc6409 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterProperties.java @@ -4,13 +4,14 @@ package com.azure.resourcemanager.devcenter.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.models.Encryption; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the devcenter. */ -@Immutable -public final class DevCenterProperties { +@Fluent +public final class DevCenterProperties extends DevCenterUpdateProperties { /* * The provisioning state of the resource. */ @@ -45,11 +46,20 @@ public String devCenterUri() { return this.devCenterUri; } + /** {@inheritDoc} */ + @Override + public DevCenterProperties withEncryption(Encryption encryption) { + super.withEncryption(encryption); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterUpdateProperties.java new file mode 100644 index 0000000000000..5a04fe6d1bf1b --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/DevCenterUpdateProperties.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.models.Encryption; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the devcenter. These properties can be updated after the resource has been created. */ +@Fluent +public class DevCenterUpdateProperties { + /* + * Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, + * customizations). + */ + @JsonProperty(value = "encryption") + private Encryption encryption; + + /** Creates an instance of DevCenterUpdateProperties class. */ + public DevCenterUpdateProperties() { + } + + /** + * Get the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @param encryption the encryption value to set. + * @return the DevCenterUpdateProperties object itself. + */ + public DevCenterUpdateProperties withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionInner.java new file mode 100644 index 0000000000000..c6a19bbca1090 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionInner.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitionParameter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents an environment definition catalog item. */ +@Immutable +public final class EnvironmentDefinitionInner extends ProxyResource { + /* + * Environment definition properties. + */ + @JsonProperty(value = "properties") + private EnvironmentDefinitionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of EnvironmentDefinitionInner class. */ + public EnvironmentDefinitionInner() { + } + + /** + * Get the innerProperties property: Environment definition properties. + * + * @return the innerProperties value. + */ + private EnvironmentDefinitionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the description property: A short description of the environment definition. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the parameters property: Input parameters passed to an environment. + * + * @return the parameters value. + */ + public List parameters() { + return this.innerProperties() == null ? null : this.innerProperties().parameters(); + } + + /** + * Get the templatePath property: Path to the Environment Definition entrypoint file. + * + * @return the templatePath value. + */ + public String templatePath() { + return this.innerProperties() == null ? null : this.innerProperties().templatePath(); + } + + /** + * Get the validationStatus property: Validation status for the environment definition. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().validationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionProperties.java new file mode 100644 index 0000000000000..515a67987a509 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/EnvironmentDefinitionProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitionParameter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of an environment definition. */ +@Immutable +public final class EnvironmentDefinitionProperties { + /* + * A short description of the environment definition. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Input parameters passed to an environment. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + private List parameters; + + /* + * Path to the Environment Definition entrypoint file. + */ + @JsonProperty(value = "templatePath", access = JsonProperty.Access.WRITE_ONLY) + private String templatePath; + + /* + * Validation status for the environment definition. + */ + @JsonProperty(value = "validationStatus", access = JsonProperty.Access.WRITE_ONLY) + private CatalogResourceValidationStatus validationStatus; + + /** Creates an instance of EnvironmentDefinitionProperties class. */ + public EnvironmentDefinitionProperties() { + } + + /** + * Get the description property: A short description of the environment definition. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the parameters property: Input parameters passed to an environment. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Get the templatePath property: Path to the Environment Definition entrypoint file. + * + * @return the templatePath value. + */ + public String templatePath() { + return this.templatePath; + } + + /** + * Get the validationStatus property: Validation status for the environment definition. + * + * @return the validationStatus value. + */ + public CatalogResourceValidationStatus validationStatus() { + return this.validationStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java index f5f8c4faa6ce4..a02e0a3bc903e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -88,6 +89,15 @@ public List healthStatusDetails() { return this.innerProperties() == null ? null : this.innerProperties().healthStatusDetails(); } + /** + * Get the devBoxCount property: Indicates the number of provisioned Dev Boxes in this pool. + * + * @return the devBoxCount value. + */ + public Integer devBoxCount() { + return this.innerProperties() == null ? null : this.innerProperties().devBoxCount(); + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -216,6 +226,31 @@ public PoolInner withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDiscon return this; } + /** + * Get the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @return the singleSignOnStatus value. + */ + public SingleSignOnStatus singleSignOnStatus() { + return this.innerProperties() == null ? null : this.innerProperties().singleSignOnStatus(); + } + + /** + * Set the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @param singleSignOnStatus the singleSignOnStatus value to set. + * @return the PoolInner object itself. + */ + public PoolInner withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new PoolProperties(); + } + this.innerProperties().withSingleSignOnStatus(singleSignOnStatus); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java index 639bcc2cd6aff..30886d1ab89a4 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java @@ -10,6 +10,7 @@ import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -30,6 +31,12 @@ public final class PoolProperties extends PoolUpdateProperties { @JsonProperty(value = "healthStatusDetails", access = JsonProperty.Access.WRITE_ONLY) private List healthStatusDetails; + /* + * Indicates the number of provisioned Dev Boxes in this pool. + */ + @JsonProperty(value = "devBoxCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer devBoxCount; + /* * The provisioning state of the resource. */ @@ -60,6 +67,15 @@ public List healthStatusDetails() { return this.healthStatusDetails; } + /** + * Get the devBoxCount property: Indicates the number of provisioned Dev Boxes in this pool. + * + * @return the devBoxCount value. + */ + public Integer devBoxCount() { + return this.devBoxCount; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -104,6 +120,13 @@ public PoolProperties withStopOnDisconnect(StopOnDisconnectConfiguration stopOnD return this; } + /** {@inheritDoc} */ + @Override + public PoolProperties withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus) { + super.withSingleSignOnStatus(singleSignOnStatus); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java index 82bef8bd1c49f..bcb66e030ed0f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; @@ -44,6 +45,13 @@ public class PoolUpdateProperties { @JsonProperty(value = "stopOnDisconnect") private StopOnDisconnectConfiguration stopOnDisconnect; + /* + * Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single + * sign on be enabled on the tenant. + */ + @JsonProperty(value = "singleSignOnStatus") + private SingleSignOnStatus singleSignOnStatus; + /** Creates an instance of PoolUpdateProperties class. */ public PoolUpdateProperties() { } @@ -152,6 +160,28 @@ public PoolUpdateProperties withStopOnDisconnect(StopOnDisconnectConfiguration s return this; } + /** + * Get the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @return the singleSignOnStatus value. + */ + public SingleSignOnStatus singleSignOnStatus() { + return this.singleSignOnStatus; + } + + /** + * Set the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @param singleSignOnStatus the singleSignOnStatus value to set. + * @return the PoolUpdateProperties object itself. + */ + public PoolUpdateProperties withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus) { + this.singleSignOnStatus = singleSignOnStatus; + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/SyncErrorDetailsInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/SyncErrorDetailsInner.java new file mode 100644 index 0000000000000..44c1c13161815 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/SyncErrorDetailsInner.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.CatalogConflictError; +import com.azure.resourcemanager.devcenter.models.CatalogErrorDetails; +import com.azure.resourcemanager.devcenter.models.CatalogSyncError; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Synchronization error details. */ +@Immutable +public final class SyncErrorDetailsInner { + /* + * Error information for the overall synchronization operation. + */ + @JsonProperty(value = "operationError", access = JsonProperty.Access.WRITE_ONLY) + private CatalogErrorDetails operationError; + + /* + * Catalog items that have conflicting names. + */ + @JsonProperty(value = "conflicts", access = JsonProperty.Access.WRITE_ONLY) + private List conflicts; + + /* + * Errors that occured during synchronization. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** Creates an instance of SyncErrorDetailsInner class. */ + public SyncErrorDetailsInner() { + } + + /** + * Get the operationError property: Error information for the overall synchronization operation. + * + * @return the operationError value. + */ + public CatalogErrorDetails operationError() { + return this.operationError; + } + + /** + * Get the conflicts property: Catalog items that have conflicting names. + * + * @return the conflicts value. + */ + public List conflicts() { + return this.conflicts; + } + + /** + * Get the errors property: Errors that occured during synchronization. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (operationError() != null) { + operationError().validate(); + } + if (conflicts() != null) { + conflicts().forEach(e -> e.validate()); + } + if (errors() != null) { + errors().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsClientImpl.java new file mode 100644 index 0000000000000..2e035a1f41375 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsClientImpl.java @@ -0,0 +1,792 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.devcenter.fluent.CatalogDevBoxDefinitionsClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionInner; +import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CatalogDevBoxDefinitionsClient. */ +public final class CatalogDevBoxDefinitionsClientImpl implements CatalogDevBoxDefinitionsClient { + /** The proxy service used to perform REST calls. */ + private final CatalogDevBoxDefinitionsService service; + + /** The service client containing this operation class. */ + private final DevCenterManagementClientImpl client; + + /** + * Initializes an instance of CatalogDevBoxDefinitionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CatalogDevBoxDefinitionsClientImpl(DevCenterManagementClientImpl client) { + this.service = + RestProxy + .create(CatalogDevBoxDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DevCenterManagementClientCatalogDevBoxDefinitions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DevCenterManagementC") + public interface CatalogDevBoxDefinitionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/devboxdefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalog( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/devboxdefinitions/{devBoxDefinitionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("devBoxDefinitionName") String devBoxDefinitionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/devboxdefinitions/{devBoxDefinitionName}/getErrorDetails") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getErrorDetails( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("devBoxDefinitionName") String devBoxDefinitionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalogNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + 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())); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top, context), + nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top)); + } + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top, context)); + } + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 Dev Box definition from the catalog along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (devBoxDefinitionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter devBoxDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + devBoxDefinitionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (devBoxDefinitionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter devBoxDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + devBoxDefinitionName, + accept, + context); + } + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 Dev Box definition from the catalog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, context) + .block(); + } + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 Dev Box definition from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevBoxDefinitionInner get( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + return getWithResponse(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, Context.NONE) + .getValue(); + } + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (devBoxDefinitionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter devBoxDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + devBoxDefinitionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (devBoxDefinitionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter devBoxDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + devBoxDefinitionName, + accept, + context); + } + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getErrorDetailsAsync( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + return getErrorDetailsWithResponseAsync(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context) { + return getErrorDetailsWithResponseAsync( + resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, context) + .block(); + } + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + return getErrorDetailsWithResponse( + resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, 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 results of the Dev Box definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync(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.listByCatalogNext(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 results of the Dev Box definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync( + 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 + .listByCatalogNext(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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsImpl.java new file mode 100644 index 0000000000000..2802914bb1108 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogDevBoxDefinitionsImpl.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.devcenter.fluent.CatalogDevBoxDefinitionsClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionInner; +import com.azure.resourcemanager.devcenter.models.CatalogDevBoxDefinitions; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationErrorDetails; +import com.azure.resourcemanager.devcenter.models.DevBoxDefinition; + +public final class CatalogDevBoxDefinitionsImpl implements CatalogDevBoxDefinitions { + private static final ClientLogger LOGGER = new ClientLogger(CatalogDevBoxDefinitionsImpl.class); + + private final CatalogDevBoxDefinitionsClient innerClient; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + public CatalogDevBoxDefinitionsImpl( + CatalogDevBoxDefinitionsClient innerClient, + com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName); + return Utils.mapPage(inner, inner1 -> new DevBoxDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName, top, context); + return Utils.mapPage(inner, inner1 -> new DevBoxDefinitionImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DevBoxDefinitionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DevBoxDefinition get( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + DevBoxDefinitionInner inner = + this.serviceClient().get(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName); + if (inner != null) { + return new DevBoxDefinitionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context) { + Response inner = + this + .serviceClient() + .getErrorDetailsWithResponse( + resourceGroupName, devCenterName, catalogName, devBoxDefinitionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CatalogResourceValidationErrorDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName) { + CatalogResourceValidationErrorDetailsInner inner = + this.serviceClient().getErrorDetails(resourceGroupName, devCenterName, catalogName, devBoxDefinitionName); + if (inner != null) { + return new CatalogResourceValidationErrorDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + private CatalogDevBoxDefinitionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogImpl.java index 5e38688fc9cdd..45ae701be4db9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogImpl.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.devcenter.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.CatalogInner; import com.azure.resourcemanager.devcenter.models.Catalog; +import com.azure.resourcemanager.devcenter.models.CatalogConnectionState; import com.azure.resourcemanager.devcenter.models.CatalogSyncState; import com.azure.resourcemanager.devcenter.models.CatalogUpdate; import com.azure.resourcemanager.devcenter.models.GitCatalog; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SyncErrorDetails; +import com.azure.resourcemanager.devcenter.models.SyncStats; import java.time.OffsetDateTime; import java.util.Map; @@ -44,6 +48,18 @@ public CatalogSyncState syncState() { return this.innerModel().syncState(); } + public SyncStats lastSyncStats() { + return this.innerModel().lastSyncStats(); + } + + public CatalogConnectionState connectionState() { + return this.innerModel().connectionState(); + } + + public OffsetDateTime lastConnectionTime() { + return this.innerModel().lastConnectionTime(); + } + public OffsetDateTime lastSyncTime() { return this.innerModel().lastSyncTime(); } @@ -157,6 +173,16 @@ public Catalog refresh(Context context) { return this; } + public Response getSyncErrorDetailsWithResponse(Context context) { + return serviceManager + .catalogs() + .getSyncErrorDetailsWithResponse(resourceGroupName, devCenterName, catalogName, context); + } + + public SyncErrorDetails getSyncErrorDetails() { + return serviceManager.catalogs().getSyncErrorDetails(resourceGroupName, devCenterName, catalogName); + } + public void sync() { serviceManager.catalogs().sync(resourceGroupName, devCenterName, catalogName); } @@ -165,6 +191,14 @@ public void sync(Context context) { serviceManager.catalogs().sync(resourceGroupName, devCenterName, catalogName, context); } + public void connect() { + serviceManager.catalogs().connect(resourceGroupName, devCenterName, catalogName); + } + + public void connect(Context context) { + serviceManager.catalogs().connect(resourceGroupName, devCenterName, catalogName, context); + } + public CatalogImpl withGitHub(GitCatalog gitHub) { if (isInCreateMode()) { this.innerModel().withGitHub(gitHub); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogResourceValidationErrorDetailsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogResourceValidationErrorDetailsImpl.java new file mode 100644 index 0000000000000..69cd1aef986e9 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogResourceValidationErrorDetailsImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.models.CatalogErrorDetails; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationErrorDetails; +import java.util.Collections; +import java.util.List; + +public final class CatalogResourceValidationErrorDetailsImpl implements CatalogResourceValidationErrorDetails { + private CatalogResourceValidationErrorDetailsInner innerObject; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + CatalogResourceValidationErrorDetailsImpl( + CatalogResourceValidationErrorDetailsInner innerObject, + com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List errors() { + List inner = this.innerModel().errors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CatalogResourceValidationErrorDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java index 6a1e9b1af7d03..13502e097ed3a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java @@ -35,6 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devcenter.fluent.CatalogsClient; import com.azure.resourcemanager.devcenter.fluent.models.CatalogInner; +import com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner; import com.azure.resourcemanager.devcenter.models.CatalogListResult; import com.azure.resourcemanager.devcenter.models.CatalogUpdate; import java.nio.ByteBuffer; @@ -143,6 +144,21 @@ Mono>> delete( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSyncErrorDetails( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync") @@ -158,6 +174,21 @@ Mono>> sync( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> connect( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1347,6 +1378,165 @@ public void delete(String resourceGroupName, String devCenterName, String catalo deleteAsync(resourceGroupName, devCenterName, catalogName, context).block(); } + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSyncErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getSyncErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSyncErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getSyncErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + accept, + context); + } + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSyncErrorDetailsAsync( + String resourceGroupName, String devCenterName, String catalogName) { + return getSyncErrorDetailsWithResponseAsync(resourceGroupName, devCenterName, catalogName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSyncErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, Context context) { + return getSyncErrorDetailsWithResponseAsync(resourceGroupName, devCenterName, catalogName, context).block(); + } + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncErrorDetailsInner getSyncErrorDetails( + String resourceGroupName, String devCenterName, String catalogName) { + return getSyncErrorDetailsWithResponse(resourceGroupName, devCenterName, catalogName, Context.NONE).getValue(); + } + /** * Syncs templates for a template source. * @@ -1598,6 +1788,258 @@ public void sync(String resourceGroupName, String devCenterName, String catalogN syncAsync(resourceGroupName, devCenterName, catalogName, context).block(); } + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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>> connectWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .connect( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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>> connectWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .connect( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + accept, + context); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginConnectAsync( + String resourceGroupName, String devCenterName, String catalogName) { + Mono>> mono = connectWithResponseAsync(resourceGroupName, devCenterName, catalogName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginConnectAsync( + String resourceGroupName, String devCenterName, String catalogName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + connectWithResponseAsync(resourceGroupName, devCenterName, catalogName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginConnect( + String resourceGroupName, String devCenterName, String catalogName) { + return this.beginConnectAsync(resourceGroupName, devCenterName, catalogName).getSyncPoller(); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginConnect( + String resourceGroupName, String devCenterName, String catalogName, Context context) { + return this.beginConnectAsync(resourceGroupName, devCenterName, catalogName, context).getSyncPoller(); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 connectAsync(String resourceGroupName, String devCenterName, String catalogName) { + return beginConnectAsync(resourceGroupName, devCenterName, catalogName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono connectAsync( + String resourceGroupName, String devCenterName, String catalogName, Context context) { + return beginConnectAsync(resourceGroupName, devCenterName, catalogName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 connect(String resourceGroupName, String devCenterName, String catalogName) { + connectAsync(resourceGroupName, devCenterName, catalogName).block(); + } + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void connect(String resourceGroupName, String devCenterName, String catalogName, Context context) { + connectAsync(resourceGroupName, devCenterName, catalogName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsImpl.java index 454e64fb4c8e0..198675f61f447 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsImpl.java @@ -11,8 +11,10 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.devcenter.fluent.CatalogsClient; import com.azure.resourcemanager.devcenter.fluent.models.CatalogInner; +import com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner; import com.azure.resourcemanager.devcenter.models.Catalog; import com.azure.resourcemanager.devcenter.models.Catalogs; +import com.azure.resourcemanager.devcenter.models.SyncErrorDetails; public final class CatalogsImpl implements Catalogs { private static final ClientLogger LOGGER = new ClientLogger(CatalogsImpl.class); @@ -71,6 +73,33 @@ public void delete(String resourceGroupName, String devCenterName, String catalo this.serviceClient().delete(resourceGroupName, devCenterName, catalogName, context); } + public Response getSyncErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, Context context) { + Response inner = + this + .serviceClient() + .getSyncErrorDetailsWithResponse(resourceGroupName, devCenterName, catalogName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SyncErrorDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SyncErrorDetails getSyncErrorDetails(String resourceGroupName, String devCenterName, String catalogName) { + SyncErrorDetailsInner inner = + this.serviceClient().getSyncErrorDetails(resourceGroupName, devCenterName, catalogName); + if (inner != null) { + return new SyncErrorDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + public void sync(String resourceGroupName, String devCenterName, String catalogName) { this.serviceClient().sync(resourceGroupName, devCenterName, catalogName); } @@ -79,6 +108,14 @@ public void sync(String resourceGroupName, String devCenterName, String catalogN this.serviceClient().sync(resourceGroupName, devCenterName, catalogName, context); } + public void connect(String resourceGroupName, String devCenterName, String catalogName) { + this.serviceClient().connect(resourceGroupName, devCenterName, catalogName); + } + + public void connect(String resourceGroupName, String devCenterName, String catalogName, Context context) { + this.serviceClient().connect(resourceGroupName, devCenterName, catalogName, context); + } + public Catalog getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTaskImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTaskImpl.java new file mode 100644 index 0000000000000..6d95f81c93843 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTaskImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.CustomizationTask; +import com.azure.resourcemanager.devcenter.models.CustomizationTaskInput; +import java.util.Collections; +import java.util.Map; + +public final class CustomizationTaskImpl implements CustomizationTask { + private CustomizationTaskInner innerObject; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + CustomizationTaskImpl( + CustomizationTaskInner innerObject, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Map inputs() { + Map inner = this.innerModel().inputs(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Integer timeout() { + return this.innerModel().timeout(); + } + + public CatalogResourceValidationStatus validationStatus() { + return this.innerModel().validationStatus(); + } + + public CustomizationTaskInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksClientImpl.java new file mode 100644 index 0000000000000..5a2503b8805fb --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksClientImpl.java @@ -0,0 +1,763 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.devcenter.fluent.CustomizationTasksClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; +import com.azure.resourcemanager.devcenter.models.CustomizationTaskListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CustomizationTasksClient. */ +public final class CustomizationTasksClientImpl implements CustomizationTasksClient { + /** The proxy service used to perform REST calls. */ + private final CustomizationTasksService service; + + /** The service client containing this operation class. */ + private final DevCenterManagementClientImpl client; + + /** + * Initializes an instance of CustomizationTasksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CustomizationTasksClientImpl(DevCenterManagementClientImpl client) { + this.service = + RestProxy.create(CustomizationTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DevCenterManagementClientCustomizationTasks to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DevCenterManagementC") + public interface CustomizationTasksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalog( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("taskName") String taskName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getErrorDetails( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("taskName") String taskName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalogNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + 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())); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Task list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top, context), + nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top)); + } + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top, context)); + } + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 Task from the catalog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (taskName == null) { + return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + taskName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (taskName == null) { + return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + taskName, + accept, + context); + } + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 Task from the catalog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, taskName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, taskName, context).block(); + } + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 Task from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomizationTaskInner get( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + return getWithResponse(resourceGroupName, devCenterName, catalogName, taskName, Context.NONE).getValue(); + } + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (taskName == null) { + return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + taskName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (taskName == null) { + return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + taskName, + accept, + context); + } + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getErrorDetailsAsync( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + return getErrorDetailsWithResponseAsync(resourceGroupName, devCenterName, catalogName, taskName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context) { + return getErrorDetailsWithResponseAsync(resourceGroupName, devCenterName, catalogName, taskName, context) + .block(); + } + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + return getErrorDetailsWithResponse(resourceGroupName, devCenterName, catalogName, taskName, 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 results of the Task list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync(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.listByCatalogNext(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 results of the Task list operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync( + 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 + .listByCatalogNext(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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksImpl.java new file mode 100644 index 0000000000000..81753e8d85739 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CustomizationTasksImpl.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.devcenter.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.devcenter.fluent.CustomizationTasksClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationErrorDetails; +import com.azure.resourcemanager.devcenter.models.CustomizationTask; +import com.azure.resourcemanager.devcenter.models.CustomizationTasks; + +public final class CustomizationTasksImpl implements CustomizationTasks { + private static final ClientLogger LOGGER = new ClientLogger(CustomizationTasksImpl.class); + + private final CustomizationTasksClient innerClient; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + public CustomizationTasksImpl( + CustomizationTasksClient innerClient, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName); + return Utils.mapPage(inner, inner1 -> new CustomizationTaskImpl(inner1, this.manager())); + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName, top, context); + return Utils.mapPage(inner, inner1 -> new CustomizationTaskImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, devCenterName, catalogName, taskName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CustomizationTaskImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CustomizationTask get(String resourceGroupName, String devCenterName, String catalogName, String taskName) { + CustomizationTaskInner inner = + this.serviceClient().get(resourceGroupName, devCenterName, catalogName, taskName); + if (inner != null) { + return new CustomizationTaskImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context) { + Response inner = + this + .serviceClient() + .getErrorDetailsWithResponse(resourceGroupName, devCenterName, catalogName, taskName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CatalogResourceValidationErrorDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String taskName) { + CatalogResourceValidationErrorDetailsInner inner = + this.serviceClient().getErrorDetails(resourceGroupName, devCenterName, catalogName, taskName); + if (inner != null) { + return new CatalogResourceValidationErrorDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + private CustomizationTasksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionImpl.java index 3f30f83ecab61..c496aa92d8a57 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionInner; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; import com.azure.resourcemanager.devcenter.models.DevBoxDefinition; import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionUpdate; import com.azure.resourcemanager.devcenter.models.HibernateSupport; @@ -66,6 +67,10 @@ public ImageValidationErrorDetails imageValidationErrorDetails() { return this.innerModel().imageValidationErrorDetails(); } + public CatalogResourceValidationStatus validationStatus() { + return this.innerModel().validationStatus(); + } + public ImageReference activeImageReference() { return this.innerModel().activeImageReference(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterImpl.java index 8fd8d74ec937e..cbc901cb92b27 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterImpl.java @@ -10,6 +10,7 @@ import com.azure.resourcemanager.devcenter.fluent.models.DevCenterInner; import com.azure.resourcemanager.devcenter.models.DevCenter; import com.azure.resourcemanager.devcenter.models.DevCenterUpdate; +import com.azure.resourcemanager.devcenter.models.Encryption; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import java.util.Collections; @@ -61,6 +62,10 @@ public String devCenterUri() { return this.innerModel().devCenterUri(); } + public Encryption encryption() { + return this.innerModel().encryption(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -196,6 +201,16 @@ public DevCenterImpl withIdentity(ManagedServiceIdentity identity) { } } + public DevCenterImpl withEncryption(Encryption encryption) { + if (isInCreateMode()) { + this.innerModel().withEncryption(encryption); + return this; + } else { + this.updateBody.withEncryption(encryption); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientBuilder.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientBuilder.java index 2f9b7b63c9eac..b195beab84cdc 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientBuilder.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientBuilder.java @@ -137,7 +137,7 @@ public DevCenterManagementClientImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java index 881ddc224b04e..9c210c7e26cda 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java @@ -23,11 +23,14 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.devcenter.fluent.AttachedNetworksClient; +import com.azure.resourcemanager.devcenter.fluent.CatalogDevBoxDefinitionsClient; import com.azure.resourcemanager.devcenter.fluent.CatalogsClient; import com.azure.resourcemanager.devcenter.fluent.CheckNameAvailabilitiesClient; +import com.azure.resourcemanager.devcenter.fluent.CustomizationTasksClient; import com.azure.resourcemanager.devcenter.fluent.DevBoxDefinitionsClient; import com.azure.resourcemanager.devcenter.fluent.DevCenterManagementClient; import com.azure.resourcemanager.devcenter.fluent.DevCentersClient; +import com.azure.resourcemanager.devcenter.fluent.EnvironmentDefinitionsClient; import com.azure.resourcemanager.devcenter.fluent.EnvironmentTypesClient; import com.azure.resourcemanager.devcenter.fluent.GalleriesClient; import com.azure.resourcemanager.devcenter.fluent.ImageVersionsClient; @@ -306,6 +309,42 @@ public CheckNameAvailabilitiesClient getCheckNameAvailabilities() { return this.checkNameAvailabilities; } + /** The CatalogDevBoxDefinitionsClient object to access its operations. */ + private final CatalogDevBoxDefinitionsClient catalogDevBoxDefinitions; + + /** + * Gets the CatalogDevBoxDefinitionsClient object to access its operations. + * + * @return the CatalogDevBoxDefinitionsClient object. + */ + public CatalogDevBoxDefinitionsClient getCatalogDevBoxDefinitions() { + return this.catalogDevBoxDefinitions; + } + + /** The CustomizationTasksClient object to access its operations. */ + private final CustomizationTasksClient customizationTasks; + + /** + * Gets the CustomizationTasksClient object to access its operations. + * + * @return the CustomizationTasksClient object. + */ + public CustomizationTasksClient getCustomizationTasks() { + return this.customizationTasks; + } + + /** The EnvironmentDefinitionsClient object to access its operations. */ + private final EnvironmentDefinitionsClient environmentDefinitions; + + /** + * Gets the EnvironmentDefinitionsClient object to access its operations. + * + * @return the EnvironmentDefinitionsClient object. + */ + public EnvironmentDefinitionsClient getEnvironmentDefinitions() { + return this.environmentDefinitions; + } + /** The SkusClient object to access its operations. */ private final SkusClient skus; @@ -376,7 +415,7 @@ public NetworkConnectionsClient getNetworkConnections() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-04-01"; + this.apiVersion = "2023-08-01-preview"; this.devCenters = new DevCentersClientImpl(this); this.projects = new ProjectsClientImpl(this); this.attachedNetworks = new AttachedNetworksClientImpl(this); @@ -392,6 +431,9 @@ public NetworkConnectionsClient getNetworkConnections() { this.operationStatuses = new OperationStatusesClientImpl(this); this.usages = new UsagesClientImpl(this); this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this); + this.catalogDevBoxDefinitions = new CatalogDevBoxDefinitionsClientImpl(this); + this.customizationTasks = new CustomizationTasksClientImpl(this); + this.environmentDefinitions = new EnvironmentDefinitionsClientImpl(this); this.skus = new SkusClientImpl(this); this.pools = new PoolsClientImpl(this); this.schedules = new SchedulesClientImpl(this); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionImpl.java new file mode 100644 index 0000000000000..34aef70d75dca --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionImpl.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.devcenter.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinition; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitionParameter; +import java.util.Collections; +import java.util.List; + +public final class EnvironmentDefinitionImpl implements EnvironmentDefinition { + private EnvironmentDefinitionInner innerObject; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + EnvironmentDefinitionImpl( + EnvironmentDefinitionInner innerObject, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String templatePath() { + return this.innerModel().templatePath(); + } + + public CatalogResourceValidationStatus validationStatus() { + return this.innerModel().validationStatus(); + } + + public EnvironmentDefinitionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsClientImpl.java new file mode 100644 index 0000000000000..ce412f5a366d5 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsClientImpl.java @@ -0,0 +1,801 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.devcenter.fluent.EnvironmentDefinitionsClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitionListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in EnvironmentDefinitionsClient. */ +public final class EnvironmentDefinitionsClientImpl implements EnvironmentDefinitionsClient { + /** The proxy service used to perform REST calls. */ + private final EnvironmentDefinitionsService service; + + /** The service client containing this operation class. */ + private final DevCenterManagementClientImpl client; + + /** + * Initializes an instance of EnvironmentDefinitionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EnvironmentDefinitionsClientImpl(DevCenterManagementClientImpl client) { + this.service = + RestProxy + .create(EnvironmentDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DevCenterManagementClientEnvironmentDefinitions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DevCenterManagementC") + public interface EnvironmentDefinitionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalog( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("environmentDefinitionName") String environmentDefinitionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getErrorDetails( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("devCenterName") String devCenterName, + @PathParam("catalogName") String catalogName, + @PathParam("environmentDefinitionName") String environmentDefinitionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCatalogNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + 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())); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogSinglePageAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCatalog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the environment definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top), + nextLink -> listByCatalogNextSinglePageAsync(nextLink)); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCatalogAsync( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedFlux<>( + () -> listByCatalogSinglePageAsync(resourceGroupName, devCenterName, catalogName, top, context), + nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + final Integer top = null; + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top)); + } + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + return new PagedIterable<>(listByCatalogAsync(resourceGroupName, devCenterName, catalogName, top, context)); + } + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (environmentDefinitionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter environmentDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + environmentDefinitionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (environmentDefinitionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter environmentDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + environmentDefinitionName, + accept, + context); + } + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, environmentDefinitionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context) { + return getWithResponseAsync(resourceGroupName, devCenterName, catalogName, environmentDefinitionName, context) + .block(); + } + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentDefinitionInner get( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + return getWithResponse(resourceGroupName, devCenterName, catalogName, environmentDefinitionName, Context.NONE) + .getValue(); + } + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (environmentDefinitionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter environmentDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + environmentDefinitionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getErrorDetailsWithResponseAsync( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + 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 (devCenterName == null) { + return Mono.error(new IllegalArgumentException("Parameter devCenterName is required and cannot be null.")); + } + if (catalogName == null) { + return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); + } + if (environmentDefinitionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter environmentDefinitionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getErrorDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + devCenterName, + catalogName, + environmentDefinitionName, + accept, + context); + } + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getErrorDetailsAsync( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + return getErrorDetailsWithResponseAsync( + resourceGroupName, devCenterName, catalogName, environmentDefinitionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context) { + return getErrorDetailsWithResponseAsync( + resourceGroupName, devCenterName, catalogName, environmentDefinitionName, context) + .block(); + } + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CatalogResourceValidationErrorDetailsInner getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + return getErrorDetailsWithResponse( + resourceGroupName, devCenterName, catalogName, environmentDefinitionName, 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 results of the environment definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync(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.listByCatalogNext(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 results of the environment definition list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCatalogNextSinglePageAsync( + 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 + .listByCatalogNext(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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsImpl.java new file mode 100644 index 0000000000000..1699f344e333f --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/EnvironmentDefinitionsImpl.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.devcenter.fluent.EnvironmentDefinitionsClient; +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; +import com.azure.resourcemanager.devcenter.models.CatalogResourceValidationErrorDetails; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinition; +import com.azure.resourcemanager.devcenter.models.EnvironmentDefinitions; + +public final class EnvironmentDefinitionsImpl implements EnvironmentDefinitions { + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentDefinitionsImpl.class); + + private final EnvironmentDefinitionsClient innerClient; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + public EnvironmentDefinitionsImpl( + EnvironmentDefinitionsClient innerClient, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName); + return Utils.mapPage(inner, inner1 -> new EnvironmentDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByCatalog(resourceGroupName, devCenterName, catalogName, top, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentDefinitionImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, devCenterName, catalogName, environmentDefinitionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentDefinitionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentDefinition get( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + EnvironmentDefinitionInner inner = + this.serviceClient().get(resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + if (inner != null) { + return new EnvironmentDefinitionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context) { + Response inner = + this + .serviceClient() + .getErrorDetailsWithResponse( + resourceGroupName, devCenterName, catalogName, environmentDefinitionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CatalogResourceValidationErrorDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName) { + CatalogResourceValidationErrorDetailsInner inner = + this + .serviceClient() + .getErrorDetails(resourceGroupName, devCenterName, catalogName, environmentDefinitionName); + if (inner != null) { + return new CatalogResourceValidationErrorDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + private EnvironmentDefinitionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java index 3ae57248240ba..b0c5e80861175 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.devcenter.models.Pool; import com.azure.resourcemanager.devcenter.models.PoolUpdate; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import java.util.Collections; import java.util.List; @@ -67,6 +68,10 @@ public List healthStatusDetails() { } } + public Integer devBoxCount() { + return this.innerModel().devBoxCount(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -91,6 +96,10 @@ public StopOnDisconnectConfiguration stopOnDisconnect() { return this.innerModel().stopOnDisconnect(); } + public SingleSignOnStatus singleSignOnStatus() { + return this.innerModel().singleSignOnStatus(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -278,6 +287,16 @@ public PoolImpl withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconn } } + public PoolImpl withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus) { + if (isInCreateMode()) { + this.innerModel().withSingleSignOnStatus(singleSignOnStatus); + return this; + } else { + this.updateBody.withSingleSignOnStatus(singleSignOnStatus); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SyncErrorDetailsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SyncErrorDetailsImpl.java new file mode 100644 index 0000000000000..048baf3cf97c2 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SyncErrorDetailsImpl.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.devcenter.implementation; + +import com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner; +import com.azure.resourcemanager.devcenter.models.CatalogConflictError; +import com.azure.resourcemanager.devcenter.models.CatalogErrorDetails; +import com.azure.resourcemanager.devcenter.models.CatalogSyncError; +import com.azure.resourcemanager.devcenter.models.SyncErrorDetails; +import java.util.Collections; +import java.util.List; + +public final class SyncErrorDetailsImpl implements SyncErrorDetails { + private SyncErrorDetailsInner innerObject; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + SyncErrorDetailsImpl( + SyncErrorDetailsInner innerObject, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public CatalogErrorDetails operationError() { + return this.innerModel().operationError(); + } + + public List conflicts() { + List inner = this.innerModel().conflicts(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List errors() { + List inner = this.innerModel().errors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SyncErrorDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/AttachedNetworkConnection.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/AttachedNetworkConnection.java index 80bb52d7e6979..776a897dee6f5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/AttachedNetworkConnection.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/AttachedNetworkConnection.java @@ -93,11 +93,13 @@ public interface AttachedNetworkConnection { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The AttachedNetworkConnection definition stages. */ interface DefinitionStages { /** The first stage of the AttachedNetworkConnection definition. */ interface Blank extends WithParentResource { } + /** The stage of the AttachedNetworkConnection definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -109,6 +111,7 @@ interface WithParentResource { */ WithCreate withExistingDevcenter(String resourceGroupName, String devCenterName); } + /** * The stage of the AttachedNetworkConnection definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. @@ -129,6 +132,7 @@ interface WithCreate extends DefinitionStages.WithNetworkConnectionId { */ AttachedNetworkConnection create(Context context); } + /** The stage of the AttachedNetworkConnection definition allowing to specify networkConnectionId. */ interface WithNetworkConnectionId { /** @@ -140,6 +144,7 @@ interface WithNetworkConnectionId { WithCreate withNetworkConnectionId(String networkConnectionId); } } + /** * Begins update for the AttachedNetworkConnection resource. * @@ -164,9 +169,11 @@ interface Update { */ AttachedNetworkConnection apply(Context context); } + /** The AttachedNetworkConnection update stages. */ interface UpdateStages { } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalog.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalog.java index 384cb91ee31da..c47e8b5a7cffa 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalog.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalog.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.devcenter.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.CatalogInner; @@ -54,6 +55,27 @@ public interface Catalog { */ CatalogSyncState syncState(); + /** + * Gets the lastSyncStats property: Stats of the latest synchronization. + * + * @return the lastSyncStats value. + */ + SyncStats lastSyncStats(); + + /** + * Gets the connectionState property: The connection state of the catalog. + * + * @return the connectionState value. + */ + CatalogConnectionState connectionState(); + + /** + * Gets the lastConnectionTime property: When the catalog was last connected. + * + * @return the lastConnectionTime value. + */ + OffsetDateTime lastConnectionTime(); + /** * Gets the lastSyncTime property: When the catalog was last synced. * @@ -93,11 +115,13 @@ public interface Catalog { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The Catalog definition stages. */ interface DefinitionStages { /** The first stage of the Catalog definition. */ interface Blank extends WithParentResource { } + /** The stage of the Catalog definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -109,6 +133,7 @@ interface WithParentResource { */ WithCreate withExistingDevcenter(String resourceGroupName, String devCenterName); } + /** * The stage of the Catalog definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. @@ -129,6 +154,7 @@ interface WithCreate extends DefinitionStages.WithGitHub, DefinitionStages.WithA */ Catalog create(Context context); } + /** The stage of the Catalog definition allowing to specify gitHub. */ interface WithGitHub { /** @@ -139,6 +165,7 @@ interface WithGitHub { */ WithCreate withGitHub(GitCatalog gitHub); } + /** The stage of the Catalog definition allowing to specify adoGit. */ interface WithAdoGit { /** @@ -150,6 +177,7 @@ interface WithAdoGit { WithCreate withAdoGit(GitCatalog adoGit); } } + /** * Begins update for the Catalog resource. * @@ -174,6 +202,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithGitHub, UpdateS */ Catalog apply(Context context); } + /** The Catalog update stages. */ interface UpdateStages { /** The stage of the Catalog update allowing to specify tags. */ @@ -186,6 +215,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Catalog update allowing to specify gitHub. */ interface WithGitHub { /** @@ -196,6 +226,7 @@ interface WithGitHub { */ Update withGitHub(GitCatalog gitHub); } + /** The stage of the Catalog update allowing to specify adoGit. */ interface WithAdoGit { /** @@ -207,6 +238,7 @@ interface WithAdoGit { Update withAdoGit(GitCatalog adoGit); } } + /** * Refreshes the resource to sync with Azure. * @@ -222,6 +254,26 @@ interface WithAdoGit { */ Catalog refresh(Context context); + /** + * Gets catalog synchronization error details. + * + * @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 catalog synchronization error details along with {@link Response}. + */ + Response getSyncErrorDetailsWithResponse(Context context); + + /** + * Gets catalog synchronization error details. + * + * @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 catalog synchronization error details. + */ + SyncErrorDetails getSyncErrorDetails(); + /** * Syncs templates for a template source. * @@ -239,4 +291,22 @@ interface WithAdoGit { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void sync(Context context); + + /** + * Connects a catalog to enable syncing. + * + * @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 connect(); + + /** + * Connects a catalog to enable syncing. + * + * @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. + */ + void connect(Context context); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConflictError.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConflictError.java new file mode 100644 index 0000000000000..90f1ca62c8b0b --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConflictError.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.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An individual conflict error. */ +@Immutable +public final class CatalogConflictError { + /* + * The path of the file that has a conflicting name. + */ + @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) + private String path; + + /* + * Name of the conflicting catalog item. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** Creates an instance of CatalogConflictError class. */ + public CatalogConflictError() { + } + + /** + * Get the path property: The path of the file that has a conflicting name. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Get the name property: Name of the conflicting catalog item. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConnectionState.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConnectionState.java new file mode 100644 index 0000000000000..e407465c160d6 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogConnectionState.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.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The connection state of the catalog. */ +public final class CatalogConnectionState extends ExpandableStringEnum { + /** Static value Connected for CatalogConnectionState. */ + public static final CatalogConnectionState CONNECTED = fromString("Connected"); + + /** Static value Disconnected for CatalogConnectionState. */ + public static final CatalogConnectionState DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of CatalogConnectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CatalogConnectionState() { + } + + /** + * Creates or finds a CatalogConnectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CatalogConnectionState. + */ + @JsonCreator + public static CatalogConnectionState fromString(String name) { + return fromString(name, CatalogConnectionState.class); + } + + /** + * Gets known CatalogConnectionState values. + * + * @return known CatalogConnectionState values. + */ + public static Collection values() { + return values(CatalogConnectionState.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogDevBoxDefinitions.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogDevBoxDefinitions.java new file mode 100644 index 0000000000000..535c5ca65e33c --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogDevBoxDefinitions.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.devcenter.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of CatalogDevBoxDefinitions. */ +public interface CatalogDevBoxDefinitions { + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog(String resourceGroupName, String devCenterName, String catalogName); + + /** + * List Dev Box definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context); + + /** + * Gets a Dev Box definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 a Dev Box definition from the catalog. + */ + DevBoxDefinition get( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName); + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details along with {@link Response}. + */ + Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String devBoxDefinitionName, + Context context); + + /** + * Gets Catalog Devbox Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param devBoxDefinitionName The name of the Dev Box definition. + * @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 catalog Devbox Definition error details. + */ + CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String devBoxDefinitionName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogErrorDetails.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogErrorDetails.java new file mode 100644 index 0000000000000..290efeacc8e34 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogErrorDetails.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.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Catalog error details. */ +@Fluent +public final class CatalogErrorDetails { + /* + * An identifier for the error. + */ + @JsonProperty(value = "code") + private String code; + + /* + * A message describing the error. + */ + @JsonProperty(value = "message") + private String message; + + /** Creates an instance of CatalogErrorDetails class. */ + public CatalogErrorDetails() { + } + + /** + * Get the code property: An identifier for the error. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: An identifier for the error. + * + * @param code the code value to set. + * @return the CatalogErrorDetails object itself. + */ + public CatalogErrorDetails withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: A message describing the error. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: A message describing the error. + * + * @param message the message value to set. + * @return the CatalogErrorDetails object itself. + */ + public CatalogErrorDetails withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationErrorDetails.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationErrorDetails.java new file mode 100644 index 0000000000000..70e076d89ad64 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationErrorDetails.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner; +import java.util.List; + +/** An immutable client-side representation of CatalogResourceValidationErrorDetails. */ +public interface CatalogResourceValidationErrorDetails { + /** + * Gets the errors property: Errors associated with resources synchronized from the catalog. + * + * @return the errors value. + */ + List errors(); + + /** + * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.CatalogResourceValidationErrorDetailsInner + * object. + * + * @return the inner object. + */ + CatalogResourceValidationErrorDetailsInner innerModel(); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationStatus.java new file mode 100644 index 0000000000000..eff9011398f75 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogResourceValidationStatus.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.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Catalog resource validation status. */ +public final class CatalogResourceValidationStatus extends ExpandableStringEnum { + /** Static value Unknown for CatalogResourceValidationStatus. */ + public static final CatalogResourceValidationStatus UNKNOWN = fromString("Unknown"); + + /** Static value Pending for CatalogResourceValidationStatus. */ + public static final CatalogResourceValidationStatus PENDING = fromString("Pending"); + + /** Static value Succeeded for CatalogResourceValidationStatus. */ + public static final CatalogResourceValidationStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for CatalogResourceValidationStatus. */ + public static final CatalogResourceValidationStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of CatalogResourceValidationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CatalogResourceValidationStatus() { + } + + /** + * Creates or finds a CatalogResourceValidationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CatalogResourceValidationStatus. + */ + @JsonCreator + public static CatalogResourceValidationStatus fromString(String name) { + return fromString(name, CatalogResourceValidationStatus.class); + } + + /** + * Gets known CatalogResourceValidationStatus values. + * + * @return known CatalogResourceValidationStatus values. + */ + public static Collection values() { + return values(CatalogResourceValidationStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncError.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncError.java new file mode 100644 index 0000000000000..b87a0916f30bd --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncError.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.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** An individual synchronization error. */ +@Immutable +public final class CatalogSyncError { + /* + * The path of the file the error is associated with. + */ + @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) + private String path; + + /* + * Errors associated with the file. + */ + @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) + private List errorDetails; + + /** Creates an instance of CatalogSyncError class. */ + public CatalogSyncError() { + } + + /** + * Get the path property: The path of the file the error is associated with. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Get the errorDetails property: Errors associated with the file. + * + * @return the errorDetails value. + */ + public List errorDetails() { + return this.errorDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (errorDetails() != null) { + errorDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalogs.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalogs.java index d4ecc9f0db196..34df484bb6ab5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalogs.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Catalogs.java @@ -90,6 +90,34 @@ Response getWithResponse( */ void delete(String resourceGroupName, String devCenterName, String catalogName, Context context); + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details along with {@link Response}. + */ + Response getSyncErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, Context context); + + /** + * Gets catalog synchronization error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 catalog synchronization error details. + */ + SyncErrorDetails getSyncErrorDetails(String resourceGroupName, String devCenterName, String catalogName); + /** * Syncs templates for a template source. * @@ -115,6 +143,31 @@ Response getWithResponse( */ void sync(String resourceGroupName, String devCenterName, String catalogName, Context context); + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 connect(String resourceGroupName, String devCenterName, String catalogName); + + /** + * Connects a catalog to enable syncing. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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. + */ + void connect(String resourceGroupName, String devCenterName, String catalogName, Context context); + /** * Gets a catalog. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryption.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryption.java new file mode 100644 index 0000000000000..b786b7db78ba8 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryption.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** All Customer-managed key encryption properties for the resource. */ +@Fluent +public final class CustomerManagedKeyEncryption { + /* + * All identity configuration for Customer-managed key settings defining which identity should be used to auth to + * Key Vault. + */ + @JsonProperty(value = "keyEncryptionKeyIdentity") + private CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity; + + /* + * key encryption key Url, versioned or non-versioned. Ex: + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or + * https://contosovault.vault.azure.net/keys/contosokek. + */ + @JsonProperty(value = "keyEncryptionKeyUrl") + private String keyEncryptionKeyUrl; + + /** Creates an instance of CustomerManagedKeyEncryption class. */ + public CustomerManagedKeyEncryption() { + } + + /** + * Get the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining + * which identity should be used to auth to Key Vault. + * + * @return the keyEncryptionKeyIdentity value. + */ + public CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity() { + return this.keyEncryptionKeyIdentity; + } + + /** + * Set the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining + * which identity should be used to auth to Key Vault. + * + * @param keyEncryptionKeyIdentity the keyEncryptionKeyIdentity value to set. + * @return the CustomerManagedKeyEncryption object itself. + */ + public CustomerManagedKeyEncryption withKeyEncryptionKeyIdentity( + CustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity) { + this.keyEncryptionKeyIdentity = keyEncryptionKeyIdentity; + return this; + } + + /** + * Get the keyEncryptionKeyUrl property: key encryption key Url, versioned or non-versioned. Ex: + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or + * https://contosovault.vault.azure.net/keys/contosokek. + * + * @return the keyEncryptionKeyUrl value. + */ + public String keyEncryptionKeyUrl() { + return this.keyEncryptionKeyUrl; + } + + /** + * Set the keyEncryptionKeyUrl property: key encryption key Url, versioned or non-versioned. Ex: + * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or + * https://contosovault.vault.azure.net/keys/contosokek. + * + * @param keyEncryptionKeyUrl the keyEncryptionKeyUrl value to set. + * @return the CustomerManagedKeyEncryption object itself. + */ + public CustomerManagedKeyEncryption withKeyEncryptionKeyUrl(String keyEncryptionKeyUrl) { + this.keyEncryptionKeyUrl = keyEncryptionKeyUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyEncryptionKeyIdentity() != null) { + keyEncryptionKeyIdentity().validate(); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryptionKeyIdentity.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryptionKeyIdentity.java new file mode 100644 index 0000000000000..a5aa0665b0ef9 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomerManagedKeyEncryptionKeyIdentity.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key + * Vault. + */ +@Fluent +public final class CustomerManagedKeyEncryptionKeyIdentity { + /* + * Values can be systemAssignedIdentity or userAssignedIdentity + */ + @JsonProperty(value = "identityType") + private IdentityType identityType; + + /* + * user assigned identity to use for accessing key encryption key Url. Ex: + * /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and delegatedResourceIdentity. + */ + @JsonProperty(value = "userAssignedIdentityResourceId") + private String userAssignedIdentityResourceId; + + /* + * delegated identity to use for accessing key encryption key Url. Ex: + * /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and userAssignedIdentity - internal use only. + */ + @JsonProperty(value = "delegatedIdentityClientId") + private UUID delegatedIdentityClientId; + + /** Creates an instance of CustomerManagedKeyEncryptionKeyIdentity class. */ + public CustomerManagedKeyEncryptionKeyIdentity() { + } + + /** + * Get the identityType property: Values can be systemAssignedIdentity or userAssignedIdentity. + * + * @return the identityType value. + */ + public IdentityType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: Values can be systemAssignedIdentity or userAssignedIdentity. + * + * @param identityType the identityType value to set. + * @return the CustomerManagedKeyEncryptionKeyIdentity object itself. + */ + public CustomerManagedKeyEncryptionKeyIdentity withIdentityType(IdentityType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: user assigned identity to use for accessing key encryption key + * Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource + * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and delegatedResourceIdentity. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: user assigned identity to use for accessing key encryption key + * Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource + * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and delegatedResourceIdentity. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the CustomerManagedKeyEncryptionKeyIdentity object itself. + */ + public CustomerManagedKeyEncryptionKeyIdentity withUserAssignedIdentityResourceId( + String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * Get the delegatedIdentityClientId property: delegated identity to use for accessing key encryption key Url. Ex: + * /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource + * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and userAssignedIdentity - internal use only. + * + * @return the delegatedIdentityClientId value. + */ + public UUID delegatedIdentityClientId() { + return this.delegatedIdentityClientId; + } + + /** + * Set the delegatedIdentityClientId property: delegated identity to use for accessing key encryption key Url. Ex: + * /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource + * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType + * systemAssignedIdentity and userAssignedIdentity - internal use only. + * + * @param delegatedIdentityClientId the delegatedIdentityClientId value to set. + * @return the CustomerManagedKeyEncryptionKeyIdentity object itself. + */ + public CustomerManagedKeyEncryptionKeyIdentity withDelegatedIdentityClientId(UUID delegatedIdentityClientId) { + this.delegatedIdentityClientId = delegatedIdentityClientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTask.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTask.java new file mode 100644 index 0000000000000..0cc8d3b0c4c1b --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTask.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; +import java.util.Map; + +/** An immutable client-side representation of CustomizationTask. */ +public interface CustomizationTask { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inputs property: Inputs to the task. + * + * @return the inputs value. + */ + Map inputs(); + + /** + * Gets the timeout property: The default timeout for the task. + * + * @return the timeout value. + */ + Integer timeout(); + + /** + * Gets the validationStatus property: Validation status for the Task. + * + * @return the validationStatus value. + */ + CatalogResourceValidationStatus validationStatus(); + + /** + * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner object. + * + * @return the inner object. + */ + CustomizationTaskInner innerModel(); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInput.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInput.java new file mode 100644 index 0000000000000..39d2f75341223 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInput.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.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Input for a Task. */ +@Immutable +public final class CustomizationTaskInput { + /* + * Description of the input. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Type of the input. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private CustomizationTaskInputType type; + + /* + * Whether or not the input is required. + */ + @JsonProperty(value = "required", access = JsonProperty.Access.WRITE_ONLY) + private Boolean required; + + /** Creates an instance of CustomizationTaskInput class. */ + public CustomizationTaskInput() { + } + + /** + * Get the description property: Description of the input. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the type property: Type of the input. + * + * @return the type value. + */ + public CustomizationTaskInputType type() { + return this.type; + } + + /** + * Get the required property: Whether or not the input is required. + * + * @return the required value. + */ + public Boolean required() { + return this.required; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInputType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInputType.java new file mode 100644 index 0000000000000..b520c96a85519 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskInputType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of the input. */ +public final class CustomizationTaskInputType extends ExpandableStringEnum { + /** Static value string for CustomizationTaskInputType. */ + public static final CustomizationTaskInputType STRING = fromString("string"); + + /** Static value number for CustomizationTaskInputType. */ + public static final CustomizationTaskInputType NUMBER = fromString("number"); + + /** Static value boolean for CustomizationTaskInputType. */ + public static final CustomizationTaskInputType BOOLEAN = fromString("boolean"); + + /** + * Creates a new instance of CustomizationTaskInputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CustomizationTaskInputType() { + } + + /** + * Creates or finds a CustomizationTaskInputType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CustomizationTaskInputType. + */ + @JsonCreator + public static CustomizationTaskInputType fromString(String name) { + return fromString(name, CustomizationTaskInputType.class); + } + + /** + * Gets known CustomizationTaskInputType values. + * + * @return known CustomizationTaskInputType values. + */ + public static Collection values() { + return values(CustomizationTaskInputType.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskListResult.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskListResult.java new file mode 100644 index 0000000000000..a78fbb5107820 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTaskListResult.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.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.fluent.models.CustomizationTaskInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Results of the Task list operation. */ +@Immutable +public final class CustomizationTaskListResult { + /* + * Current page of results. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of CustomizationTaskListResult class. */ + public CustomizationTaskListResult() { + } + + /** + * Get the value property: Current page of results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * 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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTasks.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTasks.java new file mode 100644 index 0000000000000..7d85ed1bd3df0 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CustomizationTasks.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of CustomizationTasks. */ +public interface CustomizationTasks { + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog(String resourceGroupName, String devCenterName, String catalogName); + + /** + * List Tasks in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the Task list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context); + + /** + * Gets a Task from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 a Task from the catalog. + */ + CustomizationTask get(String resourceGroupName, String devCenterName, String catalogName, String taskName); + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details along with {@link Response}. + */ + Response getErrorDetailsWithResponse( + String resourceGroupName, String devCenterName, String catalogName, String taskName, Context context); + + /** + * Gets Customization Task error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param taskName The name of the Task. + * @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 customization Task error details. + */ + CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String taskName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevBoxDefinition.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevBoxDefinition.java index d9b2b6e55b3f4..be1f3eeffd7d2 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevBoxDefinition.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevBoxDefinition.java @@ -76,6 +76,13 @@ public interface DevBoxDefinition { */ ImageValidationErrorDetails imageValidationErrorDetails(); + /** + * Gets the validationStatus property: Validation status for the Dev Box Definition. + * + * @return the validationStatus value. + */ + CatalogResourceValidationStatus validationStatus(); + /** * Gets the activeImageReference property: Image reference information for the currently active image (only * populated during updates). @@ -150,11 +157,13 @@ interface Definition DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The DevBoxDefinition definition stages. */ interface DefinitionStages { /** The first stage of the DevBoxDefinition definition. */ interface Blank extends WithLocation { } + /** The stage of the DevBoxDefinition definition allowing to specify location. */ interface WithLocation { /** @@ -173,6 +182,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the DevBoxDefinition definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -184,6 +194,7 @@ interface WithParentResource { */ WithCreate withExistingDevcenter(String resourceGroupName, String devCenterName); } + /** * The stage of the DevBoxDefinition definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -209,6 +220,7 @@ interface WithCreate */ DevBoxDefinition create(Context context); } + /** The stage of the DevBoxDefinition definition allowing to specify tags. */ interface WithTags { /** @@ -219,6 +231,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the DevBoxDefinition definition allowing to specify imageReference. */ interface WithImageReference { /** @@ -229,6 +242,7 @@ interface WithImageReference { */ WithCreate withImageReference(ImageReference imageReference); } + /** The stage of the DevBoxDefinition definition allowing to specify sku. */ interface WithSku { /** @@ -239,6 +253,7 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the DevBoxDefinition definition allowing to specify osStorageType. */ interface WithOsStorageType { /** @@ -251,6 +266,7 @@ interface WithOsStorageType { */ WithCreate withOsStorageType(String osStorageType); } + /** The stage of the DevBoxDefinition definition allowing to specify hibernateSupport. */ interface WithHibernateSupport { /** @@ -266,6 +282,7 @@ interface WithHibernateSupport { WithCreate withHibernateSupport(HibernateSupport hibernateSupport); } } + /** * Begins update for the DevBoxDefinition resource. * @@ -295,6 +312,7 @@ interface Update */ DevBoxDefinition apply(Context context); } + /** The DevBoxDefinition update stages. */ interface UpdateStages { /** The stage of the DevBoxDefinition update allowing to specify tags. */ @@ -307,6 +325,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the DevBoxDefinition update allowing to specify imageReference. */ interface WithImageReference { /** @@ -317,6 +336,7 @@ interface WithImageReference { */ Update withImageReference(ImageReference imageReference); } + /** The stage of the DevBoxDefinition update allowing to specify sku. */ interface WithSku { /** @@ -327,6 +347,7 @@ interface WithSku { */ Update withSku(Sku sku); } + /** The stage of the DevBoxDefinition update allowing to specify osStorageType. */ interface WithOsStorageType { /** @@ -339,6 +360,7 @@ interface WithOsStorageType { */ Update withOsStorageType(String osStorageType); } + /** The stage of the DevBoxDefinition update allowing to specify hibernateSupport. */ interface WithHibernateSupport { /** @@ -354,6 +376,7 @@ interface WithHibernateSupport { Update withHibernateSupport(HibernateSupport hibernateSupport); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenter.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenter.java index 0696bc228711d..8a86378c79df3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenter.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenter.java @@ -75,6 +75,14 @@ public interface DevCenter { */ String devCenterUri(); + /** + * Gets the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @return the encryption value. + */ + Encryption encryption(); + /** * Gets the region of the resource. * @@ -110,11 +118,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The DevCenter definition stages. */ interface DefinitionStages { /** The first stage of the DevCenter definition. */ interface Blank extends WithLocation { } + /** The stage of the DevCenter definition allowing to specify location. */ interface WithLocation { /** @@ -133,6 +143,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the DevCenter definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -143,11 +154,13 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the DevCenter definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithEncryption { /** * Executes the create request. * @@ -163,6 +176,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIde */ DevCenter create(Context context); } + /** The stage of the DevCenter definition allowing to specify tags. */ interface WithTags { /** @@ -173,6 +187,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the DevCenter definition allowing to specify identity. */ interface WithIdentity { /** @@ -183,7 +198,21 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + + /** The stage of the DevCenter definition allowing to specify encryption. */ + interface WithEncryption { + /** + * Specifies the encryption property: Encryption settings to be used for server-side encryption for + * proprietary content (such as catalogs, logs, customizations).. + * + * @param encryption Encryption settings to be used for server-side encryption for proprietary content (such + * as catalogs, logs, customizations). + * @return the next definition stage. + */ + WithCreate withEncryption(Encryption encryption); + } } + /** * Begins update for the DevCenter resource. * @@ -192,7 +221,7 @@ interface WithIdentity { DevCenter.Update update(); /** The template for DevCenter update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEncryption { /** * Executes the update request. * @@ -208,6 +237,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { */ DevCenter apply(Context context); } + /** The DevCenter update stages. */ interface UpdateStages { /** The stage of the DevCenter update allowing to specify tags. */ @@ -220,6 +250,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the DevCenter update allowing to specify identity. */ interface WithIdentity { /** @@ -230,7 +261,21 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + + /** The stage of the DevCenter update allowing to specify encryption. */ + interface WithEncryption { + /** + * Specifies the encryption property: Encryption settings to be used for server-side encryption for + * proprietary content (such as catalogs, logs, customizations).. + * + * @param encryption Encryption settings to be used for server-side encryption for proprietary content (such + * as catalogs, logs, customizations). + * @return the next definition stage. + */ + Update withEncryption(Encryption encryption); + } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenterUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenterUpdate.java index 3a37528032b6d..528c112b39e6a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenterUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/DevCenterUpdate.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.devcenter.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.fluent.models.DevCenterUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -17,6 +18,12 @@ public final class DevCenterUpdate extends TrackedResourceUpdate { @JsonProperty(value = "identity") private ManagedServiceIdentity identity; + /* + * Properties of a Dev Center to be updated. + */ + @JsonProperty(value = "properties") + private DevCenterUpdateProperties innerProperties; + /** Creates an instance of DevCenterUpdate class. */ public DevCenterUpdate() { } @@ -41,6 +48,15 @@ public DevCenterUpdate withIdentity(ManagedServiceIdentity identity) { return this; } + /** + * Get the innerProperties property: Properties of a Dev Center to be updated. + * + * @return the innerProperties value. + */ + private DevCenterUpdateProperties innerProperties() { + return this.innerProperties; + } + /** {@inheritDoc} */ @Override public DevCenterUpdate withTags(Map tags) { @@ -55,6 +71,31 @@ public DevCenterUpdate withLocation(String location) { return this; } + /** + * Get the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: Encryption settings to be used for server-side encryption for proprietary content + * (such as catalogs, logs, customizations). + * + * @param encryption the encryption value to set. + * @return the DevCenterUpdate object itself. + */ + public DevCenterUpdate withEncryption(Encryption encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new DevCenterUpdateProperties(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + /** * Validates the instance. * @@ -66,5 +107,8 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Encryption.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Encryption.java new file mode 100644 index 0000000000000..b46696fb25255 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Encryption.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.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Encryption model. */ +@Fluent +public final class Encryption { + /* + * All Customer-managed key encryption properties for the resource. + */ + @JsonProperty(value = "customerManagedKeyEncryption") + private CustomerManagedKeyEncryption customerManagedKeyEncryption; + + /** Creates an instance of Encryption class. */ + public Encryption() { + } + + /** + * Get the customerManagedKeyEncryption property: All Customer-managed key encryption properties for the resource. + * + * @return the customerManagedKeyEncryption value. + */ + public CustomerManagedKeyEncryption customerManagedKeyEncryption() { + return this.customerManagedKeyEncryption; + } + + /** + * Set the customerManagedKeyEncryption property: All Customer-managed key encryption properties for the resource. + * + * @param customerManagedKeyEncryption the customerManagedKeyEncryption value to set. + * @return the Encryption object itself. + */ + public Encryption withCustomerManagedKeyEncryption(CustomerManagedKeyEncryption customerManagedKeyEncryption) { + this.customerManagedKeyEncryption = customerManagedKeyEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customerManagedKeyEncryption() != null) { + customerManagedKeyEncryption().validate(); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinition.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinition.java new file mode 100644 index 0000000000000..5719ba1773604 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinition.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; +import java.util.List; + +/** An immutable client-side representation of EnvironmentDefinition. */ +public interface EnvironmentDefinition { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the description property: A short description of the environment definition. + * + * @return the description value. + */ + String description(); + + /** + * Gets the parameters property: Input parameters passed to an environment. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the templatePath property: Path to the Environment Definition entrypoint file. + * + * @return the templatePath value. + */ + String templatePath(); + + /** + * Gets the validationStatus property: Validation status for the environment definition. + * + * @return the validationStatus value. + */ + CatalogResourceValidationStatus validationStatus(); + + /** + * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner object. + * + * @return the inner object. + */ + EnvironmentDefinitionInner innerModel(); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionListResult.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionListResult.java new file mode 100644 index 0000000000000..8aa1c432b86c3 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionListResult.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.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentDefinitionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Results of the environment definition list operation. */ +@Immutable +public final class EnvironmentDefinitionListResult { + /* + * Current page of results. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of EnvironmentDefinitionListResult class. */ + public EnvironmentDefinitionListResult() { + } + + /** + * Get the value property: Current page of results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * 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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionParameter.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionParameter.java new file mode 100644 index 0000000000000..2719e2de791dc --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitionParameter.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of an Environment Definition parameter. */ +@Immutable +public final class EnvironmentDefinitionParameter { + /* + * Unique ID of the parameter + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Display name of the parameter + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Description of the parameter + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * A string of one of the basic JSON types (number, integer, array, object, boolean, string) + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private ParameterType type; + + /* + * Whether or not this parameter is read-only. If true, default should have a value. + */ + @JsonProperty(value = "readOnly", access = JsonProperty.Access.WRITE_ONLY) + private Boolean readOnly; + + /* + * Whether or not this parameter is required + */ + @JsonProperty(value = "required", access = JsonProperty.Access.WRITE_ONLY) + private Boolean required; + + /** Creates an instance of EnvironmentDefinitionParameter class. */ + public EnvironmentDefinitionParameter() { + } + + /** + * Get the id property: Unique ID of the parameter. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Display name of the parameter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the description property: Description of the parameter. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the type property: A string of one of the basic JSON types (number, integer, array, object, boolean, string). + * + * @return the type value. + */ + public ParameterType type() { + return this.type; + } + + /** + * Get the readOnly property: Whether or not this parameter is read-only. If true, default should have a value. + * + * @return the readOnly value. + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Get the required property: Whether or not this parameter is required. + * + * @return the required value. + */ + public Boolean required() { + return this.required; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitions.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitions.java new file mode 100644 index 0000000000000..a32fcb78116e4 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentDefinitions.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of EnvironmentDefinitions. */ +public interface EnvironmentDefinitions { + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName); + + /** + * List environment definitions in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @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 results of the environment definition list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCatalog( + String resourceGroupName, String devCenterName, String catalogName, Integer top, Context context); + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context); + + /** + * Gets an environment definition from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 an environment definition from the catalog. + */ + EnvironmentDefinition get( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName); + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details along with {@link Response}. + */ + Response getErrorDetailsWithResponse( + String resourceGroupName, + String devCenterName, + String catalogName, + String environmentDefinitionName, + Context context); + + /** + * Gets Environment Definition error details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param devCenterName The name of the devcenter. + * @param catalogName The name of the Catalog. + * @param environmentDefinitionName The name of the Environment Definition. + * @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 Definition error details. + */ + CatalogResourceValidationErrorDetails getErrorDetails( + String resourceGroupName, String devCenterName, String catalogName, String environmentDefinitionName); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentType.java index 541312d3751fc..f47ac6ab45360 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentType.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentType.java @@ -71,11 +71,13 @@ public interface EnvironmentType { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The EnvironmentType definition stages. */ interface DefinitionStages { /** The first stage of the EnvironmentType definition. */ interface Blank extends WithParentResource { } + /** The stage of the EnvironmentType definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -87,6 +89,7 @@ interface WithParentResource { */ WithCreate withExistingDevcenter(String resourceGroupName, String devCenterName); } + /** * The stage of the EnvironmentType definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -107,6 +110,7 @@ interface WithCreate extends DefinitionStages.WithTags { */ EnvironmentType create(Context context); } + /** The stage of the EnvironmentType definition allowing to specify tags. */ interface WithTags { /** @@ -118,6 +122,7 @@ interface WithTags { WithCreate withTags(Map tags); } } + /** * Begins update for the EnvironmentType resource. * @@ -142,6 +147,7 @@ interface Update extends UpdateStages.WithTags { */ EnvironmentType apply(Context context); } + /** The EnvironmentType update stages. */ interface UpdateStages { /** The stage of the EnvironmentType update allowing to specify tags. */ @@ -155,6 +161,7 @@ interface WithTags { Update withTags(Map tags); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Gallery.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Gallery.java index ee5313e551669..25db14c28a353 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Gallery.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Gallery.java @@ -70,11 +70,13 @@ public interface Gallery { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The Gallery definition stages. */ interface DefinitionStages { /** The first stage of the Gallery definition. */ interface Blank extends WithParentResource { } + /** The stage of the Gallery definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -86,6 +88,7 @@ interface WithParentResource { */ WithCreate withExistingDevcenter(String resourceGroupName, String devCenterName); } + /** * The stage of the Gallery definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. @@ -106,6 +109,7 @@ interface WithCreate extends DefinitionStages.WithGalleryResourceId { */ Gallery create(Context context); } + /** The stage of the Gallery definition allowing to specify galleryResourceId. */ interface WithGalleryResourceId { /** @@ -117,6 +121,7 @@ interface WithGalleryResourceId { WithCreate withGalleryResourceId(String galleryResourceId); } } + /** * Begins update for the Gallery resource. * @@ -141,9 +146,11 @@ interface Update { */ Gallery apply(Context context); } + /** The Gallery update stages. */ interface UpdateStages { } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/IdentityType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/IdentityType.java new file mode 100644 index 0000000000000..05d948c352d40 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/IdentityType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Values can be systemAssignedIdentity or userAssignedIdentity. */ +public final class IdentityType extends ExpandableStringEnum { + /** Static value systemAssignedIdentity for IdentityType. */ + public static final IdentityType SYSTEM_ASSIGNED_IDENTITY = fromString("systemAssignedIdentity"); + + /** Static value userAssignedIdentity for IdentityType. */ + public static final IdentityType USER_ASSIGNED_IDENTITY = fromString("userAssignedIdentity"); + + /** Static value delegatedResourceIdentity for IdentityType. */ + public static final IdentityType DELEGATED_RESOURCE_IDENTITY = fromString("delegatedResourceIdentity"); + + /** + * Creates a new instance of IdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityType() { + } + + /** + * Creates or finds a IdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityType. + */ + @JsonCreator + public static IdentityType fromString(String name) { + return fromString(name, IdentityType.class); + } + + /** + * Gets known IdentityType values. + * + * @return known IdentityType values. + */ + public static Collection values() { + return values(IdentityType.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java index 84a67cdd92ab0..05bb6977ca92d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LocalAdminStatus. */ +/** + * Local Administrator enable or disable status. Indicates whether owners of Dev Boxes are added as local administrators + * on the Dev Box. + */ public final class LocalAdminStatus extends ExpandableStringEnum { /** Static value Disabled for LocalAdminStatus. */ public static final LocalAdminStatus DISABLED = fromString("Disabled"); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/NetworkConnection.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/NetworkConnection.java index 24746c375e2c2..3858098c75952 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/NetworkConnection.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/NetworkConnection.java @@ -154,11 +154,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The NetworkConnection definition stages. */ interface DefinitionStages { /** The first stage of the NetworkConnection definition. */ interface Blank extends WithLocation { } + /** The stage of the NetworkConnection definition allowing to specify location. */ interface WithLocation { /** @@ -177,6 +179,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the NetworkConnection definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -187,6 +190,7 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the NetworkConnection definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -215,6 +219,7 @@ interface WithCreate */ NetworkConnection create(Context context); } + /** The stage of the NetworkConnection definition allowing to specify tags. */ interface WithTags { /** @@ -225,6 +230,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the NetworkConnection definition allowing to specify networkingResourceGroupName. */ interface WithNetworkingResourceGroupName { /** @@ -236,6 +242,7 @@ interface WithNetworkingResourceGroupName { */ WithCreate withNetworkingResourceGroupName(String networkingResourceGroupName); } + /** The stage of the NetworkConnection definition allowing to specify domainJoinType. */ interface WithDomainJoinType { /** @@ -246,6 +253,7 @@ interface WithDomainJoinType { */ WithCreate withDomainJoinType(DomainJoinType domainJoinType); } + /** The stage of the NetworkConnection definition allowing to specify subnetId. */ interface WithSubnetId { /** @@ -256,6 +264,7 @@ interface WithSubnetId { */ WithCreate withSubnetId(String subnetId); } + /** The stage of the NetworkConnection definition allowing to specify domainName. */ interface WithDomainName { /** @@ -266,6 +275,7 @@ interface WithDomainName { */ WithCreate withDomainName(String domainName); } + /** The stage of the NetworkConnection definition allowing to specify organizationUnit. */ interface WithOrganizationUnit { /** @@ -276,6 +286,7 @@ interface WithOrganizationUnit { */ WithCreate withOrganizationUnit(String organizationUnit); } + /** The stage of the NetworkConnection definition allowing to specify domainUsername. */ interface WithDomainUsername { /** @@ -289,6 +300,7 @@ interface WithDomainUsername { */ WithCreate withDomainUsername(String domainUsername); } + /** The stage of the NetworkConnection definition allowing to specify domainPassword. */ interface WithDomainPassword { /** @@ -300,6 +312,7 @@ interface WithDomainPassword { WithCreate withDomainPassword(String domainPassword); } } + /** * Begins update for the NetworkConnection resource. * @@ -330,6 +343,7 @@ interface Update */ NetworkConnection apply(Context context); } + /** The NetworkConnection update stages. */ interface UpdateStages { /** The stage of the NetworkConnection update allowing to specify tags. */ @@ -342,6 +356,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the NetworkConnection update allowing to specify subnetId. */ interface WithSubnetId { /** @@ -352,6 +367,7 @@ interface WithSubnetId { */ Update withSubnetId(String subnetId); } + /** The stage of the NetworkConnection update allowing to specify domainName. */ interface WithDomainName { /** @@ -362,6 +378,7 @@ interface WithDomainName { */ Update withDomainName(String domainName); } + /** The stage of the NetworkConnection update allowing to specify organizationUnit. */ interface WithOrganizationUnit { /** @@ -372,6 +389,7 @@ interface WithOrganizationUnit { */ Update withOrganizationUnit(String organizationUnit); } + /** The stage of the NetworkConnection update allowing to specify domainUsername. */ interface WithDomainUsername { /** @@ -385,6 +403,7 @@ interface WithDomainUsername { */ Update withDomainUsername(String domainUsername); } + /** The stage of the NetworkConnection update allowing to specify domainPassword. */ interface WithDomainPassword { /** @@ -396,6 +415,7 @@ interface WithDomainPassword { Update withDomainPassword(String domainPassword); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ParameterType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ParameterType.java new file mode 100644 index 0000000000000..b10731051ae3c --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ParameterType.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.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of data a parameter accepts. */ +public final class ParameterType extends ExpandableStringEnum { + /** Static value array for ParameterType. */ + public static final ParameterType ARRAY = fromString("array"); + + /** Static value boolean for ParameterType. */ + public static final ParameterType BOOLEAN = fromString("boolean"); + + /** Static value integer for ParameterType. */ + public static final ParameterType INTEGER = fromString("integer"); + + /** Static value number for ParameterType. */ + public static final ParameterType NUMBER = fromString("number"); + + /** Static value object for ParameterType. */ + public static final ParameterType OBJECT = fromString("object"); + + /** Static value string for ParameterType. */ + public static final ParameterType STRING = fromString("string"); + + /** + * Creates a new instance of ParameterType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParameterType() { + } + + /** + * Creates or finds a ParameterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterType. + */ + @JsonCreator + public static ParameterType fromString(String name) { + return fromString(name, ParameterType.class); + } + + /** + * Gets known ParameterType values. + * + * @return known ParameterType values. + */ + public static Collection values() { + return values(ParameterType.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java index 6d73afd35564b..7e00ff1f167d7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java @@ -71,6 +71,13 @@ public interface Pool { */ List healthStatusDetails(); + /** + * Gets the devBoxCount property: Indicates the number of provisioned Dev Boxes in this pool. + * + * @return the devBoxCount value. + */ + Integer devBoxCount(); + /** * Gets the provisioningState property: The provisioning state of the resource. * @@ -115,6 +122,14 @@ public interface Pool { */ StopOnDisconnectConfiguration stopOnDisconnect(); + /** + * Gets the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @return the singleSignOnStatus value. + */ + SingleSignOnStatus singleSignOnStatus(); + /** * Gets the region of the resource. * @@ -150,11 +165,13 @@ interface Definition DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The Pool definition stages. */ interface DefinitionStages { /** The first stage of the Pool definition. */ interface Blank extends WithLocation { } + /** The stage of the Pool definition allowing to specify location. */ interface WithLocation { /** @@ -173,6 +190,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the Pool definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -184,6 +202,7 @@ interface WithParentResource { */ WithCreate withExistingProject(String resourceGroupName, String projectName); } + /** * The stage of the Pool definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. @@ -194,7 +213,8 @@ interface WithCreate DefinitionStages.WithNetworkConnectionName, DefinitionStages.WithLicenseType, DefinitionStages.WithLocalAdministrator, - DefinitionStages.WithStopOnDisconnect { + DefinitionStages.WithStopOnDisconnect, + DefinitionStages.WithSingleSignOnStatus { /** * Executes the create request. * @@ -210,6 +230,7 @@ interface WithCreate */ Pool create(Context context); } + /** The stage of the Pool definition allowing to specify tags. */ interface WithTags { /** @@ -220,6 +241,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Pool definition allowing to specify devBoxDefinitionName. */ interface WithDevBoxDefinitionName { /** @@ -230,6 +252,7 @@ interface WithDevBoxDefinitionName { */ WithCreate withDevBoxDefinitionName(String devBoxDefinitionName); } + /** The stage of the Pool definition allowing to specify networkConnectionName. */ interface WithNetworkConnectionName { /** @@ -241,6 +264,7 @@ interface WithNetworkConnectionName { */ WithCreate withNetworkConnectionName(String networkConnectionName); } + /** The stage of the Pool definition allowing to specify licenseType. */ interface WithLicenseType { /** @@ -253,6 +277,7 @@ interface WithLicenseType { */ WithCreate withLicenseType(LicenseType licenseType); } + /** The stage of the Pool definition allowing to specify localAdministrator. */ interface WithLocalAdministrator { /** @@ -265,6 +290,7 @@ interface WithLocalAdministrator { */ WithCreate withLocalAdministrator(LocalAdminStatus localAdministrator); } + /** The stage of the Pool definition allowing to specify stopOnDisconnect. */ interface WithStopOnDisconnect { /** @@ -276,7 +302,21 @@ interface WithStopOnDisconnect { */ WithCreate withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect); } + + /** The stage of the Pool definition allowing to specify singleSignOnStatus. */ + interface WithSingleSignOnStatus { + /** + * Specifies the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with + * single sign on enabled. The also requires that single sign on be enabled on the tenant.. + * + * @param singleSignOnStatus Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * @return the next definition stage. + */ + WithCreate withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus); + } } + /** * Begins update for the Pool resource. * @@ -291,7 +331,8 @@ interface Update UpdateStages.WithNetworkConnectionName, UpdateStages.WithLicenseType, UpdateStages.WithLocalAdministrator, - UpdateStages.WithStopOnDisconnect { + UpdateStages.WithStopOnDisconnect, + UpdateStages.WithSingleSignOnStatus { /** * Executes the update request. * @@ -307,6 +348,7 @@ interface Update */ Pool apply(Context context); } + /** The Pool update stages. */ interface UpdateStages { /** The stage of the Pool update allowing to specify tags. */ @@ -319,6 +361,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Pool update allowing to specify devBoxDefinitionName. */ interface WithDevBoxDefinitionName { /** @@ -329,6 +372,7 @@ interface WithDevBoxDefinitionName { */ Update withDevBoxDefinitionName(String devBoxDefinitionName); } + /** The stage of the Pool update allowing to specify networkConnectionName. */ interface WithNetworkConnectionName { /** @@ -340,6 +384,7 @@ interface WithNetworkConnectionName { */ Update withNetworkConnectionName(String networkConnectionName); } + /** The stage of the Pool update allowing to specify licenseType. */ interface WithLicenseType { /** @@ -352,6 +397,7 @@ interface WithLicenseType { */ Update withLicenseType(LicenseType licenseType); } + /** The stage of the Pool update allowing to specify localAdministrator. */ interface WithLocalAdministrator { /** @@ -364,6 +410,7 @@ interface WithLocalAdministrator { */ Update withLocalAdministrator(LocalAdminStatus localAdministrator); } + /** The stage of the Pool update allowing to specify stopOnDisconnect. */ interface WithStopOnDisconnect { /** @@ -375,7 +422,21 @@ interface WithStopOnDisconnect { */ Update withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect); } + + /** The stage of the Pool update allowing to specify singleSignOnStatus. */ + interface WithSingleSignOnStatus { + /** + * Specifies the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with + * single sign on enabled. The also requires that single sign on be enabled on the tenant.. + * + * @param singleSignOnStatus Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * @return the next definition stage. + */ + Update withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus); + } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java index 468422a3aeb7e..88080aad7d85a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java @@ -164,6 +164,31 @@ public PoolUpdate withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisco return this; } + /** + * Get the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @return the singleSignOnStatus value. + */ + public SingleSignOnStatus singleSignOnStatus() { + return this.innerProperties() == null ? null : this.innerProperties().singleSignOnStatus(); + } + + /** + * Set the singleSignOnStatus property: Indicates whether Dev Boxes in this pool are created with single sign on + * enabled. The also requires that single sign on be enabled on the tenant. + * + * @param singleSignOnStatus the singleSignOnStatus value to set. + * @return the PoolUpdate object itself. + */ + public PoolUpdate withSingleSignOnStatus(SingleSignOnStatus singleSignOnStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new PoolUpdateProperties(); + } + this.innerProperties().withSingleSignOnStatus(singleSignOnStatus); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java index 8d03287c45b3b..aa07bfe851e79 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java @@ -125,11 +125,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The Project definition stages. */ interface DefinitionStages { /** The first stage of the Project definition. */ interface Blank extends WithLocation { } + /** The stage of the Project definition allowing to specify location. */ interface WithLocation { /** @@ -148,6 +150,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the Project definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -158,6 +161,7 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the Project definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. @@ -182,6 +186,7 @@ interface WithCreate */ Project create(Context context); } + /** The stage of the Project definition allowing to specify tags. */ interface WithTags { /** @@ -192,6 +197,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Project definition allowing to specify devCenterId. */ interface WithDevCenterId { /** @@ -202,6 +208,7 @@ interface WithDevCenterId { */ WithCreate withDevCenterId(String devCenterId); } + /** The stage of the Project definition allowing to specify description. */ interface WithDescription { /** @@ -212,6 +219,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Project definition allowing to specify maxDevBoxesPerUser. */ interface WithMaxDevBoxesPerUser { /** @@ -226,6 +234,7 @@ interface WithMaxDevBoxesPerUser { WithCreate withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser); } } + /** * Begins update for the Project resource. * @@ -254,6 +263,7 @@ interface Update */ Project apply(Context context); } + /** The Project update stages. */ interface UpdateStages { /** The stage of the Project update allowing to specify tags. */ @@ -266,6 +276,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Project update allowing to specify devCenterId. */ interface WithDevCenterId { /** @@ -276,6 +287,7 @@ interface WithDevCenterId { */ Update withDevCenterId(String devCenterId); } + /** The stage of the Project update allowing to specify description. */ interface WithDescription { /** @@ -286,6 +298,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Project update allowing to specify maxDevBoxesPerUser. */ interface WithMaxDevBoxesPerUser { /** @@ -300,6 +313,7 @@ interface WithMaxDevBoxesPerUser { Update withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java index 13035c09bd079..5334b655da165 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java @@ -131,11 +131,13 @@ public interface ProjectEnvironmentType { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The ProjectEnvironmentType definition stages. */ interface DefinitionStages { /** The first stage of the ProjectEnvironmentType definition. */ interface Blank extends WithParentResource { } + /** The stage of the ProjectEnvironmentType definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -147,6 +149,7 @@ interface WithParentResource { */ WithCreate withExistingProject(String resourceGroupName, String projectName); } + /** * The stage of the ProjectEnvironmentType definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -174,6 +177,7 @@ interface WithCreate */ ProjectEnvironmentType create(Context context); } + /** The stage of the ProjectEnvironmentType definition allowing to specify location. */ interface WithLocation { /** @@ -192,6 +196,7 @@ interface WithLocation { */ WithCreate withRegion(String location); } + /** The stage of the ProjectEnvironmentType definition allowing to specify tags. */ interface WithTags { /** @@ -202,6 +207,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ProjectEnvironmentType definition allowing to specify identity. */ interface WithIdentity { /** @@ -212,6 +218,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ProjectEnvironmentType definition allowing to specify deploymentTargetId. */ interface WithDeploymentTargetId { /** @@ -224,6 +231,7 @@ interface WithDeploymentTargetId { */ WithCreate withDeploymentTargetId(String deploymentTargetId); } + /** The stage of the ProjectEnvironmentType definition allowing to specify status. */ interface WithStatus { /** @@ -234,6 +242,7 @@ interface WithStatus { */ WithCreate withStatus(EnvironmentTypeEnableStatus status); } + /** The stage of the ProjectEnvironmentType definition allowing to specify creatorRoleAssignment. */ interface WithCreatorRoleAssignment { /** @@ -247,6 +256,7 @@ interface WithCreatorRoleAssignment { WithCreate withCreatorRoleAssignment( ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment); } + /** The stage of the ProjectEnvironmentType definition allowing to specify userRoleAssignments. */ interface WithUserRoleAssignments { /** @@ -260,6 +270,7 @@ interface WithUserRoleAssignments { WithCreate withUserRoleAssignments(Map userRoleAssignments); } } + /** * Begins update for the ProjectEnvironmentType resource. * @@ -290,6 +301,7 @@ interface Update */ ProjectEnvironmentType apply(Context context); } + /** The ProjectEnvironmentType update stages. */ interface UpdateStages { /** The stage of the ProjectEnvironmentType update allowing to specify tags. */ @@ -302,6 +314,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ProjectEnvironmentType update allowing to specify identity. */ interface WithIdentity { /** @@ -312,6 +325,7 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ProjectEnvironmentType update allowing to specify deploymentTargetId. */ interface WithDeploymentTargetId { /** @@ -324,6 +338,7 @@ interface WithDeploymentTargetId { */ Update withDeploymentTargetId(String deploymentTargetId); } + /** The stage of the ProjectEnvironmentType update allowing to specify status. */ interface WithStatus { /** @@ -334,6 +349,7 @@ interface WithStatus { */ Update withStatus(EnvironmentTypeEnableStatus status); } + /** The stage of the ProjectEnvironmentType update allowing to specify creatorRoleAssignment. */ interface WithCreatorRoleAssignment { /** @@ -347,6 +363,7 @@ interface WithCreatorRoleAssignment { Update withCreatorRoleAssignment( ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment creatorRoleAssignment); } + /** The stage of the ProjectEnvironmentType update allowing to specify userRoleAssignments. */ interface WithUserRoleAssignments { /** @@ -360,6 +377,7 @@ interface WithUserRoleAssignments { Update withUserRoleAssignments(Map userRoleAssignments); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Schedule.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Schedule.java index cbfcb802a929f..bcead68686f26 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Schedule.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Schedule.java @@ -99,11 +99,13 @@ public interface Schedule { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The Schedule definition stages. */ interface DefinitionStages { /** The first stage of the Schedule definition. */ interface Blank extends WithParentResource { } + /** The stage of the Schedule definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -116,6 +118,7 @@ interface WithParentResource { */ WithCreate withExistingPool(String resourceGroupName, String projectName, String poolName); } + /** * The stage of the Schedule definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. @@ -142,6 +145,7 @@ interface WithCreate */ Schedule create(Context context); } + /** The stage of the Schedule definition allowing to specify typePropertiesType. */ interface WithTypePropertiesType { /** @@ -152,6 +156,7 @@ interface WithTypePropertiesType { */ WithCreate withTypePropertiesType(ScheduledType typePropertiesType); } + /** The stage of the Schedule definition allowing to specify frequency. */ interface WithFrequency { /** @@ -162,6 +167,7 @@ interface WithFrequency { */ WithCreate withFrequency(ScheduledFrequency frequency); } + /** The stage of the Schedule definition allowing to specify time. */ interface WithTime { /** @@ -172,6 +178,7 @@ interface WithTime { */ WithCreate withTime(String time); } + /** The stage of the Schedule definition allowing to specify timeZone. */ interface WithTimeZone { /** @@ -182,6 +189,7 @@ interface WithTimeZone { */ WithCreate withTimeZone(String timeZone); } + /** The stage of the Schedule definition allowing to specify state. */ interface WithState { /** @@ -192,6 +200,7 @@ interface WithState { */ WithCreate withState(ScheduleEnableStatus state); } + /** The stage of the Schedule definition allowing to specify top. */ interface WithTop { /** @@ -204,6 +213,7 @@ interface WithTop { WithCreate withTop(Integer top); } } + /** * Begins update for the Schedule resource. * @@ -235,6 +245,7 @@ interface Update */ Schedule apply(Context context); } + /** The Schedule update stages. */ interface UpdateStages { /** The stage of the Schedule update allowing to specify tags. */ @@ -247,6 +258,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Schedule update allowing to specify type. */ interface WithType { /** @@ -257,6 +269,7 @@ interface WithType { */ Update withType(ScheduledType type); } + /** The stage of the Schedule update allowing to specify frequency. */ interface WithFrequency { /** @@ -267,6 +280,7 @@ interface WithFrequency { */ Update withFrequency(ScheduledFrequency frequency); } + /** The stage of the Schedule update allowing to specify time. */ interface WithTime { /** @@ -277,6 +291,7 @@ interface WithTime { */ Update withTime(String time); } + /** The stage of the Schedule update allowing to specify timeZone. */ interface WithTimeZone { /** @@ -287,6 +302,7 @@ interface WithTimeZone { */ Update withTimeZone(String timeZone); } + /** The stage of the Schedule update allowing to specify state. */ interface WithState { /** @@ -297,6 +313,7 @@ interface WithState { */ Update withState(ScheduleEnableStatus state); } + /** The stage of the Schedule update allowing to specify top. */ interface WithTop { /** @@ -309,6 +326,7 @@ interface WithTop { Update withTop(Integer top); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SingleSignOnStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SingleSignOnStatus.java new file mode 100644 index 0000000000000..19f4cc884f08c --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SingleSignOnStatus.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * SingleSignOn (SSO) enable or disable status. Indicates whether Dev Boxes in the Pool will have SSO enabled or + * disabled. + */ +public final class SingleSignOnStatus extends ExpandableStringEnum { + /** Static value Disabled for SingleSignOnStatus. */ + public static final SingleSignOnStatus DISABLED = fromString("Disabled"); + + /** Static value Enabled for SingleSignOnStatus. */ + public static final SingleSignOnStatus ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of SingleSignOnStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SingleSignOnStatus() { + } + + /** + * Creates or finds a SingleSignOnStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SingleSignOnStatus. + */ + @JsonCreator + public static SingleSignOnStatus fromString(String name) { + return fromString(name, SingleSignOnStatus.class); + } + + /** + * Gets known SingleSignOnStatus values. + * + * @return known SingleSignOnStatus values. + */ + public static Collection values() { + return values(SingleSignOnStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncErrorDetails.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncErrorDetails.java new file mode 100644 index 0000000000000..452050fa321dc --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncErrorDetails.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner; +import java.util.List; + +/** An immutable client-side representation of SyncErrorDetails. */ +public interface SyncErrorDetails { + /** + * Gets the operationError property: Error information for the overall synchronization operation. + * + * @return the operationError value. + */ + CatalogErrorDetails operationError(); + + /** + * Gets the conflicts property: Catalog items that have conflicting names. + * + * @return the conflicts value. + */ + List conflicts(); + + /** + * Gets the errors property: Errors that occured during synchronization. + * + * @return the errors value. + */ + List errors(); + + /** + * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.SyncErrorDetailsInner object. + * + * @return the inner object. + */ + SyncErrorDetailsInner innerModel(); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncStats.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncStats.java new file mode 100644 index 0000000000000..c817361199f3a --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/SyncStats.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Stats of the synchronization. */ +@Immutable +public final class SyncStats { + /* + * Count of catalog items added during synchronization. + */ + @JsonProperty(value = "added", access = JsonProperty.Access.WRITE_ONLY) + private Integer added; + + /* + * Count of catalog items updated during synchronization. + */ + @JsonProperty(value = "updated", access = JsonProperty.Access.WRITE_ONLY) + private Integer updated; + + /* + * Count of catalog items that were unchanged during synchronization. + */ + @JsonProperty(value = "unchanged", access = JsonProperty.Access.WRITE_ONLY) + private Integer unchanged; + + /* + * Count of catalog items removed during synchronization. + */ + @JsonProperty(value = "removed", access = JsonProperty.Access.WRITE_ONLY) + private Integer removed; + + /* + * Count of catalog items that had validation errors during synchronization. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private Integer validationErrors; + + /* + * Count of synchronization errors that occured during synchronization. + */ + @JsonProperty(value = "synchronizationErrors", access = JsonProperty.Access.WRITE_ONLY) + private Integer synchronizationErrors; + + /** Creates an instance of SyncStats class. */ + public SyncStats() { + } + + /** + * Get the added property: Count of catalog items added during synchronization. + * + * @return the added value. + */ + public Integer added() { + return this.added; + } + + /** + * Get the updated property: Count of catalog items updated during synchronization. + * + * @return the updated value. + */ + public Integer updated() { + return this.updated; + } + + /** + * Get the unchanged property: Count of catalog items that were unchanged during synchronization. + * + * @return the unchanged value. + */ + public Integer unchanged() { + return this.unchanged; + } + + /** + * Get the removed property: Count of catalog items removed during synchronization. + * + * @return the removed value. + */ + public Integer removed() { + return this.removed; + } + + /** + * Get the validationErrors property: Count of catalog items that had validation errors during synchronization. + * + * @return the validationErrors value. + */ + public Integer validationErrors() { + return this.validationErrors; + } + + /** + * Get the synchronizationErrors property: Count of synchronization errors that occured during synchronization. + * + * @return the synchronizationErrors value. + */ + public Integer synchronizationErrors() { + return this.synchronizationErrors; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java index f64bdf4403fb1..2c568aada5afd 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks CreateOrUpdate. */ public final class AttachedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_Create.json */ /** * Sample code: AttachedNetworks_Create. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java index d793e0567b55b..0d7d143db2155 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks Delete. */ public final class AttachedNetworksDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_Delete.json */ /** * Sample code: AttachedNetworks_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java index fc48d9712a8e8..1536a25f9fc37 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks GetByDevCenter. */ public final class AttachedNetworksGetByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_GetByDevCenter.json */ /** * Sample code: AttachedNetworks_GetByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java index a5069ee26a861..653b2efd81f96 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks GetByProject. */ public final class AttachedNetworksGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_GetByProject.json */ /** * Sample code: AttachedNetworks_GetByProject. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java index 42969baec84d3..211370aa6c6b3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks ListByDevCenter. */ public final class AttachedNetworksListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_ListByDevCenter.json */ /** * Sample code: AttachedNetworks_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java index fb83e8337f9f8..e95d5f53c10f7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks ListByProject. */ public final class AttachedNetworksListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/AttachedNetworks_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/AttachedNetworks_ListByProject.json */ /** * Sample code: AttachedNetworks_ListByProject. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetErrorDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetErrorDetailsSamples.java new file mode 100644 index 0000000000000..5426a139baff4 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetErrorDetailsSamples.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.devcenter.generated; + +/** Samples for CatalogDevBoxDefinitions GetErrorDetails. */ +public final class CatalogDevBoxDefinitionsGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_GetErrorDetails.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsGetErrorDetails( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "CentralCatalog", "WebDevBox", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetSamples.java new file mode 100644 index 0000000000000..9a5fab606789b --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for CatalogDevBoxDefinitions Get. */ +public final class CatalogDevBoxDefinitionsGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_Get.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .getWithResponse("rg1", "Contoso", "CentralCatalog", "WebDevBox", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsListByCatalogSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsListByCatalogSamples.java new file mode 100644 index 0000000000000..105ee2e2eb230 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogDevBoxDefinitionsListByCatalogSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for CatalogDevBoxDefinitions ListByCatalog. */ +public final class CatalogDevBoxDefinitionsListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CatalogDevBoxDefinitions_ListByCatalog.json + */ + /** + * Sample code: CatalogDevBoxDefinitions_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogDevBoxDefinitionsListByCatalog( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogDevBoxDefinitions() + .listByCatalog("rg1", "Contoso", "CentralCatalog", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsConnectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsConnectSamples.java new file mode 100644 index 0000000000000..8717bbefacfc2 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsConnectSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for Catalogs Connect. */ +public final class CatalogsConnectSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Connect.json + */ + /** + * Sample code: Catalogs_Connect. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogsConnect(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.catalogs().connect("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java index f3c2a82652052..cf93ca51551f8 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Catalogs CreateOrUpdate. */ public final class CatalogsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateAdo.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_CreateAdo.json */ /** * Sample code: Catalogs_CreateOrUpdateAdo. @@ -31,7 +31,7 @@ public static void catalogsCreateOrUpdateAdo(com.azure.resourcemanager.devcenter } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_CreateGitHub.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_CreateGitHub.json */ /** * Sample code: Catalogs_CreateOrUpdateGitHub. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java index b51fda04e8cb3..03a2aa6b98c17 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Catalogs Delete. */ public final class CatalogsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Delete.json */ /** * Sample code: Catalogs_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java index 096cb1a976c7b..ef185e36e7665 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Catalogs Get. */ public final class CatalogsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Get.json */ /** * Sample code: Catalogs_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSyncErrorDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSyncErrorDetailsSamples.java new file mode 100644 index 0000000000000..622c4911b42f8 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSyncErrorDetailsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for Catalogs GetSyncErrorDetails. */ +public final class CatalogsGetSyncErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_GetSyncErrorDetails.json + */ + /** + * Sample code: Catalogs_GetSyncErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void catalogsGetSyncErrorDetails(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .catalogs() + .getSyncErrorDetailsWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java index ad7a0cf4ecfad..0e54c0d4ec298 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for Catalogs ListByDevCenter. */ public final class CatalogsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_List.json */ /** * Sample code: Catalogs_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java index af56cd7555d1e..142ac23fbda56 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java @@ -7,7 +7,7 @@ /** Samples for Catalogs Sync. */ public final class CatalogsSyncSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Sync.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Sync.json */ /** * Sample code: Catalogs_Sync. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java index 12a5dc3a1eaac..63a8a527dbe0c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Catalogs Update. */ public final class CatalogsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Catalogs_Patch.json */ /** * Sample code: Catalogs_Update. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java index c294f70e2e72c..f328e714332ac 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java @@ -9,7 +9,7 @@ /** Samples for CheckNameAvailability Execute. */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: NameAvailability. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetErrorDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetErrorDetailsSamples.java new file mode 100644 index 0000000000000..a749971af4cb2 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetErrorDetailsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for CustomizationTasks GetErrorDetails. */ +public final class CustomizationTasksGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_GetErrorDetails.json + */ + /** + * Sample code: CustomizationTasks_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksGetErrorDetails(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "CentralCatalog", "SampleTask", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetSamples.java new file mode 100644 index 0000000000000..7c45a14d8d306 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for CustomizationTasks Get. */ +public final class CustomizationTasksGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_Get.json + */ + /** + * Sample code: CustomizationTasks_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .getWithResponse("rg1", "Contoso", "CentralCatalog", "SampleTask", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksListByCatalogSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksListByCatalogSamples.java new file mode 100644 index 0000000000000..7f183281b585a --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CustomizationTasksListByCatalogSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for CustomizationTasks ListByCatalog. */ +public final class CustomizationTasksListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/CustomizationTasks_ListByCatalog.json + */ + /** + * Sample code: CustomizationTasks_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void customizationTasksListByCatalog(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .customizationTasks() + .listByCatalog("rg1", "Contoso", "CentralCatalog", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java index 9582bed48541a..d145868b8fe8c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for DevBoxDefinitions CreateOrUpdate. */ public final class DevBoxDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Create.json */ /** * Sample code: DevBoxDefinitions_Create. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java index 32d44ff35d508..6412e9608f4ea 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DevBoxDefinitions Delete. */ public final class DevBoxDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Delete.json */ /** * Sample code: DevBoxDefinitions_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java index 8fc4728aca226..b786b14d53294 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java @@ -7,7 +7,7 @@ /** Samples for DevBoxDefinitions GetByProject. */ public final class DevBoxDefinitionsGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_GetByProject.json */ /** * Sample code: DevBoxDefinitions_GetByProject. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java index 5deac087842a1..439608e113d2f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for DevBoxDefinitions Get. */ public final class DevBoxDefinitionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Get.json */ /** * Sample code: DevBoxDefinitions_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java index fda630198f80e..2bd16658d4a6b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for DevBoxDefinitions ListByDevCenter. */ public final class DevBoxDefinitionsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json */ /** * Sample code: DevBoxDefinitions_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java index 6aeb994422d31..49daf7119ed5d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java @@ -7,7 +7,7 @@ /** Samples for DevBoxDefinitions ListByProject. */ public final class DevBoxDefinitionsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_ListByProject.json */ /** * Sample code: DevBoxDefinitions_ListByProject. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java index 18838fcccf316..09bb7292efb4a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for DevBoxDefinitions Update. */ public final class DevBoxDefinitionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxDefinitions_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevBoxDefinitions_Patch.json */ /** * Sample code: DevBoxDefinitions_Patch. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java index b74b652292ff4..3e4c1f5eed8d9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java @@ -4,6 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; +import com.azure.resourcemanager.devcenter.models.CustomerManagedKeyEncryption; +import com.azure.resourcemanager.devcenter.models.CustomerManagedKeyEncryptionKeyIdentity; +import com.azure.resourcemanager.devcenter.models.Encryption; +import com.azure.resourcemanager.devcenter.models.IdentityType; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; @@ -13,7 +17,7 @@ /** Samples for DevCenters CreateOrUpdate. */ public final class DevCentersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Create.json */ /** * Sample code: DevCenters_Create. @@ -26,12 +30,12 @@ public static void devCentersCreate(com.azure.resourcemanager.devcenter.DevCente .define("Contoso") .withRegion("centralus") .withExistingResourceGroup("rg1") - .withTags(mapOf("CostCode", "12345")) + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) .create(); } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_CreateWithUserIdentity.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_CreateWithUserIdentity.json */ /** * Sample code: DevCenters_CreateWithUserIdentity. @@ -44,7 +48,7 @@ public static void devCentersCreateWithUserIdentity(com.azure.resourcemanager.de .define("Contoso") .withRegion("centralus") .withExistingResourceGroup("rg1") - .withTags(mapOf("CostCode", "12345")) + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) .withIdentity( new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.USER_ASSIGNED) @@ -55,6 +59,42 @@ public static void devCentersCreateWithUserIdentity(com.azure.resourcemanager.de .create(); } + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_CreateWithEncryption.json + */ + /** + * Sample code: DevCenters_CreateWithEncryption. + * + * @param manager Entry point to DevCenterManager. + */ + public static void devCentersCreateWithEncryption(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .devCenters() + .define("Contoso") + .withRegion("centralus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("CostCode", "fakeTokenPlaceholder")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", + new UserAssignedIdentity()))) + .withEncryption( + new Encryption() + .withCustomerManagedKeyEncryption( + new CustomerManagedKeyEncryption() + .withKeyEncryptionKeyIdentity( + new CustomerManagedKeyEncryptionKeyIdentity() + .withIdentityType(IdentityType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1")) + .withKeyEncryptionKeyUrl("fakeTokenPlaceholder"))) + .create(); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java index 29cbdd088e52a..1a5abe155bb3d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DevCenters Delete. */ public final class DevCentersDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Delete.json */ /** * Sample code: DevCenters_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java index a822821be46ec..71cbdfc8ad51b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for DevCenters GetByResourceGroup. */ public final class DevCentersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Get.json */ /** * Sample code: DevCenters_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java index 024a1b320a566..3e262d414b655 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for DevCenters ListByResourceGroup. */ public final class DevCentersListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_ListByResourceGroup.json */ /** * Sample code: DevCenters_ListByResourceGroup. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java index a17d67149f514..4b42885acc711 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java @@ -7,7 +7,7 @@ /** Samples for DevCenters List. */ public final class DevCentersListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_ListBySubscription.json */ /** * Sample code: DevCenters_ListBySubscription. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java index 4f1c80b613484..c24448c8c82f1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for DevCenters Update. */ public final class DevCentersUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenters_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/DevCenters_Patch.json */ /** * Sample code: DevCenters_Update. @@ -24,9 +24,10 @@ public static void devCentersUpdate(com.azure.resourcemanager.devcenter.DevCente .devCenters() .getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("CostCode", "12345")).apply(); + resource.update().withTags(mapOf("CostCode", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetErrorDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetErrorDetailsSamples.java new file mode 100644 index 0000000000000..a1d6513e9607e --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetErrorDetailsSamples.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.devcenter.generated; + +/** Samples for EnvironmentDefinitions GetErrorDetails. */ +public final class EnvironmentDefinitionsGetErrorDetailsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_GetErrorDetails.json + */ + /** + * Sample code: EnvironmentDefinitions_GetErrorDetails. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsGetErrorDetails( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .getErrorDetailsWithResponse( + "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetSamples.java new file mode 100644 index 0000000000000..7b457f70df585 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for EnvironmentDefinitions Get. */ +public final class EnvironmentDefinitionsGetSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_Get.json + */ + /** + * Sample code: EnvironmentDefinitions_Get. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .getWithResponse( + "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsListByCatalogSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsListByCatalogSamples.java new file mode 100644 index 0000000000000..7e6acb5ed4a81 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentDefinitionsListByCatalogSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for EnvironmentDefinitions ListByCatalog. */ +public final class EnvironmentDefinitionsListByCatalogSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentDefinitions_ListByCatalog.json + */ + /** + * Sample code: EnvironmentDefinitions_ListByCatalog. + * + * @param manager Entry point to DevCenterManager. + */ + public static void environmentDefinitionsListByCatalog( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .environmentDefinitions() + .listByCatalog("rg1", "Contoso", "myCatalog", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java index 6853e6b19ba51..45a70ebf9a220 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for EnvironmentTypes CreateOrUpdate. */ public final class EnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Put.json */ /** * Sample code: EnvironmentTypes_CreateOrUpdate. @@ -26,6 +26,7 @@ public static void environmentTypesCreateOrUpdate(com.azure.resourcemanager.devc .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java index 627eee624c62c..65a4483ce29ac 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for EnvironmentTypes Delete. */ public final class EnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Delete.json */ /** * Sample code: EnvironmentTypes_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java index fe873888a432d..94c5ffba8b65c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for EnvironmentTypes Get. */ public final class EnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Get.json */ /** * Sample code: EnvironmentTypes_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java index 7c8611ddfbec7..f0efea937df4a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for EnvironmentTypes ListByDevCenter. */ public final class EnvironmentTypesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_List.json */ /** * Sample code: EnvironmentTypes_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java index 6d4859475bf60..2df015e9959ae 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for EnvironmentTypes Update. */ public final class EnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/EnvironmentTypes_Patch.json */ /** * Sample code: EnvironmentTypes_Update. @@ -27,6 +27,7 @@ public static void environmentTypesUpdate(com.azure.resourcemanager.devcenter.De resource.update().withTags(mapOf("Owner", "superuser")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java index 599b4c1a9b08c..9c73fc219831a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Galleries CreateOrUpdate. */ public final class GalleriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Create.json */ /** * Sample code: Galleries_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java index 2f9570793412f..cdb85a18fff1c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Galleries Delete. */ public final class GalleriesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Delete.json */ /** * Sample code: Galleries_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java index 74b56ce657656..5b379aaf9226c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Galleries Get. */ public final class GalleriesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_Get.json */ /** * Sample code: Galleries_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java index 96703c5be08f0..15c815272c12b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for Galleries ListByDevCenter. */ public final class GalleriesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Galleries_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Galleries_List.json */ /** * Sample code: Galleries_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java index f89f51be35e59..21ee31ff3ecc3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ImageVersions Get. */ public final class ImageVersionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ImageVersions_Get.json */ /** * Sample code: Versions_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java index 2c2ee241cae89..051cb3316172d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java @@ -7,7 +7,7 @@ /** Samples for ImageVersions ListByImage. */ public final class ImageVersionsListByImageSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ImageVersions_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ImageVersions_List.json */ /** * Sample code: ImageVersions_ListByImage. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java index 28c7d99400bda..982c45a5d5482 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Images Get. */ public final class ImagesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_Get.json */ /** * Sample code: Images_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java index 781218f1b5c94..2dd19d4f7733f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java @@ -7,7 +7,7 @@ /** Samples for Images ListByDevCenter. */ public final class ImagesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_ListByDevCenter.json */ /** * Sample code: Images_ListByDevCenter. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java index 89626d541f86b..dd93e60ec88ea 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java @@ -7,7 +7,7 @@ /** Samples for Images ListByGallery. */ public final class ImagesListByGallerySamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Images_ListByGallery.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Images_ListByGallery.json */ /** * Sample code: Images_ListByGallery. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java index 09e14e09a789d..218d29651c886 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for NetworkConnections CreateOrUpdate. */ public final class NetworkConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Put.json */ /** * Sample code: NetworkConnections_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java index 13332adef0f14..c514b042ec217 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections Delete. */ public final class NetworkConnectionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Delete.json */ /** * Sample code: NetworkConnections_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java index c5cc3222a5252..5b6ba91355b54 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections GetByResourceGroup. */ public final class NetworkConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Get.json */ /** * Sample code: NetworkConnections_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java index cc22a60349d56..4f26ba2fcb0c2 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections GetHealthDetails. */ public final class NetworkConnectionsGetHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_GetHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_GetHealthDetails.json */ /** * Sample code: NetworkConnections_GetHealthDetails. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java index 0749d74b8f78e..8a94e5c9a297a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections ListByResourceGroup. */ public final class NetworkConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListByResourceGroup.json */ /** * Sample code: NetworkConnections_ListByResourceGroup. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java index 37a0b1620979c..7b051ff18c11c 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections ListHealthDetails. */ public final class NetworkConnectionsListHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListHealthDetails.json */ /** * Sample code: NetworkConnections_ListHealthDetails. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java index e90da30f3265b..aa3b4df266c68 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections ListOutboundNetworkDependenciesEndpoints. */ public final class NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java index 7db37729bef8f..fca6478bcd419 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections List. */ public final class NetworkConnectionsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_ListBySubscription.json */ /** * Sample code: NetworkConnections_ListBySubscription. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java index 999a8051ee816..9851afeb95318 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkConnections RunHealthChecks. */ public final class NetworkConnectionsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_RunHealthChecks.json */ /** * Sample code: NetworkConnections_RunHealthChecks. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java index 5e6f619983685..b85ea3a07f5a8 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for NetworkConnections Update. */ public final class NetworkConnectionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/NetworkConnections_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/NetworkConnections_Patch.json */ /** * Sample code: NetworkConnections_Update. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java index 6edf789184974..cb6cc8b74ca64 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/OperationStatus_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/OperationStatus_Get.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java index dc2bbf16400c0..0a1a9cf1f7318 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Operations_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Operations_Get.json */ /** * Sample code: Operations_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java index 297ce3aa0427d..cabed7bc4b7bd 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java @@ -6,13 +6,14 @@ import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.SingleSignOnStatus; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Put.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -33,6 +34,7 @@ public static void poolsCreateOrUpdate(com.azure.resourcemanager.devcenter.DevCe new StopOnDisconnectConfiguration() .withStatus(StopOnDisconnectEnableStatus.ENABLED) .withGracePeriodMinutes(60)) + .withSingleSignOnStatus(SingleSignOnStatus.DISABLED) .create(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java index 020ff9cbe4710..40b64aecd039b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java index 3218211be55a4..7424fb7b550e9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_GetUnhealthyStatus.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_GetUnhealthyStatus.json */ /** * Sample code: Pools_GetUnhealthyStatus. @@ -19,7 +19,7 @@ public static void poolsGetUnhealthyStatus(com.azure.resourcemanager.devcenter.D } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Get.json */ /** * Sample code: Pools_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java index 5addfb45e69e6..f60002015f0fe 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java @@ -7,7 +7,7 @@ /** Samples for Pools ListByProject. */ public final class PoolsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_List.json */ /** * Sample code: Pools_ListByProject. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java index 0c47d1f7a4820..b0d7050a68b5d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java @@ -7,7 +7,7 @@ /** Samples for Pools RunHealthChecks. */ public final class PoolsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_RunHealthChecks.json */ /** * Sample code: Pools_RefreshStatus. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java index 412f8607fd149..a6b88cc8f9974 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Pools_Patch.json */ /** * Sample code: Pools_Update. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java index 625fb96668e32..c479cb1848b7d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ProjectAllowedEnvironmentTypes Get. */ public final class ProjectAllowedEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java index c99d517902bb4..5a8c7e1bf38d6 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ProjectAllowedEnvironmentTypes List. */ public final class ProjectAllowedEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectAllowedEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_List. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java index 0e2e425a1c459..f07389a90f06d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ /** Samples for ProjectEnvironmentTypes CreateOrUpdate. */ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Put.json */ /** * Sample code: ProjectEnvironmentTypes_CreateOrUpdate. @@ -51,6 +51,7 @@ public static void projectEnvironmentTypesCreateOrUpdate( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java index 456362292d5c3..93a71216f8676 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ProjectEnvironmentTypes Delete. */ public final class ProjectEnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Delete.json */ /** * Sample code: ProjectEnvironmentTypes_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java index c3f1c1b36c4a1..9cbf9c422344a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ProjectEnvironmentTypes Get. */ public final class ProjectEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Get.json */ /** * Sample code: ProjectEnvironmentTypes_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java index 4283cd6b73468..11480e27ab1b1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ProjectEnvironmentTypes List. */ public final class ProjectEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_List.json */ /** * Sample code: ProjectEnvironmentTypes_List. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java index ff5bac4cb2b6e..2879cba1958ed 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java @@ -17,7 +17,7 @@ /** Samples for ProjectEnvironmentTypes Update. */ public final class ProjectEnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/ProjectEnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/ProjectEnvironmentTypes_Patch.json */ /** * Sample code: ProjectEnvironmentTypes_Update. @@ -50,6 +50,7 @@ public static void projectEnvironmentTypesUpdate(com.azure.resourcemanager.devce .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java index add708e9d80a0..201735fa79125 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Projects CreateOrUpdate. */ public final class ProjectsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_PutWithMaxDevBoxPerUser.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json */ /** * Sample code: Projects_CreateOrUpdateWithLimitsPerDev. @@ -33,7 +33,7 @@ public static void projectsCreateOrUpdateWithLimitsPerDev( } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Put.json */ /** * Sample code: Projects_CreateOrUpdate. @@ -53,6 +53,7 @@ public static void projectsCreateOrUpdate(com.azure.resourcemanager.devcenter.De .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java index d9b2514f05027..f914cf0db380e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Projects Delete. */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Delete.json */ /** * Sample code: Projects_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java index c3a46b62396b5..e032735203027 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Projects GetByResourceGroup. */ public final class ProjectsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Get.json */ /** * Sample code: Projects_Get. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java index aaedfd2cee6d5..60d6377bfd63e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Projects ListByResourceGroup. */ public final class ProjectsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_ListByResourceGroup.json */ /** * Sample code: Projects_ListByResourceGroup. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java index 8516dc06f8bbf..34443f269eaef 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Projects List. */ public final class ProjectsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_ListBySubscription.json */ /** * Sample code: Projects_ListBySubscription. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java index efd001fe64ba5..b4a254684ae23 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Projects Update. */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Projects_Patch.json */ /** * Sample code: Projects_Update. @@ -27,6 +27,7 @@ public static void projectsUpdate(com.azure.resourcemanager.devcenter.DevCenterM resource.update().withTags(mapOf("CostCenter", "R&D")).withDescription("This is my first project.").apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java index e7403103659c9..5af650b7311cf 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json */ /** * Sample code: Schedules_CreateDailyShutdownPoolSchedule. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java index 73aaf182c44ce..c280857df5653 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Delete.json */ /** * Sample code: Schedules_Delete. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java index cebf3abc80146..fd7ca38a148d7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Get.json */ /** * Sample code: Schedules_GetByPool. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java index 7cbcef1a481dc..8cfa3f6a4caa5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules ListByPool. */ public final class SchedulesListByPoolSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_ListByPool.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_ListByPool.json */ /** * Sample code: Schedules_ListByPool. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java index ecffeba6a5a61..8436b11a30b66 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Schedules Update. */ public final class SchedulesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Schedules_Patch.json */ /** * Sample code: Schedules_Update. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java index ae48377058eaf..7a55c87a907d2 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java @@ -7,7 +7,7 @@ /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Skus_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Skus_ListBySubscription.json */ /** * Sample code: Skus_ListBySubscription. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java index 0a35a2756a0f2..92f4bfc8587f1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java @@ -7,7 +7,7 @@ /** Samples for Usages ListByLocation. */ public final class UsagesListByLocationSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/examples/Usages_ListByLocation.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-08-01-preview/examples/Usages_ListByLocation.json */ /** * Sample code: listUsages. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java deleted file mode 100644 index 980563ced4742..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AllowedEnvironmentTypeInner; - -public final class AllowedEnvironmentTypeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedEnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"yxzk\",\"name\":\"noc\",\"type\":\"koklya\"}") - .toObject(AllowedEnvironmentTypeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedEnvironmentTypeInner model = new AllowedEnvironmentTypeInner(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java deleted file mode 100644 index 4c2b220069107..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentTypeListResult; - -public final class AllowedEnvironmentTypeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedEnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"hcbkhajde\",\"name\":\"eamdp\",\"type\":\"agalpbuxwgipwhon\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"hwankixzbinjepu\",\"name\":\"tmryw\",\"type\":\"uzoqft\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"n\",\"name\":\"cqvyxlwhzlsico\",\"type\":\"oqqnwvlryav\"}],\"nextLink\":\"heun\"}") - .toObject(AllowedEnvironmentTypeListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedEnvironmentTypeListResult model = new AllowedEnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java deleted file mode 100644 index 415fdd547804d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AllowedEnvironmentTypeProperties; - -public final class AllowedEnvironmentTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedEnvironmentTypeProperties model = - BinaryData - .fromString("{\"provisioningState\":\"TransientFailure\"}") - .toObject(AllowedEnvironmentTypeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedEnvironmentTypeProperties model = new AllowedEnvironmentTypeProperties(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java deleted file mode 100644 index b9ae76b185eb0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AttachedNetworkConnectionInner; -import org.junit.jupiter.api.Assertions; - -public final class AttachedNetworkConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedNetworkConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Created\",\"networkConnectionId\":\"qpteeh\",\"networkConnectionLocation\":\"vypyqrimzinpv\",\"healthCheckStatus\":\"Unknown\",\"domainJoinType\":\"AzureADJoin\"},\"id\":\"rsoodqxhcrmnoh\",\"name\":\"t\",\"type\":\"kwh\"}") - .toObject(AttachedNetworkConnectionInner.class); - Assertions.assertEquals("qpteeh", model.networkConnectionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedNetworkConnectionInner model = new AttachedNetworkConnectionInner().withNetworkConnectionId("qpteeh"); - model = BinaryData.fromObject(model).toObject(AttachedNetworkConnectionInner.class); - Assertions.assertEquals("qpteeh", model.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java deleted file mode 100644 index df004792526bc..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AttachedNetworkConnectionProperties; -import org.junit.jupiter.api.Assertions; - -public final class AttachedNetworkConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedNetworkConnectionProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"RolloutInProgress\",\"networkConnectionId\":\"ifiyipjxsqwpgrj\",\"networkConnectionLocation\":\"norcjxvsnbyxqab\",\"healthCheckStatus\":\"Running\",\"domainJoinType\":\"HybridAzureADJoin\"}") - .toObject(AttachedNetworkConnectionProperties.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.networkConnectionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedNetworkConnectionProperties model = - new AttachedNetworkConnectionProperties().withNetworkConnectionId("ifiyipjxsqwpgrj"); - model = BinaryData.fromObject(model).toObject(AttachedNetworkConnectionProperties.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java deleted file mode 100644 index 27a995bba13e4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkListResult; - -public final class AttachedNetworkListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedNetworkListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"networkConnectionId\":\"dcuf\",\"networkConnectionLocation\":\"srp\",\"healthCheckStatus\":\"Running\",\"domainJoinType\":\"AzureADJoin\"},\"id\":\"sezcxtb\",\"name\":\"sgfyccsnew\",\"type\":\"dwzjeiach\"}],\"nextLink\":\"osfln\"}") - .toObject(AttachedNetworkListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedNetworkListResult model = new AttachedNetworkListResult(); - model = BinaryData.fromObject(model).toObject(AttachedNetworkListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java deleted file mode 100644 index 9dda3b0d0781b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 AttachedNetworksDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.attachedNetworks().delete("zuo", "ejwcwwqiok", "ssxmojms", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java deleted file mode 100644 index 1ae412eca4449..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksGetByDevCenterWithResponseMockTests { - @Test - public void testGetByDevCenterWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Running\",\"networkConnectionId\":\"jdz\",\"networkConnectionLocation\":\"cvdsrhnj\",\"healthCheckStatus\":\"Passed\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"novqfzge\",\"name\":\"jdftuljltd\",\"type\":\"ceamtm\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedNetworkConnection response = - manager - .attachedNetworks() - .getByDevCenterWithResponse("wrykqgai", "mvikl", "ydv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jdz", response.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java deleted file mode 100644 index aafe26a9e855e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksGetByProjectWithResponseMockTests { - @Test - public void testGetByProjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Deleted\",\"networkConnectionId\":\"ifqjz\",\"networkConnectionLocation\":\"mrhublwpc\",\"healthCheckStatus\":\"Unknown\",\"domainJoinType\":\"AzureADJoin\"},\"id\":\"jupauut\",\"name\":\"woqhihe\",\"type\":\"qg\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedNetworkConnection response = - manager - .attachedNetworks() - .getByProjectWithResponse("asdvl", "fwdgzxulucvp", "mrsreuzvxurisjnh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ifqjz", response.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java deleted file mode 100644 index 7a74ca81ec611..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Created\",\"networkConnectionId\":\"acvlhv\",\"networkConnectionLocation\":\"dyftumrtwna\",\"healthCheckStatus\":\"Failed\",\"domainJoinType\":\"AzureADJoin\"},\"id\":\"wkojgcyztsfmzn\",\"name\":\"aeqphchqnr\",\"type\":\"rpxeh\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .attachedNetworks() - .listByDevCenter("zpnfqntcypsxj", "foimwkslircizjxv", 1233687153, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("acvlhv", response.iterator().next().networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java deleted file mode 100644 index b9b68de150679..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksListByProjectMockTests { - @Test - public void testListByProject() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"networkConnectionId\":\"ye\",\"networkConnectionLocation\":\"ymsgaojfmwnc\",\"healthCheckStatus\":\"Passed\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"irctymoxoftpipiw\",\"name\":\"czuhxacpqjlihh\",\"type\":\"usps\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .attachedNetworks() - .listByProject("zbomvzzbtdcqvpni", "ujviylwdshfs", 224040944, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ye", response.iterator().next().networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java deleted file mode 100644 index 34c82183a47b1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.Capability; - -public final class CapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Capability model = - BinaryData.fromString("{\"name\":\"ljphuopxodl\",\"value\":\"ynt\"}").toObject(Capability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Capability model = new Capability(); - model = BinaryData.fromObject(model).toObject(Capability.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java deleted file mode 100644 index 0d07a3bb85cd0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.CatalogListResult; - -public final class CatalogListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CatalogListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"syncState\":\"Canceled\",\"lastSyncTime\":\"2021-10-22T08:49:49Z\"},\"id\":\"ohctbqvudwx\",\"name\":\"ndnvo\",\"type\":\"gujjugwdkcglh\"}],\"nextLink\":\"azjdyggd\"}") - .toObject(CatalogListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CatalogListResult model = new CatalogListResult(); - model = BinaryData.fromObject(model).toObject(CatalogListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java deleted file mode 100644 index 7c841fadb699b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 CatalogsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.catalogs().delete("x", "rnxrxcpj", "isavok", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java deleted file mode 100644 index 9bef0c98ad19d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityResponse; -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 CheckNameAvailabilitiesExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"ukuqgsj\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .checkNameAvailabilities() - .executeWithResponse( - new CheckNameAvailabilityRequest().withName("etnwsdtutnw").withType("uycvuzhyrmewip"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("ukuqgsj", response.message()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 1f3e47964652a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"lvmbmpaxmodfvuef\",\"type\":\"sbpfvmwyhr\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("lvmbmpaxmodfvuef", model.name()); - Assertions.assertEquals("sbpfvmwyhr", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("lvmbmpaxmodfvuef").withType("sbpfvmwyhr"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("lvmbmpaxmodfvuef", model.name()); - Assertions.assertEquals("sbpfvmwyhr", model.type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index d4aef998e583f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"aakc\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("aakc", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.INVALID) - .withMessage("aakc"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("aakc", model.message()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java deleted file mode 100644 index 3105c0422635a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionListResult; - -public final class DevBoxDefinitionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevBoxDefinitionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"imageValidationStatus\":\"Pending\",\"osStorageType\":\"urqhaka\",\"hibernateSupport\":\"Enabled\"},\"location\":\"hsfwxosowzxcug\",\"tags\":{\"wfvovbv\":\"ooxdjebwpuc\",\"jrwjueiotwm\":\"euecivyhzceuoj\",\"rjaw\":\"dytdxwitx\"},\"id\":\"qwgxhniskx\",\"name\":\"bkpyc\",\"type\":\"klwndnhjdauwhv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"imageValidationStatus\":\"Pending\",\"osStorageType\":\"znbmpowuwprzq\",\"hibernateSupport\":\"Enabled\"},\"location\":\"alupjm\",\"tags\":{\"riplrbpbewtg\":\"xobbcswsrt\",\"c\":\"fgb\",\"gibtnm\":\"wxzvlvqhjkb\"},\"id\":\"iebwwaloayqcgwrt\",\"name\":\"j\",\"type\":\"zg\"},{\"properties\":{\"provisioningState\":\"RolloutInProgress\",\"imageValidationStatus\":\"TimedOut\",\"osStorageType\":\"ts\",\"hibernateSupport\":\"Enabled\"},\"location\":\"bp\",\"tags\":{\"rknftguvriuhprwm\":\"p\",\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"zlmwlxkvugfhz\",\"name\":\"vawjvzunlu\",\"type\":\"hnnpr\"},{\"properties\":{\"provisioningState\":\"TransientFailure\",\"imageValidationStatus\":\"Pending\",\"osStorageType\":\"aejxd\",\"hibernateSupport\":\"Enabled\"},\"location\":\"kzbbtd\",\"tags\":{\"sjyofdx\":\"veekgpwozuhkfp\"},\"id\":\"uusdttouwa\",\"name\":\"oekqvk\",\"type\":\"lns\"}],\"nextLink\":\"bxwyjsflhhcaa\"}") - .toObject(DevBoxDefinitionListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevBoxDefinitionListResult model = new DevBoxDefinitionListResult(); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java deleted file mode 100644 index 384d554dd01a9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionUpdateProperties; -import com.azure.resourcemanager.devcenter.models.HibernateSupport; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class DevBoxDefinitionUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevBoxDefinitionUpdateProperties model = - BinaryData - .fromString( - "{\"imageReference\":{\"id\":\"pnapnyiropuh\",\"exactVersion\":\"gvpgy\"},\"sku\":{\"name\":\"qgitxmed\",\"tier\":\"Free\",\"size\":\"lynqwwncwzzh\",\"family\":\"ktrmgucnapkt\",\"capacity\":203480893},\"osStorageType\":\"lwptfdy\",\"hibernateSupport\":\"Enabled\"}") - .toObject(DevBoxDefinitionUpdateProperties.class); - Assertions.assertEquals("pnapnyiropuh", model.imageReference().id()); - Assertions.assertEquals("qgitxmed", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("lynqwwncwzzh", model.sku().size()); - Assertions.assertEquals("ktrmgucnapkt", model.sku().family()); - Assertions.assertEquals(203480893, model.sku().capacity()); - Assertions.assertEquals("lwptfdy", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevBoxDefinitionUpdateProperties model = - new DevBoxDefinitionUpdateProperties() - .withImageReference(new ImageReference().withId("pnapnyiropuh")) - .withSku( - new Sku() - .withName("qgitxmed") - .withTier(SkuTier.FREE) - .withSize("lynqwwncwzzh") - .withFamily("ktrmgucnapkt") - .withCapacity(203480893)) - .withOsStorageType("lwptfdy") - .withHibernateSupport(HibernateSupport.ENABLED); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionUpdateProperties.class); - Assertions.assertEquals("pnapnyiropuh", model.imageReference().id()); - Assertions.assertEquals("qgitxmed", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("lynqwwncwzzh", model.sku().size()); - Assertions.assertEquals("ktrmgucnapkt", model.sku().family()); - Assertions.assertEquals(203480893, model.sku().capacity()); - Assertions.assertEquals("lwptfdy", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java deleted file mode 100644 index 86cf0128d9adb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionUpdate; -import com.azure.resourcemanager.devcenter.models.HibernateSupport; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DevBoxDefinitionUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevBoxDefinitionUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"imageReference\":{\"id\":\"tmgrcfbun\",\"exactVersion\":\"fqjhhkxbpvjymj\"},\"sku\":{\"name\":\"xjyngudivk\",\"tier\":\"Basic\",\"size\":\"bxqz\",\"family\":\"zjf\",\"capacity\":1306170568},\"osStorageType\":\"fdxxivetvtcqaqtd\",\"hibernateSupport\":\"Enabled\"},\"tags\":{\"vxysl\":\"xv\",\"ytkblmpew\":\"bhsfxob\"},\"location\":\"fbkrvrnsvs\"}") - .toObject(DevBoxDefinitionUpdate.class); - Assertions.assertEquals("xv", model.tags().get("vxysl")); - Assertions.assertEquals("fbkrvrnsvs", model.location()); - Assertions.assertEquals("tmgrcfbun", model.imageReference().id()); - Assertions.assertEquals("xjyngudivk", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("bxqz", model.sku().size()); - Assertions.assertEquals("zjf", model.sku().family()); - Assertions.assertEquals(1306170568, model.sku().capacity()); - Assertions.assertEquals("fdxxivetvtcqaqtd", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevBoxDefinitionUpdate model = - new DevBoxDefinitionUpdate() - .withTags(mapOf("vxysl", "xv", "ytkblmpew", "bhsfxob")) - .withLocation("fbkrvrnsvs") - .withImageReference(new ImageReference().withId("tmgrcfbun")) - .withSku( - new Sku() - .withName("xjyngudivk") - .withTier(SkuTier.BASIC) - .withSize("bxqz") - .withFamily("zjf") - .withCapacity(1306170568)) - .withOsStorageType("fdxxivetvtcqaqtd") - .withHibernateSupport(HibernateSupport.ENABLED); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionUpdate.class); - Assertions.assertEquals("xv", model.tags().get("vxysl")); - Assertions.assertEquals("fbkrvrnsvs", model.location()); - Assertions.assertEquals("tmgrcfbun", model.imageReference().id()); - Assertions.assertEquals("xjyngudivk", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("bxqz", model.sku().size()); - Assertions.assertEquals("zjf", model.sku().family()); - Assertions.assertEquals(1306170568, model.sku().capacity()); - Assertions.assertEquals("fdxxivetvtcqaqtd", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java deleted file mode 100644 index 5ceeb594ab662..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 DevBoxDefinitionsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devBoxDefinitions().delete("ubgq", "brta", "metttwgd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java deleted file mode 100644 index 3dd1cbf73f2ed..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterInner; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DevCenterInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevCenterInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"MovingResources\",\"devCenterUri\":\"pzvgnwzsymglzufc\"},\"identity\":{\"principalId\":\"d864e238-85aa-45f6-bc0a-0d04874d283f\",\"tenantId\":\"1f8aca36-b0bd-4453-a820-b5a1559aee97\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"anufhfcbjysag\":{\"principalId\":\"857214e8-69f3-4cfa-aa6c-311b897a9b59\",\"clientId\":\"6fe19f67-31c9-4829-8a4a-95bfa53d8180\"},\"xqhabi\":{\"principalId\":\"7033dcf7-b35d-4907-a60b-11b104a604c2\",\"clientId\":\"01d89c8b-ed45-4332-ab70-b32c5bafaa4c\"}}},\"location\":\"ikxwc\",\"tags\":{\"n\":\"scnpqxuhivy\",\"rkxvdum\":\"wby\"},\"id\":\"grtfwvu\",\"name\":\"xgaudccs\",\"type\":\"h\"}") - .toObject(DevCenterInner.class); - Assertions.assertEquals("ikxwc", model.location()); - Assertions.assertEquals("scnpqxuhivy", model.tags().get("n")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevCenterInner model = - new DevCenterInner() - .withLocation("ikxwc") - .withTags(mapOf("n", "scnpqxuhivy", "rkxvdum", "wby")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("anufhfcbjysag", new UserAssignedIdentity(), "xqhabi", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DevCenterInner.class); - Assertions.assertEquals("ikxwc", model.location()); - Assertions.assertEquals("scnpqxuhivy", model.tags().get("n")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java deleted file mode 100644 index 8cb3f807a428f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevCenterListResult; - -public final class DevCenterListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevCenterListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"devCenterUri\":\"gjxpybczmehmt\"},\"identity\":{\"principalId\":\"bb2bba87-a02b-4e09-80b1-cc9ed8ed2c49\",\"tenantId\":\"f9eed529-8424-485d-be91-fdd49a19f899\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"rupidgsyb\",\"tags\":{\"xaobhdxbmtqioqjz\":\"hphoycm\",\"ownoizhw\":\"htbmuf\"},\"id\":\"rxybqsoq\",\"name\":\"jgkdmbpazlobcu\",\"type\":\"pdznrbtcqqjnqgl\"},{\"properties\":{\"provisioningState\":\"Creating\",\"devCenterUri\":\"foooj\"},\"identity\":{\"principalId\":\"76dc2ea5-a1c6-4569-96d2-c059fab812ce\",\"tenantId\":\"ef815baf-87fd-4208-8320-1a1564173a64\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"saagdf\",\"tags\":{\"izntocipao\":\"zlhjxrifkwmrvkt\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"provisioningState\":\"NotSpecified\",\"devCenterUri\":\"deupewnwrei\"},\"identity\":{\"principalId\":\"a09f9afa-2073-48e0-b331-8d1bc33318f7\",\"tenantId\":\"319db240-f377-45be-8479-6c3edff9e2d3\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"sarhmofc\",\"tags\":{\"rkdtmlxh\":\"my\"},\"id\":\"kuksjtxukcdm\",\"name\":\"arcryuanzwuxzdxt\",\"type\":\"yrlhmwhfpmrqobm\"}],\"nextLink\":\"kknryrtihf\"}") - .toObject(DevCenterListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevCenterListResult model = new DevCenterListResult(); - model = BinaryData.fromObject(model).toObject(DevCenterListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java deleted file mode 100644 index 6a000bb444ade..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterProperties; - -public final class DevCenterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevCenterProperties model = - BinaryData - .fromString("{\"provisioningState\":\"StorageProvisioningFailed\",\"devCenterUri\":\"yejhk\"}") - .toObject(DevCenterProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevCenterProperties model = new DevCenterProperties(); - model = BinaryData.fromObject(model).toObject(DevCenterProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java deleted file mode 100644 index 8bbb500df4150..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterSkuInner; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class DevCenterSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevCenterSkuInner model = - BinaryData - .fromString( - "{\"resourceType\":\"fnndl\",\"locations\":[\"hkoymkcdyhbp\",\"kpw\",\"reqnovvqfov\"],\"capabilities\":[{\"name\":\"wsuwsyr\",\"value\":\"dsytgadgvr\"},{\"name\":\"aeneqnzarrwl\",\"value\":\"uijfqk\"}],\"name\":\"cewiipfpub\",\"tier\":\"Basic\",\"size\":\"wifto\",\"family\":\"kvpuvksgplsaknyn\",\"capacity\":654967336}") - .toObject(DevCenterSkuInner.class); - Assertions.assertEquals("cewiipfpub", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("wifto", model.size()); - Assertions.assertEquals("kvpuvksgplsaknyn", model.family()); - Assertions.assertEquals(654967336, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevCenterSkuInner model = - new DevCenterSkuInner() - .withName("cewiipfpub") - .withTier(SkuTier.BASIC) - .withSize("wifto") - .withFamily("kvpuvksgplsaknyn") - .withCapacity(654967336); - model = BinaryData.fromObject(model).toObject(DevCenterSkuInner.class); - Assertions.assertEquals("cewiipfpub", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("wifto", model.size()); - Assertions.assertEquals("kvpuvksgplsaknyn", model.family()); - Assertions.assertEquals(654967336, model.capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java deleted file mode 100644 index 2fb43c293466c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevCenterUpdate; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DevCenterUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DevCenterUpdate model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"2bfc1a1c-bfa3-4ea9-859a-aaba75bff1cc\",\"tenantId\":\"c1654d8a-3e20-4b5a-84d9-b6ea0101e703\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ipjoxzjnchgejs\":{\"principalId\":\"f1a61d1f-4764-4e12-b2ee-0b09a35ead4b\",\"clientId\":\"6447ff6d-c8ca-4e0d-81e2-40733b7723ea\"},\"mailzydehojw\":{\"principalId\":\"cbccdaa8-5def-477b-8de3-e5cda0f43375\",\"clientId\":\"74b251ab-cda5-4f1e-9ffa-8cb6fc493e37\"},\"uxinpmqnjaq\":{\"principalId\":\"3dbb6668-9e69-47b1-820a-ca0d0ffca14a\",\"clientId\":\"1abb8f46-79f3-4078-b84f-bab39bf60442\"}}},\"tags\":{\"jvwmfda\":\"jsprozvcpute\"},\"location\":\"cmdv\"}") - .toObject(DevCenterUpdate.class); - Assertions.assertEquals("jsprozvcpute", model.tags().get("jvwmfda")); - Assertions.assertEquals("cmdv", model.location()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DevCenterUpdate model = - new DevCenterUpdate() - .withTags(mapOf("jvwmfda", "jsprozvcpute")) - .withLocation("cmdv") - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "ipjoxzjnchgejs", - new UserAssignedIdentity(), - "mailzydehojw", - new UserAssignedIdentity(), - "uxinpmqnjaq", - new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DevCenterUpdate.class); - Assertions.assertEquals("jsprozvcpute", model.tags().get("jvwmfda")); - Assertions.assertEquals("cmdv", model.location()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java deleted file mode 100644 index ec29c9aef0638..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"nhlmctlpdng\"},\"identity\":{\"principalId\":\"22435d35-0662-42ef-8921-a3af5d7b070b\",\"tenantId\":\"29c37418-7cea-464d-8235-fc1d40a2e08b\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"ixkwmyijejveg\",\"tags\":{\"xexccbdreaxhcexd\":\"pna\",\"nhyjsv\":\"rvqahqkghtpwi\",\"vrvmtgjqppyost\":\"ycxzbfvoo\",\"myhgfipnsxkmc\":\"on\"},\"id\":\"a\",\"name\":\"krrjrea\",\"type\":\"xt\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DevCenter response = - manager - .devCenters() - .define("wccsnjvcdwxlpqek") - .withRegion("dhtmdvypgikd") - .withExistingResourceGroup("edkowepbqpcrfk") - .withTags(mapOf("rvqqaatj", "ywkbirryuzhlhkjo", "ioolvrwxkvtkkgll", "nrvgoupmfiibfgg")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .create(); - - Assertions.assertEquals("ixkwmyijejveg", response.location()); - Assertions.assertEquals("pna", response.tags().get("xexccbdreaxhcexd")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java deleted file mode 100644 index 1d0c20dae7661..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 DevCentersDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devCenters().delete("ob", "pg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 50624ec98080a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"TransientFailure\",\"devCenterUri\":\"tzingamvpph\"},\"identity\":{\"principalId\":\"dd0d309a-153e-4428-8339-2634d034e0b1\",\"tenantId\":\"28293d73-ff0d-49cf-9ca0-a6129e670fbf\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"hqamvdkf\",\"tags\":{\"atkzwpcnpw\":\"wcvtbvkayhmtnvyq\",\"cyajguqf\":\"cjaesgvvs\",\"wzrmuh\":\"wygzlvdnkfxusem\",\"qxqvpsvuoymgc\":\"pfcqdp\"},\"id\":\"elvezrypq\",\"name\":\"mfe\",\"type\":\"kerqwkyh\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DevCenter response = - manager - .devCenters() - .getByResourceGroupWithResponse("guufzd", "syqtfi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hqamvdkf", response.location()); - Assertions.assertEquals("wcvtbvkayhmtnvyq", response.tags().get("atkzwpcnpw")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java deleted file mode 100644 index ae774a772d6e4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"devCenterUri\":\"ljagrqmqhl\"},\"identity\":{\"principalId\":\"7296589f-b0cf-40ce-ab12-e9d0fed9b3b8\",\"tenantId\":\"fe414ed4-0140-41b4-95e4-8508c98a7a7d\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"nalghfkvtvsexso\",\"tags\":{\"hmzk\":\"luqhhahhxv\"},\"id\":\"pjgwwspug\",\"name\":\"ftqsxhqxujxuk\",\"type\":\"dxdigr\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.devCenters().listByResourceGroup("dhszfjv", 29574674, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nalghfkvtvsexso", response.iterator().next().location()); - Assertions.assertEquals("luqhhahhxv", response.iterator().next().tags().get("hmzk")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java deleted file mode 100644 index 0c06826b92d9f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"devCenterUri\":\"drhneuyow\"},\"identity\":{\"principalId\":\"eca40579-e706-4f65-8e7f-53286419c244\",\"tenantId\":\"fdbf0ee5-aa3b-4aad-ac54-e312fa057fd1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"ib\",\"tags\":{\"lfzxiavrmbzonoki\":\"gpikpzimejza\",\"rgz\":\"rjqc\"},\"id\":\"frl\",\"name\":\"zszrnwoiindfpw\",\"type\":\"jylwbtlhflsj\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.devCenters().list(1224801299, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ib", response.iterator().next().location()); - Assertions.assertEquals("gpikpzimejza", response.iterator().next().tags().get("lfzxiavrmbzonoki")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDependencyTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDependencyTests.java deleted file mode 100644 index b7be5959185c5..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDependencyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EndpointDependency; - -public final class EndpointDependencyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointDependency model = - BinaryData - .fromString( - "{\"domainName\":\"haq\",\"description\":\"ss\",\"endpointDetails\":[{\"port\":1174161651}]}") - .toObject(EndpointDependency.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDependency model = new EndpointDependency(); - model = BinaryData.fromObject(model).toObject(EndpointDependency.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDetailTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDetailTests.java deleted file mode 100644 index 3f52dade2a4b7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EndpointDetailTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EndpointDetail; - -public final class EndpointDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointDetail model = BinaryData.fromString("{\"port\":1781178234}").toObject(EndpointDetail.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDetail model = new EndpointDetail(); - model = BinaryData.fromObject(model).toObject(EndpointDetail.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java deleted file mode 100644 index 1e4e434d38a79..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; - -public final class EnvironmentRoleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentRole model = - BinaryData.fromString("{\"roleName\":\"z\",\"description\":\"zka\"}").toObject(EnvironmentRole.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentRole model = new EnvironmentRole(); - model = BinaryData.fromObject(model).toObject(EnvironmentRole.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java deleted file mode 100644 index 34ccf10cc6453..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentTypeInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentTypeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Created\"},\"tags\":{\"fmvfaxkffeiit\":\"leggzfbu\",\"ggi\":\"lvmezyvshxmzsbbz\",\"xxjnspydptk\":\"rxwburv\",\"iukbldngkpoci\":\"enkouknvudw\"},\"id\":\"z\",\"name\":\"xoegukgjnpiucgy\",\"type\":\"evqzntypmrbp\"}") - .toObject(EnvironmentTypeInner.class); - Assertions.assertEquals("leggzfbu", model.tags().get("fmvfaxkffeiit")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentTypeInner model = - new EnvironmentTypeInner() - .withTags( - mapOf( - "fmvfaxkffeiit", - "leggzfbu", - "ggi", - "lvmezyvshxmzsbbz", - "xxjnspydptk", - "rxwburv", - "iukbldngkpoci", - "enkouknvudw")); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeInner.class); - Assertions.assertEquals("leggzfbu", model.tags().get("fmvfaxkffeiit")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java deleted file mode 100644 index c9dccba70d917..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeListResult; - -public final class EnvironmentTypeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\"},\"tags\":{\"xbezyiuokktwh\":\"ozmyzydagfu\",\"o\":\"dxwzywqsmbsurexi\",\"fksymddystki\":\"yocf\",\"yudxorrqnbp\":\"uxh\"},\"id\":\"zvyifqrvkdvj\",\"name\":\"llr\",\"type\":\"vvdfwatkpnpul\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"tags\":{\"okacspk\":\"wtruwiqzbqjvsovm\",\"jmflbvvnch\":\"lhzdobp\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"},\"id\":\"xieduugidyjrr\",\"name\":\"byao\",\"type\":\"v\"}],\"nextLink\":\"csonpclhoco\"}") - .toObject(EnvironmentTypeListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentTypeListResult model = new EnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java deleted file mode 100644 index 4cc9982b262b9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentTypeProperties; - -public final class EnvironmentTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentTypeProperties model = - BinaryData.fromString("{\"provisioningState\":\"NotSpecified\"}").toObject(EnvironmentTypeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentTypeProperties model = new EnvironmentTypeProperties(); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java deleted file mode 100644 index 285e78c6c544b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentTypeUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentTypeUpdate model = - BinaryData - .fromString("{\"tags\":{\"jzicwifsjt\":\"qjsdpydnfyhxdeo\"}}") - .toObject(EnvironmentTypeUpdate.class); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.tags().get("jzicwifsjt")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentTypeUpdate model = new EnvironmentTypeUpdate().withTags(mapOf("jzicwifsjt", "qjsdpydnfyhxdeo")); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeUpdate.class); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.tags().get("jzicwifsjt")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 36a0e0c22b6fc..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"tags\":{\"ajlyjtlvofqzhv\":\"ogtqxepnylbf\",\"fmo\":\"cib\",\"dwxf\":\"uxrkjp\",\"rkambt\":\"wiivwzjbhyzsx\"},\"id\":\"egv\",\"name\":\"nvuqeqvldspa\",\"type\":\"tjb\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentType response = - manager - .environmentTypes() - .define("g") - .withExistingDevcenter("qbmfpjbabwidf", "xsspuunnoxyhk") - .withTags(mapOf("djvlpj", "pfhoqcaaewdao")) - .create(); - - Assertions.assertEquals("ogtqxepnylbf", response.tags().get("ajlyjtlvofqzhv")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java deleted file mode 100644 index b437700e68120..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 EnvironmentTypesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .environmentTypes() - .deleteWithResponse("hfuk", "vsjcswsmystuluqy", "fcvlerch", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index 3cca3a4fb4685..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Created\"},\"tags\":{\"ohpfkyrkdbdgiog\":\"udzpxgwjplmagstc\",\"nobaiyhddviacegf\":\"jkmnwq\",\"tfpmvmemfnczdw\":\"m\"},\"id\":\"b\",\"name\":\"lxlllchpo\",\"type\":\"bzevwrd\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentType response = - manager - .environmentTypes() - .getWithResponse("dabg", "vudtjuewbcihx", "uwhcjyxccybv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("udzpxgwjplmagstc", response.tags().get("ohpfkyrkdbdgiog")); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java deleted file mode 100644 index 2e48bb61f20c1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"tags\":{\"qqfkuv\":\"iopid\",\"rxkpmloazuruoc\":\"cxkdmligovi\"},\"id\":\"oorb\",\"name\":\"eoybfhjxakvvjgs\",\"type\":\"ordilmywwtkgkxny\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .environmentTypes() - .listByDevCenter("dzf", "azivjlfrqttbajl", 337338297, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("iopid", response.iterator().next().tags().get("qqfkuv")); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java deleted file mode 100644 index d4bb2658b7d66..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 GalleriesDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.galleries().delete("ostgkts", "vdxec", "zedqbcvhzlhplo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java deleted file mode 100644 index d225bb7f836e0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Gallery; -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 GalleriesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"StorageProvisioningFailed\",\"galleryResourceId\":\"kl\"},\"id\":\"pluodpv\",\"name\":\"uudl\",\"type\":\"zibt\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Gallery response = - manager.galleries().getWithResponse("n", "tbaxk", "xywr", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("kl", response.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java deleted file mode 100644 index 61e01bccf9c6f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Gallery; -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 GalleriesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"galleryResourceId\":\"zqljyxgtczh\"},\"id\":\"dbsdshm\",\"name\":\"xmaehvbbxu\",\"type\":\"iplt\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.galleries().listByDevCenter("p", "jpr", 967300246, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zqljyxgtczh", response.iterator().next().galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java deleted file mode 100644 index b4ffc9aa896fb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.GalleryInner; -import org.junit.jupiter.api.Assertions; - -public final class GalleryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"galleryResourceId\":\"hhbcsglummajtjao\"},\"id\":\"obnbdxkqpxokaj\",\"name\":\"onpimexgstxg\",\"type\":\"po\"}") - .toObject(GalleryInner.class); - Assertions.assertEquals("hhbcsglummajtjao", model.galleryResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryInner model = new GalleryInner().withGalleryResourceId("hhbcsglummajtjao"); - model = BinaryData.fromObject(model).toObject(GalleryInner.class); - Assertions.assertEquals("hhbcsglummajtjao", model.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java deleted file mode 100644 index b9c7b0c8c1a85..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.GalleryListResult; - -public final class GalleryListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"galleryResourceId\":\"rzafbljjgpbtoqcj\"},\"id\":\"ljavbqid\",\"name\":\"qajzyulpkudjkr\",\"type\":\"khbzhfepgzg\"}],\"nextLink\":\"xzlocxscp\"}") - .toObject(GalleryListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryListResult model = new GalleryListResult(); - model = BinaryData.fromObject(model).toObject(GalleryListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java deleted file mode 100644 index 61ce513ae8d6a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.GalleryProperties; -import org.junit.jupiter.api.Assertions; - -public final class GalleryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryProperties model = - BinaryData - .fromString("{\"provisioningState\":\"TransientFailure\",\"galleryResourceId\":\"aajrm\"}") - .toObject(GalleryProperties.class); - Assertions.assertEquals("aajrm", model.galleryResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryProperties model = new GalleryProperties().withGalleryResourceId("aajrm"); - model = BinaryData.fromObject(model).toObject(GalleryProperties.class); - Assertions.assertEquals("aajrm", model.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java deleted file mode 100644 index 2ea1df9f14c44..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsInner; - -public final class HealthCheckStatusDetailsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HealthCheckStatusDetailsInner model = - BinaryData - .fromString( - "{\"properties\":{\"startDateTime\":\"2021-08-12T03:11:36Z\",\"endDateTime\":\"2021-01-12T10:38:40Z\",\"healthChecks\":[{\"status\":\"Unknown\",\"displayName\":\"nfd\",\"startDateTime\":\"2021-05-20T03:58:49Z\",\"endDateTime\":\"2021-09-02T09:18:32Z\",\"errorType\":\"tdlmkkzevd\",\"recommendedAction\":\"ewpusdsttwvogvb\",\"additionalDetails\":\"jdcngqqm\"},{\"status\":\"Warning\",\"displayName\":\"fgmjzrwrdgrt\",\"startDateTime\":\"2021-08-17T18:50:12Z\",\"endDateTime\":\"2021-01-31T20:09:39Z\",\"errorType\":\"zkopb\",\"recommendedAction\":\"nrfdw\",\"additionalDetails\":\"uhhziuiefozbhdm\"},{\"status\":\"Running\",\"displayName\":\"zqhof\",\"startDateTime\":\"2021-05-05T04:42:21Z\",\"endDateTime\":\"2021-11-16T17:43:34Z\",\"errorType\":\"u\",\"recommendedAction\":\"hxicslfaoqz\",\"additionalDetails\":\"yylhalnswhccsp\"},{\"status\":\"Running\",\"displayName\":\"vwitqscyw\",\"startDateTime\":\"2021-08-25T09:04:10Z\",\"endDateTime\":\"2021-02-13T16:07:26Z\",\"errorType\":\"uhczbwemh\",\"recommendedAction\":\"rsbrgzdwm\",\"additionalDetails\":\"eypqwdxggicccn\"}]},\"id\":\"huexmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"}") - .toObject(HealthCheckStatusDetailsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HealthCheckStatusDetailsInner model = new HealthCheckStatusDetailsInner(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java deleted file mode 100644 index 8fff06183fc22..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetailsListResult; - -public final class HealthCheckStatusDetailsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HealthCheckStatusDetailsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"startDateTime\":\"2021-12-10T01:46:10Z\",\"endDateTime\":\"2021-11-22T00:26:44Z\",\"healthChecks\":[]},\"id\":\"bxarzgszufoxci\",\"name\":\"opidoamciodh\",\"type\":\"haz\"},{\"properties\":{\"startDateTime\":\"2021-11-22T06:47:21Z\",\"endDateTime\":\"2021-03-10T21:25:05Z\",\"healthChecks\":[]},\"id\":\"lwntoego\",\"name\":\"dwbwhkszzcmrvexz\",\"type\":\"vbtqgsfraoyzk\"},{\"properties\":{\"startDateTime\":\"2021-06-11T18:07:16Z\",\"endDateTime\":\"2021-01-01T04:06:13Z\",\"healthChecks\":[]},\"id\":\"ux\",\"name\":\"wqaldsyu\",\"type\":\"ximerqfobwyznk\"}],\"nextLink\":\"kutwpf\"}") - .toObject(HealthCheckStatusDetailsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HealthCheckStatusDetailsListResult model = new HealthCheckStatusDetailsListResult(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java deleted file mode 100644 index 88fd549a5bd57..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsProperties; - -public final class HealthCheckStatusDetailsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HealthCheckStatusDetailsProperties model = - BinaryData - .fromString( - "{\"startDateTime\":\"2021-07-01T02:09:13Z\",\"endDateTime\":\"2021-06-22T22:11:38Z\",\"healthChecks\":[{\"status\":\"Pending\",\"displayName\":\"gytguslfead\",\"startDateTime\":\"2021-10-11T19:56:34Z\",\"endDateTime\":\"2021-03-01T03:16:18Z\",\"errorType\":\"yhejhzisxgfp\",\"recommendedAction\":\"olppvksrpqvujz\",\"additionalDetails\":\"ehtwdwrft\"},{\"status\":\"Running\",\"displayName\":\"yrcdlbhshfwprac\",\"startDateTime\":\"2021-05-02T16:38:33Z\",\"endDateTime\":\"2021-05-07T13:40:48Z\",\"errorType\":\"khevxccedc\",\"recommendedAction\":\"md\",\"additionalDetails\":\"dnwzxltjcvnhltiu\"},{\"status\":\"Unknown\",\"displayName\":\"avvwxqi\",\"startDateTime\":\"2021-05-18T05:36:02Z\",\"endDateTime\":\"2021-07-30T07:40:44Z\",\"errorType\":\"owx\",\"recommendedAction\":\"mdjrkvfgbvfvp\",\"additionalDetails\":\"odacizs\"}]}") - .toObject(HealthCheckStatusDetailsProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HealthCheckStatusDetailsProperties model = new HealthCheckStatusDetailsProperties(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java deleted file mode 100644 index d5fa50aa8f98a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.HealthCheck; - -public final class HealthCheckTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HealthCheck model = - BinaryData - .fromString( - "{\"status\":\"Running\",\"displayName\":\"krribdeibqi\",\"startDateTime\":\"2021-08-10T16:45:38Z\",\"endDateTime\":\"2021-09-05T16:00:20Z\",\"errorType\":\"xndzwm\",\"recommendedAction\":\"efajpj\",\"additionalDetails\":\"wkqnyhg\"}") - .toObject(HealthCheck.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HealthCheck model = new HealthCheck(); - model = BinaryData.fromObject(model).toObject(HealthCheck.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java deleted file mode 100644 index b74106a3588cd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageInner; - -public final class ImageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"m\",\"publisher\":\"hrzayvvtpgvdf\",\"offer\":\"otkftutqxlngx\",\"sku\":\"fgugnxkrxdqmid\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"Created\",\"hibernateSupport\":\"Enabled\"},\"id\":\"abhjybi\",\"name\":\"ehoqfbowskan\",\"type\":\"ktzlcuiywg\"}") - .toObject(ImageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInner model = new ImageInner(); - model = BinaryData.fromObject(model).toObject(ImageInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java deleted file mode 100644 index 3421c6a921c08..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageListResult; - -public final class ImageListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"rlovmclwhijcoej\",\"publisher\":\"bzaqsqsycbkbfk\",\"offer\":\"kdkexxp\",\"sku\":\"fmxa\",\"provisioningState\":\"Creating\",\"hibernateSupport\":\"Disabled\"},\"id\":\"dtocj\",\"name\":\"xhvpmoue\",\"type\":\"hd\"},{\"properties\":{\"description\":\"bqe\",\"publisher\":\"nxqbzvddn\",\"offer\":\"ndei\",\"sku\":\"twnpzaoqvuhrhcf\",\"provisioningState\":\"Created\",\"hibernateSupport\":\"Disabled\"},\"id\":\"mjthjqkwp\",\"name\":\"eicxmqciwqvhkhi\",\"type\":\"uigdtopbobjog\"}],\"nextLink\":\"e\"}") - .toObject(ImageListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageListResult model = new ImageListResult(); - model = BinaryData.fromObject(model).toObject(ImageListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java deleted file mode 100644 index 844cdb8ca7db7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageProperties; - -public final class ImagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageProperties model = - BinaryData - .fromString( - "{\"description\":\"wgndrvynhzgpp\",\"publisher\":\"cgyncocpecf\",\"offer\":\"mcoo\",\"sku\":\"xlzevgbmqjqabcy\",\"recommendedMachineConfiguration\":{\"memory\":{\"min\":1275704162,\"max\":699585009},\"vCPUs\":{\"min\":1120920412,\"max\":211064208}},\"provisioningState\":\"Deleting\",\"hibernateSupport\":\"Disabled\"}") - .toObject(ImageProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageProperties model = new ImageProperties(); - model = BinaryData.fromObject(model).toObject(ImageProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java deleted file mode 100644 index f67471df3d95f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import org.junit.jupiter.api.Assertions; - -public final class ImageReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageReference model = - BinaryData - .fromString("{\"id\":\"ztfolhbnxk\",\"exactVersion\":\"laulppg\"}") - .toObject(ImageReference.class); - Assertions.assertEquals("ztfolhbnxk", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageReference model = new ImageReference().withId("ztfolhbnxk"); - model = BinaryData.fromObject(model).toObject(ImageReference.class); - Assertions.assertEquals("ztfolhbnxk", model.id()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java deleted file mode 100644 index e1700d5a77c7e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageVersionInner; - -public final class ImageVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"name\":\"e\",\"publishedDate\":\"2021-12-09T19:14:49Z\",\"excludeFromLatest\":false,\"osDiskImageSizeInGb\":514021855,\"provisioningState\":\"Failed\"},\"id\":\"dslfhotwmcy\",\"name\":\"pwlbjnpg\",\"type\":\"cftadeh\"}") - .toObject(ImageVersionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVersionInner model = new ImageVersionInner(); - model = BinaryData.fromObject(model).toObject(ImageVersionInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java deleted file mode 100644 index e35fc4b5820d6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageVersionListResult; - -public final class ImageVersionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVersionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"name\":\"xdpnqbqq\",\"publishedDate\":\"2021-06-06T00:18:07Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":1993000932,\"provisioningState\":\"Deleted\"},\"id\":\"sub\",\"name\":\"snjampmng\",\"type\":\"zscxaqwo\"},{\"properties\":{\"name\":\"cbonqvpk\",\"publishedDate\":\"2021-04-29T10:14:13Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":396203358,\"provisioningState\":\"Updating\"},\"id\":\"ipheoflokeyyien\",\"name\":\"bdlwtgrhpdjpj\",\"type\":\"masxazjpqyegu\"}],\"nextLink\":\"hb\"}") - .toObject(ImageVersionListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVersionListResult model = new ImageVersionListResult(); - model = BinaryData.fromObject(model).toObject(ImageVersionListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java deleted file mode 100644 index a4d436be6297b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageVersionProperties; - -public final class ImageVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVersionProperties model = - BinaryData - .fromString( - "{\"name\":\"ltyfsop\",\"publishedDate\":\"2021-06-11T02:49:44Z\",\"excludeFromLatest\":false,\"osDiskImageSizeInGb\":2130063245,\"provisioningState\":\"Accepted\"}") - .toObject(ImageVersionProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVersionProperties model = new ImageVersionProperties(); - model = BinaryData.fromObject(model).toObject(ImageVersionProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java deleted file mode 100644 index b902b9dae8ea3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.ImageVersion; -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 ImageVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"name\":\"wdxsm\",\"publishedDate\":\"2021-01-12T14:00:36Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":1445033324,\"provisioningState\":\"Accepted\"},\"id\":\"fnynszqujizdvoqy\",\"name\":\"ibyowbblgyavutp\",\"type\":\"hjoxo\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ImageVersion response = - manager - .imageVersions() - .getWithResponse("qonmacj", "k", "izsh", "vcimpev", "gmblrri", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java deleted file mode 100644 index 6990322a0c3b0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.ImageVersion; -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 ImageVersionsListByImageMockTests { - @Test - public void testListByImage() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"name\":\"sivfomilo\",\"publishedDate\":\"2021-10-29T08:24:04Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":1002806414,\"provisioningState\":\"Succeeded\"},\"id\":\"ieuzaofjchvcyyy\",\"name\":\"fgdo\",\"type\":\"cubiipuipw\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .imageVersions() - .listByImage( - "nuuepzlrp", "wzsoldweyuqdunv", "nnrwrbiork", "alywjhhgdn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java deleted file mode 100644 index a29c31a771350..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"description\":\"uo\",\"publisher\":\"inyflnorwmduvwp\",\"offer\":\"vxwmygd\",\"sku\":\"gpqch\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"Creating\",\"hibernateSupport\":\"Enabled\"},\"id\":\"crxgibb\",\"name\":\"axconfozauo\",\"type\":\"sukokwbqplhl\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Image response = - manager - .images() - .getWithResponse("neekulfg", "lqubkwdlen", "d", "utujba", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java deleted file mode 100644 index 531fc0893306c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"btx\",\"publisher\":\"gfwsrtaw\",\"offer\":\"ezbrhubskh\",\"sku\":\"ygo\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"Deleting\",\"hibernateSupport\":\"Disabled\"},\"id\":\"vleo\",\"name\":\"fmluiqtqzfavyvn\",\"type\":\"qybaryeua\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.images().listByDevCenter("qkdlw", "qfbumlkxtrqjf", 1704279837, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java deleted file mode 100644 index e1e71d03073c3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesListByGalleryMockTests { - @Test - public void testListByGallery() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"uwrbehwagoh\",\"publisher\":\"f\",\"offer\":\"mrqemvvhmx\",\"sku\":\"rjfut\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"MovingResources\",\"hibernateSupport\":\"Enabled\"},\"id\":\"zcjznmwcpmgua\",\"name\":\"draufactkah\",\"type\":\"ovajjziuxxps\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .images() - .listByGallery("jkqa", "qgzsles", "cbhernntiewdj", 1433935156, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java deleted file mode 100644 index 8aab50cfad8c9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ListUsagesResult; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = - BinaryData - .fromString( - "{\"value\":[{\"currentValue\":5460739394049509501,\"limit\":8841790636704603719,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"wqapnedgfbcvk\",\"value\":\"q\"}},{\"currentValue\":6395460850482092633,\"limit\":4392400281438783051,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"vo\",\"value\":\"sotbob\"}}],\"nextLink\":\"opcjwvnhd\"}") - .toObject(ListUsagesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 2a205c07c2755..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"38fe5e5a-a385-48dc-9ab2-d26562a48c3d\",\"tenantId\":\"95a573a6-6a40-4d24-a987-c3ea93ad172f\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"zw\":{\"principalId\":\"da1be182-6b50-484b-a611-67ff323ac362\",\"clientId\":\"deba3b38-3bdb-4d98-9ce0-8b0a1848c304\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("zw", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java deleted file mode 100644 index c02dfe75d994f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 NetworkConnectionsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkConnections().delete("drkywuhps", "fuurutlwexx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java deleted file mode 100644 index 068f45e697186..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetails; -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 NetworkConnectionsGetHealthDetailsWithResponseMockTests { - @Test - public void testGetHealthDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"startDateTime\":\"2021-11-18T23:48:24Z\",\"endDateTime\":\"2021-01-08T05:35:46Z\",\"healthChecks\":[]},\"id\":\"hlctddunqn\",\"name\":\"yfp\",\"type\":\"hrqbnjjrcg\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HealthCheckStatusDetails response = - manager - .networkConnections() - .getHealthDetailsWithResponse("ttexoqqpwcyyufmh", "uncuw", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java deleted file mode 100644 index e5f110cf55217..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetails; -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 NetworkConnectionsListHealthDetailsMockTests { - @Test - public void testListHealthDetails() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"startDateTime\":\"2021-11-07T11:22:10Z\",\"endDateTime\":\"2021-03-07T02:03:14Z\",\"healthChecks\":[]},\"id\":\"lixqnrkcxkjibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .networkConnections() - .listHealthDetails("lalniex", "srzpgepqtybbww", 1790855590, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsMockTests.java deleted file mode 100644 index 5f8cead2f7836..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.OutboundEnvironmentEndpoint; -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 NetworkConnectionsListOutboundNetworkDependenciesEndpointsMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpoints() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"category\":\"uojrngiflr\",\"endpoints\":[{\"domainName\":\"ccbiuimzdlyjdfq\",\"description\":\"kyoqufdv\",\"endpointDetails\":[]},{\"domainName\":\"lzo\",\"description\":\"pctf\",\"endpointDetails\":[]}]}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .networkConnections() - .listOutboundNetworkDependenciesEndpoints( - "ihrraiouaub", "jtlo", 1702747573, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java deleted file mode 100644 index ef09dd49c30c0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 NetworkConnectionsRunHealthChecksMockTests { - @Test - public void testRunHealthChecks() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkConnections().runHealthChecks("gydcw", "oxjumvqqo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java deleted file mode 100644 index 54a643773133f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"swiydmcwyhzdx\",\"resource\":\"adbzmnvdfznud\",\"operation\":\"dvxzbncblylpst\",\"description\":\"hh\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java deleted file mode 100644 index 52034dce1c1b7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.OperationInner; -import com.azure.resourcemanager.devcenter.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"igynduhavhqlk\",\"isDataAction\":false,\"display\":{\"provider\":\"qolbgyc\",\"resource\":\"iertgccymvaolp\",\"operation\":\"lqlfm\",\"description\":\"n\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java deleted file mode 100644 index dbf7fbff6bad8..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"hxcr\",\"isDataAction\":false,\"display\":{\"provider\":\"asrru\",\"resource\":\"bhsqfsubcgjbirxb\",\"operation\":\"bsrfbj\",\"description\":\"twss\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"jzbexilzznfq\",\"isDataAction\":false,\"display\":{\"provider\":\"mqtaruoujmkcjh\",\"resource\":\"ytjrybnwjewgdr\",\"operation\":\"rvnaenqpeh\",\"description\":\"doy\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"nzdndslgna\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java deleted file mode 100644 index 93d5bd38e583e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.OperationStatusInner; -import com.azure.resourcemanager.devcenter.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationStatusInner model = - BinaryData - .fromString( - "{\"resourceId\":\"rzdzucerscdnt\",\"properties\":\"datavfiwjmygtdss\",\"id\":\"wtmwerio\",\"name\":\"pyqs\",\"status\":\"mwabnetshhszhedp\",\"percentComplete\":32.709515,\"startTime\":\"2021-09-12T04:45:44Z\",\"endTime\":\"2021-11-02T03:10:18Z\",\"operations\":[{\"id\":\"besldnkwwtppjflc\",\"name\":\"gaokonzmnsikv\",\"status\":\"kqze\",\"percentComplete\":76.51815,\"startTime\":\"2021-10-18T16:10:37Z\",\"endTime\":\"2021-09-09T14:39:27Z\",\"operations\":[]},{\"id\":\"hvhgureod\",\"name\":\"obdagxtibqdxb\",\"status\":\"wakbogqxndl\",\"percentComplete\":56.968266,\"startTime\":\"2021-03-10T22:50:11Z\",\"endTime\":\"2021-10-18T16:27:54Z\",\"operations\":[]},{\"id\":\"podxunkb\",\"name\":\"xmubyyntwlrbq\",\"status\":\"koievseo\",\"percentComplete\":3.3486485,\"startTime\":\"2021-05-15T11:53:23Z\",\"endTime\":\"2021-06-26T20:58:29Z\",\"operations\":[]}]}") - .toObject(OperationStatusInner.class); - Assertions.assertEquals("wtmwerio", model.id()); - Assertions.assertEquals("pyqs", model.name()); - Assertions.assertEquals("mwabnetshhszhedp", model.status()); - Assertions.assertEquals(32.709515F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T04:45:44Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T03:10:18Z"), model.endTime()); - Assertions.assertEquals("besldnkwwtppjflc", model.operations().get(0).id()); - Assertions.assertEquals("gaokonzmnsikv", model.operations().get(0).name()); - Assertions.assertEquals("kqze", model.operations().get(0).status()); - Assertions.assertEquals(76.51815F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T16:10:37Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T14:39:27Z"), model.operations().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusInner model = - new OperationStatusInner() - .withId("wtmwerio") - .withName("pyqs") - .withStatus("mwabnetshhszhedp") - .withPercentComplete(32.709515F) - .withStartTime(OffsetDateTime.parse("2021-09-12T04:45:44Z")) - .withEndTime(OffsetDateTime.parse("2021-11-02T03:10:18Z")) - .withOperations( - Arrays - .asList( - new OperationStatusResult() - .withId("besldnkwwtppjflc") - .withName("gaokonzmnsikv") - .withStatus("kqze") - .withPercentComplete(76.51815F) - .withStartTime(OffsetDateTime.parse("2021-10-18T16:10:37Z")) - .withEndTime(OffsetDateTime.parse("2021-09-09T14:39:27Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("hvhgureod") - .withName("obdagxtibqdxb") - .withStatus("wakbogqxndl") - .withPercentComplete(56.968266F) - .withStartTime(OffsetDateTime.parse("2021-03-10T22:50:11Z")) - .withEndTime(OffsetDateTime.parse("2021-10-18T16:27:54Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("podxunkb") - .withName("xmubyyntwlrbq") - .withStatus("koievseo") - .withPercentComplete(3.3486485F) - .withStartTime(OffsetDateTime.parse("2021-05-15T11:53:23Z")) - .withEndTime(OffsetDateTime.parse("2021-06-26T20:58:29Z")) - .withOperations(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationStatusInner.class); - Assertions.assertEquals("wtmwerio", model.id()); - Assertions.assertEquals("pyqs", model.name()); - Assertions.assertEquals("mwabnetshhszhedp", model.status()); - Assertions.assertEquals(32.709515F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T04:45:44Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T03:10:18Z"), model.endTime()); - Assertions.assertEquals("besldnkwwtppjflc", model.operations().get(0).id()); - Assertions.assertEquals("gaokonzmnsikv", model.operations().get(0).name()); - Assertions.assertEquals("kqze", model.operations().get(0).status()); - Assertions.assertEquals(76.51815F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T16:10:37Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T14:39:27Z"), model.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java deleted file mode 100644 index b6ba6e05b5002..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationStatusResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationStatusResult model = - BinaryData - .fromString( - "{\"id\":\"uwz\",\"name\":\"xbmp\",\"status\":\"cjefuzmu\",\"percentComplete\":73.7088,\"startTime\":\"2021-05-23T17:52:43Z\",\"endTime\":\"2021-04-26T02:21:23Z\",\"operations\":[{\"id\":\"p\",\"name\":\"ebmnzbtbhjpglk\",\"status\":\"gohdneuelfphsd\",\"percentComplete\":1.3561428,\"startTime\":\"2021-01-12T01:21:46Z\",\"endTime\":\"2021-12-10T07:50:41Z\",\"operations\":[]},{\"id\":\"wq\",\"name\":\"v\",\"status\":\"zx\",\"percentComplete\":30.199152,\"startTime\":\"2021-10-23T21:40:50Z\",\"endTime\":\"2021-09-22T18:34:57Z\",\"operations\":[]},{\"id\":\"osggbhc\",\"name\":\"fwdsj\",\"status\":\"ka\",\"percentComplete\":55.007015,\"startTime\":\"2021-03-15T03:19:59Z\",\"endTime\":\"2021-08-17T16:46:36Z\",\"operations\":[]},{\"id\":\"fgdkzzew\",\"name\":\"vhqcrail\",\"status\":\"pnppfuf\",\"percentComplete\":70.69832,\"startTime\":\"2021-05-23T16:48:47Z\",\"endTime\":\"2021-03-11T09:23:13Z\",\"operations\":[]}]}") - .toObject(OperationStatusResult.class); - Assertions.assertEquals("uwz", model.id()); - Assertions.assertEquals("xbmp", model.name()); - Assertions.assertEquals("cjefuzmu", model.status()); - Assertions.assertEquals(73.7088F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T17:52:43Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T02:21:23Z"), model.endTime()); - Assertions.assertEquals("p", model.operations().get(0).id()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.operations().get(0).name()); - Assertions.assertEquals("gohdneuelfphsd", model.operations().get(0).status()); - Assertions.assertEquals(1.3561428F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T01:21:46Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-10T07:50:41Z"), model.operations().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusResult model = - new OperationStatusResult() - .withId("uwz") - .withName("xbmp") - .withStatus("cjefuzmu") - .withPercentComplete(73.7088F) - .withStartTime(OffsetDateTime.parse("2021-05-23T17:52:43Z")) - .withEndTime(OffsetDateTime.parse("2021-04-26T02:21:23Z")) - .withOperations( - Arrays - .asList( - new OperationStatusResult() - .withId("p") - .withName("ebmnzbtbhjpglk") - .withStatus("gohdneuelfphsd") - .withPercentComplete(1.3561428F) - .withStartTime(OffsetDateTime.parse("2021-01-12T01:21:46Z")) - .withEndTime(OffsetDateTime.parse("2021-12-10T07:50:41Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("wq") - .withName("v") - .withStatus("zx") - .withPercentComplete(30.199152F) - .withStartTime(OffsetDateTime.parse("2021-10-23T21:40:50Z")) - .withEndTime(OffsetDateTime.parse("2021-09-22T18:34:57Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("osggbhc") - .withName("fwdsj") - .withStatus("ka") - .withPercentComplete(55.007015F) - .withStartTime(OffsetDateTime.parse("2021-03-15T03:19:59Z")) - .withEndTime(OffsetDateTime.parse("2021-08-17T16:46:36Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("fgdkzzew") - .withName("vhqcrail") - .withStatus("pnppfuf") - .withPercentComplete(70.69832F) - .withStartTime(OffsetDateTime.parse("2021-05-23T16:48:47Z")) - .withEndTime(OffsetDateTime.parse("2021-03-11T09:23:13Z")) - .withOperations(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationStatusResult.class); - Assertions.assertEquals("uwz", model.id()); - Assertions.assertEquals("xbmp", model.name()); - Assertions.assertEquals("cjefuzmu", model.status()); - Assertions.assertEquals(73.7088F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T17:52:43Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T02:21:23Z"), model.endTime()); - Assertions.assertEquals("p", model.operations().get(0).id()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.operations().get(0).name()); - Assertions.assertEquals("gohdneuelfphsd", model.operations().get(0).status()); - Assertions.assertEquals(1.3561428F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T01:21:46Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-10T07:50:41Z"), model.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java deleted file mode 100644 index fa41998c38238..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.OperationStatus; -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 OperationStatusesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"resourceId\":\"swpchwahfbousn\",\"properties\":\"datapgfewetwlyx\",\"id\":\"cxy\",\"name\":\"hdjhlimmbcx\",\"status\":\"h\",\"percentComplete\":7.7078342,\"startTime\":\"2021-08-24T02:48:56Z\",\"endTime\":\"2021-10-20T00:41:29Z\",\"operations\":[{\"id\":\"zhqizxf\",\"name\":\"tgqscjavftjuh\",\"status\":\"qaz\",\"percentComplete\":94.31064,\"startTime\":\"2021-04-10T06:17:10Z\",\"endTime\":\"2021-04-29T03:21:08Z\",\"operations\":[]},{\"id\":\"ajc\",\"name\":\"m\",\"status\":\"ghfcfiwrxgkneuvy\",\"percentComplete\":68.88862,\"startTime\":\"2020-12-31T19:00:58Z\",\"endTime\":\"2021-01-06T09:47:23Z\",\"operations\":[]}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationStatus response = - manager.operationStatuses().getWithResponse("wwnpj", "l", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("cxy", response.id()); - Assertions.assertEquals("hdjhlimmbcx", response.name()); - Assertions.assertEquals("h", response.status()); - Assertions.assertEquals(7.7078342F, response.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T02:48:56Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T00:41:29Z"), response.endTime()); - Assertions.assertEquals("zhqizxf", response.operations().get(0).id()); - Assertions.assertEquals("tgqscjavftjuh", response.operations().get(0).name()); - Assertions.assertEquals("qaz", response.operations().get(0).status()); - Assertions.assertEquals(94.31064F, response.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T06:17:10Z"), response.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T03:21:08Z"), response.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java deleted file mode 100644 index 9159cf4433dfe..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Operation; -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 OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"hujswtwkozzwcul\",\"isDataAction\":true,\"display\":{\"provider\":\"fajnjwltlwtjjguk\",\"resource\":\"lhsnvkcdmx\",\"operation\":\"poaimlnwiaaomyl\",\"description\":\"azul\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointCollectionTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointCollectionTests.java deleted file mode 100644 index 701fcc4e15488..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointCollectionTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OutboundEnvironmentEndpointCollection; -import org.junit.jupiter.api.Assertions; - -public final class OutboundEnvironmentEndpointCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundEnvironmentEndpointCollection model = - BinaryData - .fromString( - "{\"value\":[{\"category\":\"jivfxzsjabib\",\"endpoints\":[]}],\"nextLink\":\"awfsdjpvkvpbjxbk\"}") - .toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("awfsdjpvkvpbjxbk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundEnvironmentEndpointCollection model = - new OutboundEnvironmentEndpointCollection().withNextLink("awfsdjpvkvpbjxbk"); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("awfsdjpvkvpbjxbk", model.nextLink()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointInnerTests.java deleted file mode 100644 index c93935d0abda1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OutboundEnvironmentEndpointInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; - -public final class OutboundEnvironmentEndpointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundEnvironmentEndpointInner model = - BinaryData - .fromString( - "{\"category\":\"zkdvncja\",\"endpoints\":[{\"domainName\":\"r\",\"description\":\"akmokzhjjklf\",\"endpointDetails\":[]},{\"domainName\":\"uwqlgzrfzeey\",\"description\":\"izikayuhq\",\"endpointDetails\":[]},{\"domainName\":\"sybbqwr\",\"description\":\"ldgmfpgvmpip\",\"endpointDetails\":[]}]}") - .toObject(OutboundEnvironmentEndpointInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundEnvironmentEndpointInner model = new OutboundEnvironmentEndpointInner(); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java deleted file mode 100644 index fcfe2acceb59d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.PoolListResult; - -public final class PoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"healthStatus\":\"Healthy\",\"healthStatusDetails\":[],\"provisioningState\":\"Deleting\",\"devBoxDefinitionName\":\"swsrms\",\"networkConnectionName\":\"zrpzb\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\"},\"location\":\"qioxi\",\"tags\":{\"mibzyhwitsmypyyn\":\"iizynkedyatrwyh\",\"nzgmwznmabik\":\"cdpu\"},\"id\":\"sorgj\",\"name\":\"xbldtlwwrlkdmtn\",\"type\":\"vokotllxdyh\"},{\"properties\":{\"healthStatus\":\"Unknown\",\"healthStatusDetails\":[],\"provisioningState\":\"MovingResources\",\"devBoxDefinitionName\":\"ltdtbnnhad\",\"networkConnectionName\":\"crkvcikhnv\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\"},\"location\":\"queziky\",\"tags\":{\"melwuipiccjz\":\"xkalla\"},\"id\":\"z\",\"name\":\"v\",\"type\":\"vvcnayr\"},{\"properties\":{\"healthStatus\":\"Unknown\",\"healthStatusDetails\":[],\"provisioningState\":\"MovingResources\",\"devBoxDefinitionName\":\"eedndrdvstkwqqtc\",\"networkConnectionName\":\"alm\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"},\"location\":\"gdv\",\"tags\":{\"xepxgyqagvrvmn\":\"piohgwxrtfu\",\"kghimdblxgwimfnj\":\"k\",\"kfoqreyfkzikfj\":\"fjxwmsz\",\"wczelpci\":\"wneaiv\"},\"id\":\"elsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}],\"nextLink\":\"ph\"}") - .toObject(PoolListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolListResult model = new PoolListResult(); - model = BinaryData.fromObject(model).toObject(PoolListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java deleted file mode 100644 index b33d28098cc37..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.PoolUpdateProperties; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -import org.junit.jupiter.api.Assertions; - -public final class PoolUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolUpdateProperties model = - BinaryData - .fromString( - "{\"devBoxDefinitionName\":\"cktqumiekkezzi\",\"networkConnectionName\":\"ly\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\",\"stopOnDisconnect\":{\"status\":\"Disabled\",\"gracePeriodMinutes\":558583308}}") - .toObject(PoolUpdateProperties.class); - Assertions.assertEquals("cktqumiekkezzi", model.devBoxDefinitionName()); - Assertions.assertEquals("ly", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.ENABLED, model.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.stopOnDisconnect().status()); - Assertions.assertEquals(558583308, model.stopOnDisconnect().gracePeriodMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolUpdateProperties model = - new PoolUpdateProperties() - .withDevBoxDefinitionName("cktqumiekkezzi") - .withNetworkConnectionName("ly") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.ENABLED) - .withStopOnDisconnect( - new StopOnDisconnectConfiguration() - .withStatus(StopOnDisconnectEnableStatus.DISABLED) - .withGracePeriodMinutes(558583308)); - model = BinaryData.fromObject(model).toObject(PoolUpdateProperties.class); - Assertions.assertEquals("cktqumiekkezzi", model.devBoxDefinitionName()); - Assertions.assertEquals("ly", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.ENABLED, model.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.stopOnDisconnect().status()); - Assertions.assertEquals(558583308, model.stopOnDisconnect().gracePeriodMinutes()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java deleted file mode 100644 index 3c4ff1c36247a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.PoolUpdate; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PoolUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"devBoxDefinitionName\":\"eqidbqfatpx\",\"networkConnectionName\":\"rxcyjmoad\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\",\"stopOnDisconnect\":{\"status\":\"Disabled\",\"gracePeriodMinutes\":1450729079}},\"tags\":{\"xrwlyc\":\"jqbjhhy\",\"kgymareqnajxqug\":\"duhpk\",\"ubeddg\":\"hky\"},\"location\":\"ofwq\"}") - .toObject(PoolUpdate.class); - Assertions.assertEquals("jqbjhhy", model.tags().get("xrwlyc")); - Assertions.assertEquals("ofwq", model.location()); - Assertions.assertEquals("eqidbqfatpx", model.devBoxDefinitionName()); - Assertions.assertEquals("rxcyjmoad", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.stopOnDisconnect().status()); - Assertions.assertEquals(1450729079, model.stopOnDisconnect().gracePeriodMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolUpdate model = - new PoolUpdate() - .withTags(mapOf("xrwlyc", "jqbjhhy", "kgymareqnajxqug", "duhpk", "ubeddg", "hky")) - .withLocation("ofwq") - .withDevBoxDefinitionName("eqidbqfatpx") - .withNetworkConnectionName("rxcyjmoad") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED) - .withStopOnDisconnect( - new StopOnDisconnectConfiguration() - .withStatus(StopOnDisconnectEnableStatus.DISABLED) - .withGracePeriodMinutes(1450729079)); - model = BinaryData.fromObject(model).toObject(PoolUpdate.class); - Assertions.assertEquals("jqbjhhy", model.tags().get("xrwlyc")); - Assertions.assertEquals("ofwq", model.location()); - Assertions.assertEquals("eqidbqfatpx", model.devBoxDefinitionName()); - Assertions.assertEquals("rxcyjmoad", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.stopOnDisconnect().status()); - Assertions.assertEquals(1450729079, model.stopOnDisconnect().gracePeriodMinutes()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 353c1d92aadba..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -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 PoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"healthStatus\":\"Warning\",\"healthStatusDetails\":[],\"provisioningState\":\"Succeeded\",\"devBoxDefinitionName\":\"ytnrzvuljraae\",\"networkConnectionName\":\"nok\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\",\"stopOnDisconnect\":{\"status\":\"Disabled\",\"gracePeriodMinutes\":1534220522}},\"location\":\"oylaxxul\",\"tags\":{\"hryvy\":\"sdosfjbjsvgjr\",\"xgccknfnw\":\"ytdc\"},\"id\":\"btmvpdvjdhttza\",\"name\":\"fedxihchrphkm\",\"type\":\"rjdqnsdfzp\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager - .pools() - .define("wprtu") - .withRegion("tgsfja") - .withExistingProject("cuijpxt", "s") - .withTags(mapOf("ud", "lhhxudbxvodhtnsi", "mes", "z", "zrcxfailcfxwmdbo", "kdlpa")) - .withDevBoxDefinitionName("babxvitit") - .withNetworkConnectionName("zeexavoxtfgle") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED) - .withStopOnDisconnect( - new StopOnDisconnectConfiguration() - .withStatus(StopOnDisconnectEnableStatus.DISABLED) - .withGracePeriodMinutes(181668941)) - .create(); - - Assertions.assertEquals("oylaxxul", response.location()); - Assertions.assertEquals("sdosfjbjsvgjr", response.tags().get("hryvy")); - Assertions.assertEquals("ytnrzvuljraae", response.devBoxDefinitionName()); - Assertions.assertEquals("nok", response.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, response.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, response.stopOnDisconnect().status()); - Assertions.assertEquals(1534220522, response.stopOnDisconnect().gracePeriodMinutes()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java deleted file mode 100644 index 7151d2c2baecb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 PoolsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.pools().delete("iymerteeammxqi", "kk", "zddrt", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java deleted file mode 100644 index 7ed76f09a15b1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -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 PoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"healthStatus\":\"Pending\",\"healthStatusDetails\":[],\"provisioningState\":\"RolloutInProgress\",\"devBoxDefinitionName\":\"zkgimsid\",\"networkConnectionName\":\"sicddyvv\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\",\"stopOnDisconnect\":{\"status\":\"Enabled\",\"gracePeriodMinutes\":465426304}},\"location\":\"pqg\",\"tags\":{\"kzyb\":\"eaahhvjhhn\",\"yxkyxvx\":\"jjidjk\",\"lxunsmjbnkppxy\":\"vblbjednljlageua\"},\"id\":\"enlsvxeizzgwkln\",\"name\":\"rmffeyc\",\"type\":\"ckt\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager - .pools() - .getWithResponse("hlwigdivbkbxg", "mf", "juwasqvdaeyyguxa", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pqg", response.location()); - Assertions.assertEquals("eaahhvjhhn", response.tags().get("kzyb")); - Assertions.assertEquals("zkgimsid", response.devBoxDefinitionName()); - Assertions.assertEquals("sicddyvv", response.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.licenseType()); - Assertions.assertEquals(LocalAdminStatus.ENABLED, response.localAdministrator()); - Assertions.assertEquals(StopOnDisconnectEnableStatus.ENABLED, response.stopOnDisconnect().status()); - Assertions.assertEquals(465426304, response.stopOnDisconnect().gracePeriodMinutes()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java deleted file mode 100644 index 1c1d8de9e972a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -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 PoolsListByProjectMockTests { - @Test - public void testListByProject() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"healthStatus\":\"Pending\",\"healthStatusDetails\":[],\"provisioningState\":\"Deleting\",\"devBoxDefinitionName\":\"clrcivtsox\",\"networkConnectionName\":\"kenx\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\",\"stopOnDisconnect\":{\"status\":\"Enabled\",\"gracePeriodMinutes\":2052756160}},\"location\":\"nqqs\",\"tags\":{\"vmm\":\"ao\",\"itgvkx\":\"npqfrtqlkzmeg\"},\"id\":\"zyqdrfegcealzx\",\"name\":\"hcans\",\"type\":\"moy\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.pools().listByProject("wivkxo", "zunbixx", 535878702, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nqqs", response.iterator().next().location()); - Assertions.assertEquals("ao", response.iterator().next().tags().get("vmm")); - Assertions.assertEquals("clrcivtsox", response.iterator().next().devBoxDefinitionName()); - Assertions.assertEquals("kenx", response.iterator().next().networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.iterator().next().licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, response.iterator().next().localAdministrator()); - Assertions - .assertEquals(StopOnDisconnectEnableStatus.ENABLED, response.iterator().next().stopOnDisconnect().status()); - Assertions.assertEquals(2052756160, response.iterator().next().stopOnDisconnect().gracePeriodMinutes()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksMockTests.java deleted file mode 100644 index 2d3c4a38da6a9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 PoolsRunHealthChecksMockTests { - @Test - public void testRunHealthChecks() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.pools().runHealthChecks("g", "ojbmxv", "vrefdeesv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index 1b80ae61d5d99..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentType; -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 ProjectAllowedEnvironmentTypesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"vqeevtoep\",\"name\":\"yutnwytpzdmov\",\"type\":\"vf\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AllowedEnvironmentType response = - manager - .projectAllowedEnvironmentTypes() - .getWithResponse("yhjtqedcgzu", "wmmrq", "zrrjvpgly", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java deleted file mode 100644 index c0c2fffb9b3c3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentType; -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 ProjectAllowedEnvironmentTypesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"wchpxlk\",\"name\":\"wk\",\"type\":\"ziycslevufuztck\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .projectAllowedEnvironmentTypes() - .list("kdmflvestmjlx", "ril", 444057541, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java deleted file mode 100644 index 24cd4fead228b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeInner; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectEnvironmentTypeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentTargetId\":\"thsu\",\"status\":\"Disabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{\"t\":{\"roles\":{}}}},\"tags\":{\"uedck\":\"wwrq\",\"bxu\":\"ywbiexzfeyueax\"},\"identity\":{\"principalId\":\"a508fc41-2148-410f-ba27-9b28fea1002e\",\"tenantId\":\"b46512f0-69d6-4582-bb6d-1d890e957d6d\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"uzyoxaep\":{\"principalId\":\"b9f7a1ed-5323-4098-bf78-2acf0bdd171c\",\"clientId\":\"139c77d6-1f21-4d68-8d6e-d769fa2f8d04\"},\"jancu\":{\"principalId\":\"6d367958-49f9-4d20-b60c-2f5db8cde7d1\",\"clientId\":\"386be3e8-fcde-4b11-9de1-6efd258c0332\"},\"d\":{\"principalId\":\"2cda805c-eaf9-4156-9f53-051d3e0ca2ef\",\"clientId\":\"88c35054-8927-4b4d-9a31-660177881541\"},\"v\":{\"principalId\":\"fe26f006-828c-463e-b701-d93d3b6a35a4\",\"clientId\":\"ef8fcde0-22f0-4ad5-8c4b-b8a4b09f35a5\"}}},\"location\":\"niwdjsw\",\"id\":\"s\",\"name\":\"bpg\",\"type\":\"xytxhpzxbz\"}") - .toObject(ProjectEnvironmentTypeInner.class); - Assertions.assertEquals("wwrq", model.tags().get("uedck")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("niwdjsw", model.location()); - Assertions.assertEquals("thsu", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeInner model = - new ProjectEnvironmentTypeInner() - .withTags(mapOf("uedck", "wwrq", "bxu", "ywbiexzfeyueax")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "uzyoxaep", - new UserAssignedIdentity(), - "jancu", - new UserAssignedIdentity(), - "d", - new UserAssignedIdentity(), - "v", - new UserAssignedIdentity()))) - .withLocation("niwdjsw") - .withDeploymentTargetId("thsu") - .withStatus(EnvironmentTypeEnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments(mapOf("t", new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeInner.class); - Assertions.assertEquals("wwrq", model.tags().get("uedck")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("niwdjsw", model.location()); - Assertions.assertEquals("thsu", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.DISABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java deleted file mode 100644 index 5d76cd7437706..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeListResult; - -public final class ProjectEnvironmentTypeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"deploymentTargetId\":\"fkbey\",\"status\":\"Disabled\",\"userRoleAssignments\":{}},\"tags\":{\"jektcxsenh\":\"wv\",\"rzpwvlqdqgbiq\":\"lrsf\",\"vf\":\"lihkaetcktvfc\",\"xerf\":\"nkymuctqhjfbebrj\"},\"identity\":{\"principalId\":\"79044b94-1fc7-4fa6-bd54-7365aa8307a9\",\"tenantId\":\"6503dbf2-1c28-4fa5-90a8-c70cc9b27e3a\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"fvjrbirphxepcy\",\"id\":\"hfnljkyq\",\"name\":\"j\",\"type\":\"uujqgidokgjljyo\"},{\"properties\":{\"provisioningState\":\"RolloutInProgress\",\"deploymentTargetId\":\"tbgsncghkj\",\"status\":\"Enabled\",\"userRoleAssignments\":{}},\"tags\":{\"mpvecxgodebfqk\":\"jhtxfvgxbfsmxne\",\"flz\":\"rbmpukgri\"},\"identity\":{\"principalId\":\"e8810a7b-c439-4189-8aa7-830378c0ea7e\",\"tenantId\":\"067bce9e-5709-4714-b336-fcf2c3bd6cca\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"zycispn\",\"id\":\"ahmgkbrp\",\"name\":\"y\",\"type\":\"hibnuqqkpika\"},{\"properties\":{\"provisioningState\":\"Running\",\"deploymentTargetId\":\"qagnbuyn\",\"status\":\"Disabled\",\"userRoleAssignments\":{}},\"tags\":{\"arbu\":\"bfs\"},\"identity\":{\"principalId\":\"06425e45-8270-4590-9be0-40235ec07ed5\",\"tenantId\":\"452c69b0-a45e-408a-b406-4754e61ccf1a\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"zzmhjrunmpxttd\",\"id\":\"rbnlankxmyskp\",\"name\":\"henbtkcxywnytn\",\"type\":\"synlqidybyxczfc\"}],\"nextLink\":\"aaxdbabphlwrq\"}") - .toObject(ProjectEnvironmentTypeListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeListResult model = new ProjectEnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java deleted file mode 100644 index f611fee03803c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeProperties; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectEnvironmentTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"deploymentTargetId\":\"b\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{\"vplwzbhv\":{\"roleName\":\"tcty\",\"description\":\"klbb\"},\"ss\":{\"roleName\":\"u\",\"description\":\"osvmk\"},\"deslp\":{\"roleName\":\"ukkfplgmgs\",\"description\":\"kjz\"},\"baiuebbaumny\":{\"roleName\":\"opwi\",\"description\":\"ghxpkdw\"}}},\"userRoleAssignments\":{\"eojnabc\":{\"roles\":{}}}}") - .toObject(ProjectEnvironmentTypeProperties.class); - Assertions.assertEquals("b", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeProperties model = - new ProjectEnvironmentTypeProperties() - .withDeploymentTargetId("b") - .withStatus(EnvironmentTypeEnableStatus.ENABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles( - mapOf( - "vplwzbhv", - new EnvironmentRole(), - "ss", - new EnvironmentRole(), - "deslp", - new EnvironmentRole(), - "baiuebbaumny", - new EnvironmentRole()))) - .withUserRoleAssignments(mapOf("eojnabc", new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeProperties.class); - Assertions.assertEquals("b", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java deleted file mode 100644 index 23b31e30cb364..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import java.util.HashMap; -import java.util.Map; - -public final class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment model = - BinaryData - .fromString( - "{\"roles\":{\"azqugxywpmueefj\":{\"roleName\":\"ermclfplphoxuscr\",\"description\":\"bgyepsbj\"},\"tcc\":{\"roleName\":\"fqkquj\",\"description\":\"suyonobglaocq\"},\"hl\":{\"roleName\":\"yudxytlmoy\",\"description\":\"vwfudwpzntxhd\"},\"ca\":{\"roleName\":\"jbhckfrlhr\",\"description\":\"bkyvp\"}}}") - .toObject(ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment model = - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles( - mapOf( - "azqugxywpmueefj", - new EnvironmentRole(), - "tcc", - new EnvironmentRole(), - "hl", - new EnvironmentRole(), - "ca", - new EnvironmentRole())); - model = - BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.class); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java deleted file mode 100644 index a49d735419325..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeUpdateProperties; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectEnvironmentTypeUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeUpdateProperties model = - BinaryData - .fromString( - "{\"deploymentTargetId\":\"smtxpsieb\",\"status\":\"Disabled\",\"creatorRoleAssignment\":{\"roles\":{\"tkncwsc\":{\"roleName\":\"apskrdqm\",\"description\":\"jdhtldwkyzxu\"}}},\"userRoleAssignments\":{\"otogtwrupqs\":{\"roles\":{}},\"micykvceoveilo\":{\"roles\":{}},\"tyfjfcnjbkcnxdhb\":{\"roles\":{}},\"phywpnvj\":{\"roles\":{}}}}") - .toObject(ProjectEnvironmentTypeUpdateProperties.class); - Assertions.assertEquals("smtxpsieb", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeUpdateProperties model = - new ProjectEnvironmentTypeUpdateProperties() - .withDeploymentTargetId("smtxpsieb") - .withStatus(EnvironmentTypeEnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles(mapOf("tkncwsc", new EnvironmentRole()))) - .withUserRoleAssignments( - mapOf( - "otogtwrupqs", - new UserRoleAssignmentValue().withRoles(mapOf()), - "micykvceoveilo", - new UserRoleAssignmentValue().withRoles(mapOf()), - "tyfjfcnjbkcnxdhb", - new UserRoleAssignmentValue().withRoles(mapOf()), - "phywpnvj", - new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdateProperties.class); - Assertions.assertEquals("smtxpsieb", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.DISABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java deleted file mode 100644 index 69e75e887270a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdate; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectEnvironmentTypeUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectEnvironmentTypeUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"deploymentTargetId\":\"tslhspkdeem\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{\"t\":{\"roles\":{}}}},\"tags\":{\"c\":\"mqkrhahvljuahaqu\",\"aex\":\"hmdua\",\"vxpvgomz\":\"pvfadmwsrcr\"},\"identity\":{\"principalId\":\"94ff05ed-0035-4ea1-a9ed-2d72aef7d467\",\"tenantId\":\"41258eea-c393-469c-ac67-2cf25941650b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"b\":{\"principalId\":\"c2114230-151f-45b4-abc7-70150043340c\",\"clientId\":\"ac8cee49-2b3b-4322-9a02-93f02093c8a4\"}}}}") - .toObject(ProjectEnvironmentTypeUpdate.class); - Assertions.assertEquals("mqkrhahvljuahaqu", model.tags().get("c")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("tslhspkdeem", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectEnvironmentTypeUpdate model = - new ProjectEnvironmentTypeUpdate() - .withTags(mapOf("c", "mqkrhahvljuahaqu", "aex", "hmdua", "vxpvgomz", "pvfadmwsrcr")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("b", new UserAssignedIdentity()))) - .withDeploymentTargetId("tslhspkdeem") - .withStatus(EnvironmentTypeEnableStatus.ENABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments(mapOf("t", new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdate.class); - Assertions.assertEquals("mqkrhahvljuahaqu", model.tags().get("c")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("tslhspkdeem", model.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 52414e2596cb2..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -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 ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"MovingResources\",\"deploymentTargetId\":\"qwogfnzjvus\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"dp\":\"ylfsbtk\",\"wn\":\"s\"},\"identity\":{\"principalId\":\"a2b5c4cc-a0bb-4f8d-b03c-b4a0d7382186\",\"tenantId\":\"d307c1d5-a538-4a6c-be2e-58f2bd6c4aaf\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"jqctojcmisofie\",\"id\":\"efojyqdhcupl\",\"name\":\"plcwkhi\",\"type\":\"ihlhzdsqtzb\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProjectEnvironmentType response = - manager - .projectEnvironmentTypes() - .define("spave") - .withExistingProject("khocxvdfffwaf", "roud") - .withRegion("avodg") - .withTags( - mapOf( - "mfdn", "dyuib", "jnaeois", "zydvfvf", "vwmzhwplefaxvxil", "vhmgorffukis", "nzeyqxtjj", "btgn")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withDeploymentTargetId("bunzozudh") - .withStatus(EnvironmentTypeEnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments(mapOf()) - .create(); - - Assertions.assertEquals("ylfsbtk", response.tags().get("dp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("jqctojcmisofie", response.location()); - Assertions.assertEquals("qwogfnzjvus", response.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, response.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java deleted file mode 100644 index 0d8acd7a1c9fe..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 ProjectEnvironmentTypesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .projectEnvironmentTypes() - .deleteWithResponse("vgtrdcnifmzzs", "ymbrnysuxmpraf", "g", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index 4ac3cf81b88f6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -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 ProjectEnvironmentTypesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Running\",\"deploymentTargetId\":\"ncstt\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"huzqgn\":\"krsgsgb\",\"omtkub\":\"dgkynscliqhzvhxn\"},\"identity\":{\"principalId\":\"b6e190a5-9bd1-40d6-adfa-9c7f591019e2\",\"tenantId\":\"d8a6339c-0589-427c-b82b-78428cf0275c\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"zxhi\",\"id\":\"rbbcevq\",\"name\":\"gtltdhlf\",\"type\":\"qojpy\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProjectEnvironmentType response = - manager - .projectEnvironmentTypes() - .getWithResponse("iqyuvvfo", "kphhq", "ikvylauya", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("krsgsgb", response.tags().get("huzqgn")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("zxhi", response.location()); - Assertions.assertEquals("ncstt", response.deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, response.status()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java deleted file mode 100644 index 6021b9c2db20a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -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 ProjectEnvironmentTypesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentTargetId\":\"ecxn\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"irclnpk\":\"mlqtmldgxob\",\"iykhy\":\"iayz\",\"jlb\":\"wf\"},\"identity\":{\"principalId\":\"98acf4ee-341a-42e2-a2d5-46ee6a3be727\",\"tenantId\":\"789836d0-9cfd-4df2-b21f-7b1f8a117fc2\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"xhom\",\"id\":\"nhdwdigumbnra\",\"name\":\"uzzptjazysdz\",\"type\":\"ezwwv\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.projectEnvironmentTypes().list("aawzqadfl", "z", 1828408441, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mlqtmldgxob", response.iterator().next().tags().get("irclnpk")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("xhom", response.iterator().next().location()); - Assertions.assertEquals("ecxn", response.iterator().next().deploymentTargetId()); - Assertions.assertEquals(EnvironmentTypeEnableStatus.ENABLED, response.iterator().next().status()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java deleted file mode 100644 index cf1b329c3f448..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"MovingResources\",\"devCenterUri\":\"gakeqsr\",\"devCenterId\":\"bzqqedqytbciq\",\"description\":\"uflmm\",\"maxDevBoxesPerUser\":799119693},\"location\":\"modmglougpb\",\"tags\":{\"wgcu\":\"mutduqktaps\"},\"id\":\"rtumkdosvq\",\"name\":\"hbmdgbbjfdd\",\"type\":\"mbmbexppbh\"}") - .toObject(ProjectInner.class); - Assertions.assertEquals("modmglougpb", model.location()); - Assertions.assertEquals("mutduqktaps", model.tags().get("wgcu")); - Assertions.assertEquals("bzqqedqytbciq", model.devCenterId()); - Assertions.assertEquals("uflmm", model.description()); - Assertions.assertEquals(799119693, model.maxDevBoxesPerUser()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectInner model = - new ProjectInner() - .withLocation("modmglougpb") - .withTags(mapOf("wgcu", "mutduqktaps")) - .withDevCenterId("bzqqedqytbciq") - .withDescription("uflmm") - .withMaxDevBoxesPerUser(799119693); - model = BinaryData.fromObject(model).toObject(ProjectInner.class); - Assertions.assertEquals("modmglougpb", model.location()); - Assertions.assertEquals("mutduqktaps", model.tags().get("wgcu")); - Assertions.assertEquals("bzqqedqytbciq", model.devCenterId()); - Assertions.assertEquals("uflmm", model.description()); - Assertions.assertEquals(799119693, model.maxDevBoxesPerUser()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java deleted file mode 100644 index 78198611872d9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectListResult; - -public final class ProjectListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"StorageProvisioningFailed\",\"devCenterUri\":\"rgqjbpfzfsinzg\",\"devCenterId\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\",\"maxDevBoxesPerUser\":864037829},\"location\":\"dvhpfxxypininm\",\"tags\":{\"oginuvamiheognar\":\"uybbkpodep\"},\"id\":\"zxtheotusivyevcc\",\"name\":\"qi\",\"type\":\"nhungbw\"},{\"properties\":{\"provisioningState\":\"TransientFailure\",\"devCenterUri\":\"ygxgispemvtz\",\"devCenterId\":\"ufubl\",\"description\":\"fxqeof\",\"maxDevBoxesPerUser\":56034680},\"location\":\"jhqjbasvmsmjqul\",\"tags\":{\"wrwclxxwrljd\":\"ntnbybkzg\",\"kwt\":\"uskcqvkocrcj\",\"ssainqpjwnzll\":\"hxbnjbiksqrg\"},\"id\":\"fmppe\",\"name\":\"bvmgxsabkyqduuji\",\"type\":\"c\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"evndh\",\"devCenterId\":\"wpdappdsbdkv\",\"description\":\"wjfeusnhutjel\",\"maxDevBoxesPerUser\":391471833},\"location\":\"dhugjzzdatqxhocd\",\"tags\":{\"vkaozwyiftyhxhur\":\"blgphuticn\",\"tyxolniwpwc\":\"k\",\"awxklr\":\"kjfkg\",\"ypnddhsgcb\":\"plwckbas\"},\"id\":\"cph\",\"name\":\"jkot\",\"type\":\"nqgoulzndli\"}],\"nextLink\":\"yqkgfg\"}") - .toObject(ProjectListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectListResult model = new ProjectListResult(); - model = BinaryData.fromObject(model).toObject(ProjectListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java deleted file mode 100644 index 5c4662377c2c1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProjectPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updated\",\"devCenterUri\":\"ol\",\"devCenterId\":\"fpsalgbqu\",\"description\":\"gjyjgzjaoyfhrtxi\",\"maxDevBoxesPerUser\":1620894991}") - .toObject(ProjectProperties.class); - Assertions.assertEquals("fpsalgbqu", model.devCenterId()); - Assertions.assertEquals("gjyjgzjaoyfhrtxi", model.description()); - Assertions.assertEquals(1620894991, model.maxDevBoxesPerUser()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectProperties model = - new ProjectProperties() - .withDevCenterId("fpsalgbqu") - .withDescription("gjyjgzjaoyfhrtxi") - .withMaxDevBoxesPerUser(1620894991); - model = BinaryData.fromObject(model).toObject(ProjectProperties.class); - Assertions.assertEquals("fpsalgbqu", model.devCenterId()); - Assertions.assertEquals("gjyjgzjaoyfhrtxi", model.description()); - Assertions.assertEquals(1620894991, model.maxDevBoxesPerUser()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java deleted file mode 100644 index 61de47b8bd707..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProjectUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectUpdateProperties model = - BinaryData - .fromString( - "{\"devCenterId\":\"kujysvlejuvfq\",\"description\":\"rlyxwjkcprbnw\",\"maxDevBoxesPerUser\":1500151010}") - .toObject(ProjectUpdateProperties.class); - Assertions.assertEquals("kujysvlejuvfq", model.devCenterId()); - Assertions.assertEquals("rlyxwjkcprbnw", model.description()); - Assertions.assertEquals(1500151010, model.maxDevBoxesPerUser()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectUpdateProperties model = - new ProjectUpdateProperties() - .withDevCenterId("kujysvlejuvfq") - .withDescription("rlyxwjkcprbnw") - .withMaxDevBoxesPerUser(1500151010); - model = BinaryData.fromObject(model).toObject(ProjectUpdateProperties.class); - Assertions.assertEquals("kujysvlejuvfq", model.devCenterId()); - Assertions.assertEquals("rlyxwjkcprbnw", model.description()); - Assertions.assertEquals(1500151010, model.maxDevBoxesPerUser()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java deleted file mode 100644 index 1baba9e0fa373..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ProjectUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProjectUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"devCenterId\":\"tbvpysszdnru\",\"description\":\"guhmuouqfpr\",\"maxDevBoxesPerUser\":584563122},\"tags\":{\"itnwuizgazxufi\":\"g\",\"hr\":\"uckyf\",\"zwdzuh\":\"idf\",\"wxmnteiwao\":\"ymwisdkft\"},\"location\":\"km\"}") - .toObject(ProjectUpdate.class); - Assertions.assertEquals("g", model.tags().get("itnwuizgazxufi")); - Assertions.assertEquals("km", model.location()); - Assertions.assertEquals("tbvpysszdnru", model.devCenterId()); - Assertions.assertEquals("guhmuouqfpr", model.description()); - Assertions.assertEquals(584563122, model.maxDevBoxesPerUser()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProjectUpdate model = - new ProjectUpdate() - .withTags(mapOf("itnwuizgazxufi", "g", "hr", "uckyf", "zwdzuh", "idf", "wxmnteiwao", "ymwisdkft")) - .withLocation("km") - .withDevCenterId("tbvpysszdnru") - .withDescription("guhmuouqfpr") - .withMaxDevBoxesPerUser(584563122); - model = BinaryData.fromObject(model).toObject(ProjectUpdate.class); - Assertions.assertEquals("g", model.tags().get("itnwuizgazxufi")); - Assertions.assertEquals("km", model.location()); - Assertions.assertEquals("tbvpysszdnru", model.devCenterId()); - Assertions.assertEquals("guhmuouqfpr", model.description()); - Assertions.assertEquals(584563122, model.maxDevBoxesPerUser()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java deleted file mode 100644 index 5103abb1e70c0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"nu\",\"devCenterId\":\"jsrtk\",\"description\":\"wnopqgikyzirtx\",\"maxDevBoxesPerUser\":543574693},\"location\":\"zejntps\",\"tags\":{\"ieoxorggufhyaomt\":\"ioilqukrydxtq\",\"jzhpjbibgjmfx\":\"ghhavgrvkffo\"},\"id\":\"mv\",\"name\":\"cluyovwxnbkf\",\"type\":\"zzxscyhwzdgiruj\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Project response = - manager - .projects() - .define("fcdmqnrojlpijn") - .withRegion("krlgnyhm") - .withExistingResourceGroup("nepttwqmsni") - .withTags(mapOf("thrrgh", "xkk", "gf", "jbdhqxvc")) - .withDevCenterId("asxifto") - .withDescription("yzhftwesgogczh") - .withMaxDevBoxesPerUser(1907577103) - .create(); - - Assertions.assertEquals("zejntps", response.location()); - Assertions.assertEquals("ioilqukrydxtq", response.tags().get("ieoxorggufhyaomt")); - Assertions.assertEquals("jsrtk", response.devCenterId()); - Assertions.assertEquals("wnopqgikyzirtx", response.description()); - Assertions.assertEquals(543574693, response.maxDevBoxesPerUser()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java deleted file mode 100644 index 6373783485b02..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 ProjectsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.projects().delete("gseinq", "iufxqknpir", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index f0e36a77da9ec..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"devCenterUri\":\"iwkkbn\",\"devCenterId\":\"rywvtylbfpn\",\"description\":\"rd\",\"maxDevBoxesPerUser\":287864608},\"location\":\"ithtywu\",\"tags\":{\"jchrdgoihxumw\":\"bihwqknfdnt\",\"zj\":\"ton\"},\"id\":\"uu\",\"name\":\"fdlwg\",\"type\":\"ytsbwtovv\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Project response = - manager - .projects() - .getByResourceGroupWithResponse("lmcuvhixb", "xyfwnylrcool", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ithtywu", response.location()); - Assertions.assertEquals("bihwqknfdnt", response.tags().get("jchrdgoihxumw")); - Assertions.assertEquals("rywvtylbfpn", response.devCenterId()); - Assertions.assertEquals("rd", response.description()); - Assertions.assertEquals(287864608, response.maxDevBoxesPerUser()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java deleted file mode 100644 index bc5db20ebe44c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"MovingResources\",\"devCenterUri\":\"ibreb\",\"devCenterId\":\"aysjkixqtnqttez\",\"description\":\"fffiak\",\"maxDevBoxesPerUser\":1860291958},\"location\":\"qmt\",\"tags\":{\"wau\":\"tmmjihyeozph\"},\"id\":\"qncygupkvi\",\"name\":\"mdscwxqupev\",\"type\":\"hfstotxhojujbyp\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.projects().listByResourceGroup("wuenvr", 1615411821, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qmt", response.iterator().next().location()); - Assertions.assertEquals("tmmjihyeozph", response.iterator().next().tags().get("wau")); - Assertions.assertEquals("aysjkixqtnqttez", response.iterator().next().devCenterId()); - Assertions.assertEquals("fffiak", response.iterator().next().description()); - Assertions.assertEquals(1860291958, response.iterator().next().maxDevBoxesPerUser()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java deleted file mode 100644 index f16578ad2cf33..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updated\",\"devCenterUri\":\"glikkxwslolb\",\"devCenterId\":\"vuzlm\",\"description\":\"elfk\",\"maxDevBoxesPerUser\":1554558708},\"location\":\"crpw\",\"tags\":{\"w\":\"znoigbrn\",\"jjoqkagf\":\"wkpnbsaz\"},\"id\":\"sxtta\",\"name\":\"gzxnfaazpxdtnk\",\"type\":\"mkqjj\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.projects().list(1090066080, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("crpw", response.iterator().next().location()); - Assertions.assertEquals("znoigbrn", response.iterator().next().tags().get("w")); - Assertions.assertEquals("vuzlm", response.iterator().next().devCenterId()); - Assertions.assertEquals("elfk", response.iterator().next().description()); - Assertions.assertEquals(1554558708, response.iterator().next().maxDevBoxesPerUser()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java deleted file mode 100644 index 020547daccf18..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration; - -public final class RecommendedMachineConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecommendedMachineConfiguration model = - BinaryData - .fromString( - "{\"memory\":{\"min\":1015475658,\"max\":1187016173},\"vCPUs\":{\"min\":1088023513,\"max\":1059289451}}") - .toObject(RecommendedMachineConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecommendedMachineConfiguration model = new RecommendedMachineConfiguration(); - model = BinaryData.fromObject(model).toObject(RecommendedMachineConfiguration.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java deleted file mode 100644 index bbdcf3e313a79..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ResourceRange; - -public final class ResourceRangeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceRange model = - BinaryData.fromString("{\"min\":10134075,\"max\":1131419469}").toObject(ResourceRange.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceRange model = new ResourceRange(); - model = BinaryData.fromObject(model).toObject(ResourceRange.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java deleted file mode 100644 index 308f79a7cdf14..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleInner; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"vaytdwkqbrq\",\"timeZone\":\"paxh\",\"state\":\"Disabled\"},\"id\":\"livpdt\",\"name\":\"irqtdqoa\",\"type\":\"oruzfgsquyfxrxx\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("vaytdwkqbrq", model.time()); - Assertions.assertEquals("paxh", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleInner model = - new ScheduleInner() - .withTypePropertiesType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("vaytdwkqbrq") - .withTimeZone("paxh") - .withState(ScheduleEnableStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("vaytdwkqbrq", model.time()); - Assertions.assertEquals("paxh", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.DISABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java deleted file mode 100644 index 2c6e242cca06e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ScheduleListResult; - -public final class ScheduleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"RolloutInProgress\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"jpxac\",\"timeZone\":\"udfnbyxba\",\"state\":\"Enabled\"},\"id\":\"yvayffimrzr\",\"name\":\"uzqogsexnevf\",\"type\":\"nwnwme\"}],\"nextLink\":\"syyceuzsoibjud\"}") - .toObject(ScheduleListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleListResult model = new ScheduleListResult(); - model = BinaryData.fromObject(model).toObject(ScheduleListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java deleted file mode 100644 index e9f9bc5ca4995..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleProperties; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; - -public final class SchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updated\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"jezwlwnw\",\"timeZone\":\"qlcvydy\",\"state\":\"Enabled\"}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jezwlwnw", model.time()); - Assertions.assertEquals("qlcvydy", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleProperties model = - new ScheduleProperties() - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("jezwlwnw") - .withTimeZone("qlcvydy") - .withState(ScheduleEnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jezwlwnw", model.time()); - Assertions.assertEquals("qlcvydy", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java deleted file mode 100644 index e3f4d3b32d91c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleUpdateProperties; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleUpdateProperties model = - BinaryData - .fromString( - "{\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"jkniodko\",\"timeZone\":\"bw\",\"state\":\"Enabled\"}") - .toObject(ScheduleUpdateProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jkniodko", model.time()); - Assertions.assertEquals("bw", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleUpdateProperties model = - new ScheduleUpdateProperties() - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("jkniodko") - .withTimeZone("bw") - .withState(ScheduleEnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleUpdateProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jkniodko", model.time()); - Assertions.assertEquals("bw", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java deleted file mode 100644 index 8018a294d34f2..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduleUpdate; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"vdkcrodtj\",\"timeZone\":\"fw\",\"state\":\"Enabled\"},\"tags\":{\"kggkfpa\":\"kacjvefkdlfo\",\"pulpqblylsyxk\":\"ao\"},\"location\":\"nsj\"}") - .toObject(ScheduleUpdate.class); - Assertions.assertEquals("kacjvefkdlfo", model.tags().get("kggkfpa")); - Assertions.assertEquals("nsj", model.location()); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("vdkcrodtj", model.time()); - Assertions.assertEquals("fw", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleUpdate model = - new ScheduleUpdate() - .withTags(mapOf("kggkfpa", "kacjvefkdlfo", "pulpqblylsyxk", "ao")) - .withLocation("nsj") - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("vdkcrodtj") - .withTimeZone("fw") - .withState(ScheduleEnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleUpdate.class); - Assertions.assertEquals("kacjvefkdlfo", model.tags().get("kggkfpa")); - Assertions.assertEquals("nsj", model.location()); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("vdkcrodtj", model.time()); - Assertions.assertEquals("fw", model.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, model.state()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index f0c3c1761e825..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"qhvseufuq\",\"timeZone\":\"xpdlcgqlsis\",\"state\":\"Enabled\"},\"id\":\"rddga\",\"name\":\"quhiosrsjuivf\",\"type\":\"disyirnxz\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .define("ijddtvqc") - .withExistingPool("mwmdxmebwjscjpa", "lxveabfqx", "mwmqtibx") - .withTypePropertiesType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("kmr") - .withTimeZone("eekpndz") - .withState(ScheduleEnableStatus.DISABLED) - .withTop(203387229) - .create(); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.frequency()); - Assertions.assertEquals("qhvseufuq", response.time()); - Assertions.assertEquals("xpdlcgqlsis", response.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, response.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java deleted file mode 100644 index 36f04d3ca386b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -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 SchedulesDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .schedules() - .delete( - "eecjmeis", - "stvasylwxdzaumw", - "oohgu", - "fuzboyjathwtzolb", - 1032800265, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java deleted file mode 100644 index 6b06e951c0714..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Created\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"qzmiza\",\"timeZone\":\"kan\",\"state\":\"Enabled\"},\"id\":\"n\",\"name\":\"zhajoylhjlmuo\",\"type\":\"xprimrsop\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .getWithResponse("ucb", "qtgdqohmcwsl", "riz", "tpwb", 188552555, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.frequency()); - Assertions.assertEquals("qzmiza", response.time()); - Assertions.assertEquals("kan", response.timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, response.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java deleted file mode 100644 index 6823246588269..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesListByPoolMockTests { - @Test - public void testListByPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"StorageProvisioningFailed\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"e\",\"timeZone\":\"jvgcxtx\",\"state\":\"Enabled\"},\"id\":\"eafidltugsresm\",\"name\":\"ssjhoiftxfkf\",\"type\":\"egprhptil\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .schedules() - .listByPool( - "gtgkylkdghr", "euutlwxezwzh", "kvbwnhhtqlgeh", 1013925837, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.iterator().next().typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.iterator().next().frequency()); - Assertions.assertEquals("e", response.iterator().next().time()); - Assertions.assertEquals("jvgcxtx", response.iterator().next().timeZone()); - Assertions.assertEquals(ScheduleEnableStatus.ENABLED, response.iterator().next().state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java deleted file mode 100644 index b6d85d857d004..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.SkuListResult; - -public final class SkuListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuListResult model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"zvqtmnubexkp\",\"locations\":[\"mond\",\"mquxvypo\"],\"capabilities\":[],\"name\":\"opkwhojv\",\"tier\":\"Free\",\"size\":\"gxysmocmbqfqvm\",\"family\":\"xozap\",\"capacity\":1382848835},{\"resourceType\":\"xprglyatddc\",\"locations\":[\"cuejrjxgci\",\"ibrhosxsdqr\",\"zoymibmrqyibahw\"],\"capabilities\":[],\"name\":\"szdtmhrkwof\",\"tier\":\"Standard\",\"size\":\"qacpiex\",\"family\":\"tg\",\"capacity\":670183300},{\"resourceType\":\"oenwashr\",\"locations\":[\"kcnqxwbpo\",\"ulpiuj\"],\"capabilities\":[],\"name\":\"sipqii\",\"tier\":\"Free\",\"size\":\"qerpqlpqwcc\",\"family\":\"qgbdbuta\",\"capacity\":1020158274}],\"nextLink\":\"tkuwhhmhykojo\"}") - .toObject(SkuListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuListResult model = new SkuListResult(); - model = BinaryData.fromObject(model).toObject(SkuListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java deleted file mode 100644 index a5217b5a691ac..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"name\":\"qbuaceopzfqr\",\"tier\":\"Standard\",\"size\":\"opppcqeq\",\"family\":\"lzdahzxctobgbkdm\",\"capacity\":935406308}") - .toObject(Sku.class); - Assertions.assertEquals("qbuaceopzfqr", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("opppcqeq", model.size()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.family()); - Assertions.assertEquals(935406308, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = - new Sku() - .withName("qbuaceopzfqr") - .withTier(SkuTier.STANDARD) - .withSize("opppcqeq") - .withFamily("lzdahzxctobgbkdm") - .withCapacity(935406308); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("qbuaceopzfqr", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("opppcqeq", model.size()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.family()); - Assertions.assertEquals(935406308, model.capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java deleted file mode 100644 index 49a8e2ef3514a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenterSku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -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 SkusListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"n\",\"locations\":[\"ketwzhhzjhfjmhv\",\"muvgp\",\"uneqsxvmhf\"],\"capabilities\":[{\"name\":\"yihsasbhudypohyu\",\"value\":\"slynsqyrpfoo\"}],\"name\":\"rlttymsjnygqdnfw\",\"tier\":\"Basic\",\"size\":\"gtilax\",\"family\":\"fhqlyvi\",\"capacity\":2065118929}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus().list(1669449046, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rlttymsjnygqdnfw", response.iterator().next().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().tier()); - Assertions.assertEquals("gtilax", response.iterator().next().size()); - Assertions.assertEquals("fhqlyvi", response.iterator().next().family()); - Assertions.assertEquals(2065118929, response.iterator().next().capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/StopOnDisconnectConfigurationTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/StopOnDisconnectConfigurationTests.java deleted file mode 100644 index bc80d783bdac2..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/StopOnDisconnectConfigurationTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; -import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; -import org.junit.jupiter.api.Assertions; - -public final class StopOnDisconnectConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StopOnDisconnectConfiguration model = - BinaryData - .fromString("{\"status\":\"Disabled\",\"gracePeriodMinutes\":1747128451}") - .toObject(StopOnDisconnectConfiguration.class); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.status()); - Assertions.assertEquals(1747128451, model.gracePeriodMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StopOnDisconnectConfiguration model = - new StopOnDisconnectConfiguration() - .withStatus(StopOnDisconnectEnableStatus.DISABLED) - .withGracePeriodMinutes(1747128451); - model = BinaryData.fromObject(model).toObject(StopOnDisconnectConfiguration.class); - Assertions.assertEquals(StopOnDisconnectEnableStatus.DISABLED, model.status()); - Assertions.assertEquals(1747128451, model.gracePeriodMinutes()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java deleted file mode 100644 index 1957beaf47668..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.TrackedResourceUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TrackedResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrackedResourceUpdate model = - BinaryData - .fromString( - "{\"tags\":{\"suuv\":\"u\",\"odjpslwejd\":\"kjozkrwfnd\",\"cctazakljlahbc\":\"vwryoqpso\",\"gexpaojakhmsbz\":\"yffdfdos\"},\"location\":\"crzevdphlx\"}") - .toObject(TrackedResourceUpdate.class); - Assertions.assertEquals("u", model.tags().get("suuv")); - Assertions.assertEquals("crzevdphlx", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrackedResourceUpdate model = - new TrackedResourceUpdate() - .withTags( - mapOf( - "suuv", - "u", - "odjpslwejd", - "kjozkrwfnd", - "cctazakljlahbc", - "vwryoqpso", - "gexpaojakhmsbz", - "yffdfdos")) - .withLocation("crzevdphlx"); - model = BinaryData.fromObject(model).toObject(TrackedResourceUpdate.class); - Assertions.assertEquals("u", model.tags().get("suuv")); - Assertions.assertEquals("crzevdphlx", model.location()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java deleted file mode 100644 index b5704acb3946c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.azure.resourcemanager.devcenter.models.UsageName; -import com.azure.resourcemanager.devcenter.models.UsageUnit; -import org.junit.jupiter.api.Assertions; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = - BinaryData - .fromString( - "{\"currentValue\":15326288363695104,\"limit\":6522332661969979090,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"pmutwuo\",\"value\":\"rpkhjwn\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(15326288363695104L, model.currentValue()); - Assertions.assertEquals(6522332661969979090L, model.limit()); - Assertions.assertEquals(UsageUnit.COUNT, model.unit()); - Assertions.assertEquals("pmutwuo", model.name().localizedValue()); - Assertions.assertEquals("rpkhjwn", model.name().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = - new UsageInner() - .withCurrentValue(15326288363695104L) - .withLimit(6522332661969979090L) - .withUnit(UsageUnit.COUNT) - .withName(new UsageName().withLocalizedValue("pmutwuo").withValue("rpkhjwn")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(15326288363695104L, model.currentValue()); - Assertions.assertEquals(6522332661969979090L, model.limit()); - Assertions.assertEquals(UsageUnit.COUNT, model.unit()); - Assertions.assertEquals("pmutwuo", model.name().localizedValue()); - Assertions.assertEquals("rpkhjwn", model.name().value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java deleted file mode 100644 index a78e1021e09d7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model = - BinaryData.fromString("{\"localizedValue\":\"qsluicp\",\"value\":\"gk\"}").toObject(UsageName.class); - Assertions.assertEquals("qsluicp", model.localizedValue()); - Assertions.assertEquals("gk", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName().withLocalizedValue("qsluicp").withValue("gk"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("qsluicp", model.localizedValue()); - Assertions.assertEquals("gk", model.value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java deleted file mode 100644 index 4de418d1f47c4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Usage; -import com.azure.resourcemanager.devcenter.models.UsageUnit; -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 UsagesListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"currentValue\":1586087299236435326,\"limit\":9156400089416857939,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"q\",\"value\":\"aqvlgafcqusr\"}}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().listByLocation("hoxgsgbpf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1586087299236435326L, response.iterator().next().currentValue()); - Assertions.assertEquals(9156400089416857939L, response.iterator().next().limit()); - Assertions.assertEquals(UsageUnit.COUNT, response.iterator().next().unit()); - Assertions.assertEquals("q", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("aqvlgafcqusr", response.iterator().next().name().value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 1c5a9bf56936e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"53af2364-172c-480f-88cc-03ec033bcd1e\",\"clientId\":\"61c7783e-5443-425d-a66f-5fb4aa97cd73\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java deleted file mode 100644 index 604f3c394f58c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; - -public final class UserRoleAssignmentValueTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserRoleAssignmentValue model = - BinaryData - .fromString("{\"roles\":{\"seyvj\":{\"roleName\":\"b\",\"description\":\"nwbmeh\"}}}") - .toObject(UserRoleAssignmentValue.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserRoleAssignmentValue model = new UserRoleAssignmentValue().withRoles(mapOf("seyvj", new EnvironmentRole())); - model = BinaryData.fromObject(model).toObject(UserRoleAssignmentValue.class); - } - - @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; - } -}