From 351dfceb519f510a740172e2bc221b01896095c2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Dec 2023 22:26:04 +0000 Subject: [PATCH] CodeGen from PR 26953 in Azure/azure-rest-api-specs Merge 9c7f0bb332b979b4d241ec2361d423c33af9873b into 90115af9fda46f323e5c42c274f2b376108d1d47 --- .../azure-resourcemanager-sphere/CHANGELOG.md | 4 +- .../azure-resourcemanager-sphere/README.md | 6 +- .../azure-resourcemanager-sphere/SAMPLE.md | 525 ++--- .../azure-resourcemanager-sphere/pom.xml | 1 + .../sphere/AzureSphereManager.java | 97 +- .../fluent/AzureSphereManagementClient.java | 30 +- .../sphere/fluent/CatalogsClient.java | 120 +- .../sphere/fluent/CertificatesClient.java | 52 +- .../sphere/fluent/DeploymentsClient.java | 147 +- .../sphere/fluent/DeviceGroupsClient.java | 181 +- .../sphere/fluent/DevicesClient.java | 204 +- .../sphere/fluent/ImagesClient.java | 58 +- .../sphere/fluent/OperationsClient.java | 16 +- .../sphere/fluent/ProductsClient.java | 92 +- .../sphere/fluent/models/CatalogInner.java | 58 +- .../models/CertificateChainResponseInner.java | 12 +- .../fluent/models/CertificateInner.java | 108 +- .../models/CountDeviceResponseInner.java | 14 +- .../sphere/fluent/models/DeploymentInner.java | 95 +- .../fluent/models/DeviceGroupInner.java | 166 +- .../sphere/fluent/models/DeviceInner.java | 109 +- .../fluent/models/DeviceInsightInner.java | 80 +- .../sphere/fluent/models/ImageInner.java | 156 +- .../sphere/fluent/models/OperationInner.java | 22 +- .../sphere/fluent/models/ProductInner.java | 63 +- .../ProofOfPossessionNonceResponseInner.java | 11 +- .../SignedCapabilityImageResponseInner.java | 12 +- .../sphere/fluent/models/package-info.java | 5 +- .../sphere/fluent/package-info.java | 5 +- .../AzureSphereManagementClientBuilder.java | 46 +- .../AzureSphereManagementClientImpl.java | 137 +- .../sphere/implementation/CatalogImpl.java | 103 +- .../implementation/CatalogsClientImpl.java | 1848 ++++++----------- .../sphere/implementation/CatalogsImpl.java | 157 +- .../CertificateChainResponseImpl.java | 4 +- .../implementation/CertificateImpl.java | 36 +- .../CertificatesClientImpl.java | 573 ++--- .../implementation/CertificatesImpl.java | 86 +- .../CountDeviceResponseImpl.java | 4 +- .../sphere/implementation/DeploymentImpl.java | 120 +- .../implementation/DeploymentsClientImpl.java | 962 +++------ .../implementation/DeploymentsImpl.java | 217 +- .../implementation/DeviceGroupImpl.java | 157 +- .../DeviceGroupsClientImpl.java | 1316 ++++-------- .../implementation/DeviceGroupsImpl.java | 193 +- .../sphere/implementation/DeviceImpl.java | 158 +- .../implementation/DeviceInsightImpl.java | 4 +- .../implementation/DevicesClientImpl.java | 1358 ++++-------- .../sphere/implementation/DevicesImpl.java | 227 +- .../sphere/implementation/ImageImpl.java | 99 +- .../implementation/ImagesClientImpl.java | 630 ++---- .../sphere/implementation/ImagesImpl.java | 103 +- .../implementation/OperationsClientImpl.java | 171 +- .../sphere/implementation/OperationsImpl.java | 4 +- .../sphere/implementation/ProductImpl.java | 77 +- .../implementation/ProductsClientImpl.java | 1068 ++++------ .../sphere/implementation/ProductsImpl.java | 122 +- .../ProofOfPossessionNonceResponseImpl.java | 3 +- .../SignedCapabilityImageResponseImpl.java | 3 +- .../sphere/implementation/Utils.java | 43 +- .../sphere/implementation/package-info.java | 5 +- .../sphere/models/ActionType.java | 14 +- .../models/AllowCrashDumpCollection.java | 18 +- .../sphere/models/CapabilityType.java | 18 +- .../sphere/models/Catalog.java | 157 +- .../sphere/models/CatalogListResult.java | 23 +- .../models/CatalogProperties.java | 15 +- .../sphere/models/CatalogUpdate.java | 14 +- .../sphere/models/Catalogs.java | 98 +- .../sphere/models/Certificate.java | 71 +- .../models/CertificateChainResponse.java | 8 +- .../sphere/models/CertificateListResult.java | 23 +- .../models/CertificateProperties.java | 28 +- .../sphere/models/CertificateStatus.java | 26 +- .../sphere/models/Certificates.java | 52 +- .../sphere/models/ClaimDevicesRequest.java | 20 +- .../sphere/models/CountDeviceResponse.java | 8 +- .../sphere/models/CountElementsResponse.java | 14 +- .../sphere/models/Deployment.java | 119 +- .../sphere/models/DeploymentListResult.java | 23 +- .../models/DeploymentProperties.java | 26 +- .../sphere/models/Deployments.java | 80 +- .../resourcemanager/sphere/models/Device.java | 155 +- .../sphere/models/DeviceGroup.java | 246 +-- .../sphere/models/DeviceGroupListResult.java | 23 +- .../models/DeviceGroupProperties.java | 41 +- .../sphere/models/DeviceGroupUpdate.java | 139 +- .../models/DeviceGroupUpdateProperties.java | 40 +- .../sphere/models/DeviceGroups.java | 76 +- .../sphere/models/DeviceInsight.java | 22 +- .../sphere/models/DeviceListResult.java | 23 +- .../{fluent => }/models/DeviceProperties.java | 29 +- .../sphere/models/DeviceUpdate.java | 47 +- .../models/DeviceUpdateProperties.java | 16 +- .../sphere/models/Devices.java | 83 +- .../GenerateCapabilityImageRequest.java | 20 +- .../resourcemanager/sphere/models/Image.java | 164 +- .../sphere/models/ImageListResult.java | 23 +- .../{fluent => }/models/ImageProperties.java | 39 +- .../sphere/models/ImageType.java | 106 +- .../resourcemanager/sphere/models/Images.java | 36 +- .../models/ListDeviceGroupsRequest.java | 14 +- .../sphere/models/OSFeedType.java | 18 +- .../sphere/models/Operation.java | 16 +- .../sphere/models/OperationDisplay.java | 18 +- .../sphere/models/OperationListResult.java | 14 +- .../sphere/models/Operations.java | 16 +- .../resourcemanager/sphere/models/Origin.java | 18 +- .../sphere/models/PagedDeviceInsight.java | 23 +- .../sphere/models/Product.java | 111 +- .../sphere/models/ProductListResult.java | 23 +- .../models/ProductProperties.java | 24 +- .../sphere/models/ProductUpdate.java | 47 +- .../models/ProductUpdateProperties.java | 16 +- .../sphere/models/Products.java | 50 +- .../models/ProofOfPossessionNonceRequest.java | 20 +- .../ProofOfPossessionNonceResponse.java | 20 +- .../sphere/models/ProvisioningState.java | 38 +- .../sphere/models/RegionalDataBoundary.java | 18 +- .../models/SignedCapabilityImageResponse.java | 8 +- .../sphere/models/UpdatePolicy.java | 18 +- .../sphere/models/package-info.java | 5 +- .../resourcemanager/sphere/package-info.java | 5 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 1 + .../reflect-config.json | 261 +++ .../CatalogsCountDevicesSamples.java | 10 +- .../CatalogsCreateOrUpdateSamples.java | 15 +- .../generated/CatalogsDeleteSamples.java | 10 +- .../CatalogsGetByResourceGroupSamples.java | 14 +- .../CatalogsListByResourceGroupSamples.java | 10 +- .../CatalogsListDeploymentsSamples.java | 16 +- .../CatalogsListDeviceGroupsSamples.java | 24 +- .../CatalogsListDeviceInsightsSamples.java | 16 +- .../generated/CatalogsListDevicesSamples.java | 15 +- .../sphere/generated/CatalogsListSamples.java | 10 +- .../generated/CatalogsUpdateSamples.java | 17 +- .../generated/CertificatesGetSamples.java | 15 +- .../CertificatesListByCatalogSamples.java | 15 +- .../CertificatesRetrieveCertChainSamples.java | 16 +- ...RetrieveProofOfPossessionNonceSamples.java | 25 +- .../DeploymentsCreateOrUpdateSamples.java | 17 +- .../generated/DeploymentsDeleteSamples.java | 21 +- .../generated/DeploymentsGetSamples.java | 21 +- .../DeploymentsListByDeviceGroupSamples.java | 24 +- .../DeviceGroupsClaimDevicesSamples.java | 27 +- .../DeviceGroupsCountDevicesSamples.java | 16 +- .../DeviceGroupsCreateOrUpdateSamples.java | 20 +- .../generated/DeviceGroupsDeleteSamples.java | 15 +- .../generated/DeviceGroupsGetSamples.java | 16 +- .../DeviceGroupsListByProductSamples.java | 23 +- .../generated/DeviceGroupsUpdateSamples.java | 18 +- .../DevicesCreateOrUpdateSamples.java | 18 +- .../generated/DevicesDeleteSamples.java | 21 +- ...DevicesGenerateCapabilityImageSamples.java | 26 +- .../sphere/generated/DevicesGetSamples.java | 21 +- .../DevicesListByDeviceGroupSamples.java | 15 +- .../generated/DevicesUpdateSamples.java | 24 +- .../ImagesCreateOrUpdateSamples.java | 19 +- .../sphere/generated/ImagesDeleteSamples.java | 9 +- .../sphere/generated/ImagesGetSamples.java | 14 +- .../generated/ImagesListByCatalogSamples.java | 14 +- .../generated/OperationsListSamples.java | 10 +- .../ProductsCountDevicesSamples.java | 15 +- .../ProductsCreateOrUpdateSamples.java | 9 +- .../generated/ProductsDeleteSamples.java | 10 +- ...ctsGenerateDefaultDeviceGroupsSamples.java | 20 +- .../sphere/generated/ProductsGetSamples.java | 14 +- .../ProductsListByCatalogSamples.java | 9 +- .../generated/ProductsUpdateSamples.java | 17 +- .../sphere/generated/CatalogInnerTests.java | 55 - .../generated/CatalogListResultTests.java | 55 - .../generated/CatalogPropertiesTests.java | 22 - .../sphere/generated/CatalogUpdateTests.java | 43 - ...logsCountDevicesWithResponseMockTests.java | 66 - .../CatalogsCreateOrUpdateMockTests.java | 87 - .../generated/CatalogsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 68 - .../CatalogsListByResourceGroupMockTests.java | 69 - .../CatalogsListDeploymentsMockTests.java | 77 - .../CatalogsListDeviceGroupsMockTests.java | 88 - .../CatalogsListDeviceInsightsMockTests.java | 86 - .../CatalogsListDevicesMockTests.java | 77 - .../generated/CatalogsListMockTests.java | 68 - .../CertificateChainResponseInnerTests.java | 24 - .../generated/CertificateInnerTests.java | 25 - .../generated/CertificateListResultTests.java | 31 - .../generated/CertificatePropertiesTests.java | 25 - .../CertificatesGetWithResponseMockTests.java | 67 - .../CertificatesListByCatalogMockTests.java | 74 - ...etrieveCertChainWithResponseMockTests.java | 66 - ...fPossessionNonceWithResponseMockTests.java | 73 - .../generated/ClaimDevicesRequestTests.java | 30 - .../CountDeviceResponseInnerTests.java | 25 - .../generated/CountElementsResponseTests.java | 25 - .../generated/DeploymentInnerTests.java | 58 - .../generated/DeploymentListResultTests.java | 47 - .../generated/DeploymentPropertiesTests.java | 50 - .../DeploymentsCreateOrUpdateMockTests.java | 89 - .../generated/DeploymentsDeleteMockTests.java | 61 - .../DeploymentsGetWithResponseMockTests.java | 75 - ...DeploymentsListByDeviceGroupMockTests.java | 85 - .../generated/DeviceGroupInnerTests.java | 46 - .../generated/DeviceGroupListResultTests.java | 73 - .../generated/DeviceGroupPropertiesTests.java | 46 - .../DeviceGroupUpdatePropertiesTests.java | 46 - .../generated/DeviceGroupUpdateTests.java | 46 - ...oupsCountDevicesWithResponseMockTests.java | 69 - .../DeviceGroupsCreateOrUpdateMockTests.java | 84 - .../DeviceGroupsDeleteMockTests.java | 63 - .../DeviceGroupsGetWithResponseMockTests.java | 78 - .../DeviceGroupsListByProductMockTests.java | 87 - .../sphere/generated/DeviceInnerTests.java | 28 - .../generated/DeviceInsightInnerTests.java | 52 - .../generated/DeviceListResultTests.java | 41 - .../generated/DevicePropertiesTests.java | 28 - .../DeviceUpdatePropertiesTests.java | 25 - .../sphere/generated/DeviceUpdateTests.java | 25 - .../DevicesCreateOrUpdateMockTests.java | 72 - .../generated/DevicesDeleteMockTests.java | 63 - ...vicesGenerateCapabilityImageMockTests.java | 81 - .../DevicesGetWithResponseMockTests.java | 76 - .../DevicesListByDeviceGroupMockTests.java | 71 - .../GenerateCapabilityImageRequestTests.java | 31 - .../sphere/generated/ImageInnerTests.java | 37 - .../generated/ImageListResultTests.java | 54 - .../generated/ImagePropertiesTests.java | 37 - .../ImagesCreateOrUpdateMockTests.java | 77 - .../generated/ImagesDeleteMockTests.java | 61 - .../ImagesGetWithResponseMockTests.java | 73 - .../ImagesListByCatalogMockTests.java | 80 - .../ListDeviceGroupsRequestTests.java | 25 - .../generated/OperationDisplayTests.java | 25 - .../sphere/generated/OperationInnerTests.java | 26 - .../generated/OperationListResultTests.java | 25 - .../generated/OperationsListMockTests.java | 64 - .../generated/PagedDeviceInsightTests.java | 70 - .../sphere/generated/ProductInnerTests.java | 28 - .../generated/ProductListResultTests.java | 35 - .../generated/ProductPropertiesTests.java | 27 - .../ProductUpdatePropertiesTests.java | 25 - .../sphere/generated/ProductUpdateTests.java | 25 - ...uctsCountDevicesWithResponseMockTests.java | 69 - .../ProductsCreateOrUpdateMockTests.java | 72 - .../generated/ProductsDeleteMockTests.java | 61 - ...sGenerateDefaultDeviceGroupsMockTests.java | 77 - .../ProductsGetWithResponseMockTests.java | 70 - .../ProductsListByCatalogMockTests.java | 68 - .../ProofOfPossessionNonceRequestTests.java | 25 - ...ofOfPossessionNonceResponseInnerTests.java | 25 - ...gnedCapabilityImageResponseInnerTests.java | 22 - 251 files changed, 6063 insertions(+), 14510 deletions(-) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/CatalogProperties.java (80%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/CertificateProperties.java (90%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/DeploymentProperties.java (90%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/DeviceGroupProperties.java (90%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/DeviceGroupUpdateProperties.java (87%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/DeviceProperties.java (93%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/DeviceUpdateProperties.java (85%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/ImageProperties.java (91%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/ProductProperties.java (80%) rename sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/{fluent => }/models/ProductUpdateProperties.java (85%) create mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/proxy-config.json create mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/reflect-config.json delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogPropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogUpdateTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateChainResponseInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ClaimDevicesRequestTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountDeviceResponseInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountElementsResponseTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentPropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupPropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdatePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdateTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInsightInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdatePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdateTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/GenerateCapabilityImageRequestTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ListDeviceGroupsRequestTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationDisplayTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationsListMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/PagedDeviceInsightTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductListResultTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductPropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdatePropertiesTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdateTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGetWithResponseMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogMockTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceRequestTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceResponseInnerTests.java delete mode 100644 sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/SignedCapabilityImageResponseInnerTests.java diff --git a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md index db7567eac8ac1..431638b0d5cb5 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md +++ b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2023-12-05) + +- Azure Resource Manager AzureSphere client library for Java. This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2022-09-01-preview. 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/sphere/azure-resourcemanager-sphere/README.md b/sdk/sphere/azure-resourcemanager-sphere/README.md index 2c270ea9f71a9..fc22b792a3328 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/README.md +++ b/sdk/sphere/azure-resourcemanager-sphere/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-sphere - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md index 5bf2b6bf9674a..98135998d92cb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md +++ b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md @@ -71,14 +71,16 @@ ### Catalogs_CountDevices ```java -/** Samples for Catalogs CountDevices. */ +/** + * Samples for Catalogs CountDevices. + */ public final class CatalogsCountDevicesSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesCatalog.json */ /** * Sample code: Catalogs_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -90,23 +92,20 @@ public final class CatalogsCountDevicesSamples { ### Catalogs_CreateOrUpdate ```java -/** Samples for Catalogs CreateOrUpdate. */ +/** + * Samples for Catalogs CreateOrUpdate. + */ public final class CatalogsCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutCatalog.json */ /** * Sample code: Catalogs_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .define("MyCatalog1") - .withRegion("global") - .withExistingResourceGroup("MyResourceGroup1") - .create(); + manager.catalogs().define("MyCatalog1").withRegion("global").withExistingResourceGroup("MyResourceGroup1").create(); } } ``` @@ -114,14 +113,16 @@ public final class CatalogsCreateOrUpdateSamples { ### Catalogs_Delete ```java -/** Samples for Catalogs Delete. */ +/** + * Samples for Catalogs Delete. + */ public final class CatalogsDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteCatalog.json */ /** * Sample code: Catalogs_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -133,20 +134,20 @@ public final class CatalogsDeleteSamples { ### Catalogs_GetByResourceGroup ```java -/** Samples for Catalogs GetByResourceGroup. */ +/** + * Samples for Catalogs GetByResourceGroup. + */ public final class CatalogsGetByResourceGroupSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalog.json */ /** * Sample code: Catalogs_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE); + manager.catalogs().getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE); } } ``` @@ -154,14 +155,16 @@ public final class CatalogsGetByResourceGroupSamples { ### Catalogs_List ```java -/** Samples for Catalogs List. */ +/** + * Samples for Catalogs List. + */ public final class CatalogsListSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsSub.json */ /** * Sample code: Catalogs_ListBySubscription. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListBySubscription(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -173,14 +176,16 @@ public final class CatalogsListSamples { ### Catalogs_ListByResourceGroup ```java -/** Samples for Catalogs ListByResourceGroup. */ +/** + * Samples for Catalogs ListByResourceGroup. + */ public final class CatalogsListByResourceGroupSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsRG.json */ /** * Sample code: Catalogs_ListByResourceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListByResourceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -192,21 +197,20 @@ public final class CatalogsListByResourceGroupSamples { ### Catalogs_ListDeployments ```java -/** Samples for Catalogs ListDeployments. */ +/** + * Samples for Catalogs ListDeployments. + */ public final class CatalogsListDeploymentsSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeploymentsByCatalog.json */ /** * Sample code: Catalogs_ListDeployments. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeployments(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeployments( - "MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDeployments("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -216,28 +220,20 @@ public final class CatalogsListDeploymentsSamples { ```java import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -/** Samples for Catalogs ListDeviceGroups. */ +/** + * Samples for Catalogs ListDeviceGroups. + */ public final class CatalogsListDeviceGroupsSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceGroupsCatalog.json */ /** * Sample code: Catalogs_ListDeviceGroups. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeviceGroups( - "MyResourceGroup1", - "MyCatalog1", - new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"), - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.catalogs().listDeviceGroups("MyResourceGroup1", "MyCatalog1", new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"), null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -245,21 +241,20 @@ public final class CatalogsListDeviceGroupsSamples { ### Catalogs_ListDeviceInsights ```java -/** Samples for Catalogs ListDeviceInsights. */ +/** + * Samples for Catalogs ListDeviceInsights. + */ public final class CatalogsListDeviceInsightsSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceInsightsCatalog.json */ /** * Sample code: Catalogs_ListDeviceInsights. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeviceInsights(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeviceInsights( - "MyResourceGroup1", "MyCatalog1", null, 10, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDeviceInsights("MyResourceGroup1", "MyCatalog1", null, 10, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -267,20 +262,20 @@ public final class CatalogsListDeviceInsightsSamples { ### Catalogs_ListDevices ```java -/** Samples for Catalogs ListDevices. */ +/** + * Samples for Catalogs ListDevices. + */ public final class CatalogsListDevicesSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDevicesByCatalog.json */ /** * Sample code: Catalogs_ListDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -290,22 +285,20 @@ public final class CatalogsListDevicesSamples { ```java import com.azure.resourcemanager.sphere.models.Catalog; -/** Samples for Catalogs Update. */ +/** + * Samples for Catalogs Update. + */ public final class CatalogsUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchCatalog.json */ /** * Sample code: Catalogs_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Catalog resource = - manager - .catalogs() - .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE) - .getValue(); + Catalog resource = manager.catalogs().getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } @@ -314,20 +307,20 @@ public final class CatalogsUpdateSamples { ### Certificates_Get ```java -/** Samples for Certificates Get. */ +/** + * Samples for Certificates Get. + */ public final class CertificatesGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificate.json */ /** * Sample code: Certificates_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "default", com.azure.core.util.Context.NONE); + manager.certificates().getWithResponse("MyResourceGroup1", "MyCatalog1", "default", com.azure.core.util.Context.NONE); } } ``` @@ -335,20 +328,20 @@ public final class CertificatesGetSamples { ### Certificates_ListByCatalog ```java -/** Samples for Certificates ListByCatalog. */ +/** + * Samples for Certificates ListByCatalog. + */ public final class CertificatesListByCatalogSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificates.json */ /** * Sample code: Certificates_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.certificates().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -356,21 +349,20 @@ public final class CertificatesListByCatalogSamples { ### Certificates_RetrieveCertChain ```java -/** Samples for Certificates RetrieveCertChain. */ +/** + * Samples for Certificates RetrieveCertChain. + */ public final class CertificatesRetrieveCertChainSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveCatalogCertChain.json */ /** * Sample code: Certificates_RetrieveCertChain. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesRetrieveCertChain(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .retrieveCertChainWithResponse( - "MyResourceGroup1", "MyCatalog1", "active", com.azure.core.util.Context.NONE); + manager.certificates().retrieveCertChainWithResponse("MyResourceGroup1", "MyCatalog1", "active", com.azure.core.util.Context.NONE); } } ``` @@ -380,26 +372,20 @@ public final class CertificatesRetrieveCertChainSamples { ```java import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; -/** Samples for Certificates RetrieveProofOfPossessionNonce. */ +/** + * Samples for Certificates RetrieveProofOfPossessionNonce. + */ public final class CertificatesRetrieveProofOfPossessionNonceSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveProofOfPossessionNonce.json */ /** * Sample code: Certificates_RetrieveProofOfPossessionNonce. - * + * * @param manager Entry point to AzureSphereManager. */ - public static void certificatesRetrieveProofOfPossessionNonce( - com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .retrieveProofOfPossessionNonceWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "active", - new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"), - com.azure.core.util.Context.NONE); + public static void certificatesRetrieveProofOfPossessionNonce(com.azure.resourcemanager.sphere.AzureSphereManager manager) { + manager.certificates().retrieveProofOfPossessionNonceWithResponse("MyResourceGroup1", "MyCatalog1", "active", new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"), com.azure.core.util.Context.NONE); } } ``` @@ -407,22 +393,20 @@ public final class CertificatesRetrieveProofOfPossessionNonceSamples { ### Deployments_CreateOrUpdate ```java -/** Samples for Deployments CreateOrUpdate. */ +/** + * Samples for Deployments CreateOrUpdate. + */ public final class DeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeployment.json */ /** * Sample code: Deployments_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .define("MyDeployment1") - .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1") - .create(); + manager.deployments().define("MyDeployment1").withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create(); } } ``` @@ -430,26 +414,20 @@ public final class DeploymentsCreateOrUpdateSamples { ### Deployments_Delete ```java -/** Samples for Deployments Delete. */ +/** + * Samples for Deployments Delete. + */ public final class DeploymentsDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeployment.json */ /** * Sample code: Deployments_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .delete( - "MyResourceGroup1", - "MyCatalog1", - "MyProductName1", - "DeviceGroupName1", - "MyDeploymentName1", - com.azure.core.util.Context.NONE); + manager.deployments().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", "MyDeploymentName1", com.azure.core.util.Context.NONE); } } ``` @@ -457,26 +435,20 @@ public final class DeploymentsDeleteSamples { ### Deployments_Get ```java -/** Samples for Deployments Get. */ +/** + * Samples for Deployments Get. + */ public final class DeploymentsGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployment.json */ /** * Sample code: Deployments_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "MyDeployment1", - com.azure.core.util.Context.NONE); + manager.deployments().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "MyDeployment1", com.azure.core.util.Context.NONE); } } ``` @@ -484,29 +456,20 @@ public final class DeploymentsGetSamples { ### Deployments_ListByDeviceGroup ```java -/** Samples for Deployments ListByDeviceGroup. */ +/** + * Samples for Deployments ListByDeviceGroup. + */ public final class DeploymentsListByDeviceGroupSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployments.json */ /** * Sample code: Deployments_ListByDeviceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .listByDeviceGroup( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.deployments().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -517,30 +480,20 @@ public final class DeploymentsListByDeviceGroupSamples { import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest; import java.util.Arrays; -/** Samples for DeviceGroups ClaimDevices. */ +/** + * Samples for DeviceGroups ClaimDevices. + */ public final class DeviceGroupsClaimDevicesSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostClaimDevices.json */ /** * Sample code: DeviceGroups_ClaimDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsClaimDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .claimDevices( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "MyDeviceGroup1", - new ClaimDevicesRequest() - .withDeviceIdentifiers( - Arrays - .asList( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")), - com.azure.core.util.Context.NONE); + manager.deviceGroups().claimDevices("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", new ClaimDevicesRequest().withDeviceIdentifiers(Arrays.asList("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")), com.azure.core.util.Context.NONE); } } ``` @@ -548,21 +501,20 @@ public final class DeviceGroupsClaimDevicesSamples { ### DeviceGroups_CountDevices ```java -/** Samples for DeviceGroups CountDevices. */ +/** + * Samples for DeviceGroups CountDevices. + */ public final class DeviceGroupsCountDevicesSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesDeviceGroup.json */ /** * Sample code: DeviceGroups_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .countDevicesWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -570,28 +522,25 @@ public final class DeviceGroupsCountDevicesSamples { ### DeviceGroups_CreateOrUpdate ```java +import com.azure.resourcemanager.sphere.models.DeviceGroupProperties; import com.azure.resourcemanager.sphere.models.OSFeedType; import com.azure.resourcemanager.sphere.models.UpdatePolicy; +import java.util.stream.Collectors; -/** Samples for DeviceGroups CreateOrUpdate. */ +/** + * Samples for DeviceGroups CreateOrUpdate. + */ public final class DeviceGroupsCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeviceGroup.json */ /** * Sample code: DeviceGroups_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .define("MyDeviceGroup1") - .withExistingProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1") - .withDescription("Description for MyDeviceGroup1") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.UPDATE_ALL) - .create(); + manager.deviceGroups().define("MyDeviceGroup1").withExistingProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1").withProperties(new DeviceGroupProperties().withDescription("Description for MyDeviceGroup1").withOsFeedType(OSFeedType.RETAIL).withUpdatePolicy(UpdatePolicy.UPDATE_ALL)).create(); } } ``` @@ -599,20 +548,20 @@ public final class DeviceGroupsCreateOrUpdateSamples { ### DeviceGroups_Delete ```java -/** Samples for DeviceGroups Delete. */ +/** + * Samples for DeviceGroups Delete. + */ public final class DeviceGroupsDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeviceGroup.json */ /** * Sample code: DeviceGroups_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -620,21 +569,20 @@ public final class DeviceGroupsDeleteSamples { ### DeviceGroups_Get ```java -/** Samples for DeviceGroups Get. */ +/** + * Samples for DeviceGroups Get. + */ public final class DeviceGroupsGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroup.json */ /** * Sample code: DeviceGroups_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .getWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -642,28 +590,20 @@ public final class DeviceGroupsGetSamples { ### DeviceGroups_ListByProduct ```java -/** Samples for DeviceGroups ListByProduct. */ +/** + * Samples for DeviceGroups ListByProduct. + */ public final class DeviceGroupsListByProductSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroups.json */ /** * Sample code: DeviceGroups_ListByProduct. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsListByProduct(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .listByProduct( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.deviceGroups().listByProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -673,23 +613,20 @@ public final class DeviceGroupsListByProductSamples { ```java import com.azure.resourcemanager.sphere.models.DeviceGroup; -/** Samples for DeviceGroups Update. */ +/** + * Samples for DeviceGroups Update. + */ public final class DeviceGroupsUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDeviceGroup.json */ /** * Sample code: DeviceGroups_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - DeviceGroup resource = - manager - .deviceGroups() - .getWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE) - .getValue(); + DeviceGroup resource = manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } @@ -698,23 +635,20 @@ public final class DeviceGroupsUpdateSamples { ### Devices_CreateOrUpdate ```java -/** Samples for Devices CreateOrUpdate. */ +/** + * Samples for Devices CreateOrUpdate. + */ public final class DevicesCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDevice.json */ /** * Sample code: Devices_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .define( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") - .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1") - .create(); + manager.devices().define("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000").withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create(); } } ``` @@ -722,26 +656,20 @@ public final class DevicesCreateOrUpdateSamples { ### Devices_Delete ```java -/** Samples for Devices Delete. */ +/** + * Samples for Devices Delete. + */ public final class DevicesDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDevice.json */ /** * Sample code: Devices_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .delete( - "MyResourceGroup1", - "MyCatalog1", - "MyProductName1", - "DeviceGroupName1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE); + manager.devices().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", com.azure.core.util.Context.NONE); } } ``` @@ -752,29 +680,22 @@ public final class DevicesDeleteSamples { import com.azure.resourcemanager.sphere.models.CapabilityType; import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for Devices GenerateCapabilityImage. */ +/** + * Samples for Devices GenerateCapabilityImage. + */ public final class DevicesGenerateCapabilityImageSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDeviceCapabilityImage.json */ /** * Sample code: Devices_GenerateCapabilityImage. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesGenerateCapabilityImage(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .generateCapabilityImage( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - new GenerateCapabilityImageRequest() - .withCapabilities(Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)), - com.azure.core.util.Context.NONE); + manager.devices().generateCapabilityImage("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", new GenerateCapabilityImageRequest().withCapabilities(Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)), com.azure.core.util.Context.NONE); } } ``` @@ -782,26 +703,20 @@ public final class DevicesGenerateCapabilityImageSamples { ### Devices_Get ```java -/** Samples for Devices Get. */ +/** + * Samples for Devices Get. + */ public final class DevicesGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevice.json */ /** * Sample code: Devices_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE); + manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", com.azure.core.util.Context.NONE); } } ``` @@ -809,21 +724,20 @@ public final class DevicesGetSamples { ### Devices_ListByDeviceGroup ```java -/** Samples for Devices ListByDeviceGroup. */ +/** + * Samples for Devices ListByDeviceGroup. + */ public final class DevicesListByDeviceGroupSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevices.json */ /** * Sample code: Devices_ListByDeviceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .listByDeviceGroup( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", com.azure.core.util.Context.NONE); + manager.devices().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -833,28 +747,20 @@ public final class DevicesListByDeviceGroupSamples { ```java import com.azure.resourcemanager.sphere.models.Device; -/** Samples for Devices Update. */ +/** + * Samples for Devices Update. + */ public final class DevicesUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDevice.json */ /** * Sample code: Devices_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Device resource = - manager - .devices() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "MyDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE) - .getValue(); + Device resource = manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } @@ -863,23 +769,22 @@ public final class DevicesUpdateSamples { ### Images_CreateOrUpdate ```java -/** Samples for Images CreateOrUpdate. */ +import com.azure.resourcemanager.sphere.models.ImageProperties; + +/** + * Samples for Images CreateOrUpdate. + */ public final class ImagesCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutImage.json */ /** * Sample code: Image_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imageCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .define("default") - .withExistingCatalog("MyResourceGroup1", "MyCatalog1") - .withImage("bXliYXNlNjRzdHJpbmc=") - .create(); + manager.images().define("default").withExistingCatalog("MyResourceGroup1", "MyCatalog1").withProperties(new ImageProperties().withImage("bXliYXNlNjRzdHJpbmc=")).create(); } } ``` @@ -887,14 +792,16 @@ public final class ImagesCreateOrUpdateSamples { ### Images_Delete ```java -/** Samples for Images Delete. */ +/** + * Samples for Images Delete. + */ public final class ImagesDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteImage.json */ /** * Sample code: Images_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -906,20 +813,20 @@ public final class ImagesDeleteSamples { ### Images_Get ```java -/** Samples for Images Get. */ +/** + * Samples for Images Get. + */ public final class ImagesGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImage.json */ /** * Sample code: Images_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "myImageId", com.azure.core.util.Context.NONE); + manager.images().getWithResponse("MyResourceGroup1", "MyCatalog1", "myImageId", com.azure.core.util.Context.NONE); } } ``` @@ -927,20 +834,20 @@ public final class ImagesGetSamples { ### Images_ListByCatalog ```java -/** Samples for Images ListByCatalog. */ +/** + * Samples for Images ListByCatalog. + */ public final class ImagesListByCatalogSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImages.json */ /** * Sample code: Images_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.images().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -948,14 +855,16 @@ public final class ImagesListByCatalogSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetOperations.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AzureSphereManager. */ public static void operationsList(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -967,20 +876,20 @@ public final class OperationsListSamples { ### Products_CountDevices ```java -/** Samples for Products CountDevices. */ +/** + * Samples for Products CountDevices. + */ public final class ProductsCountDevicesSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesProduct.json */ /** * Sample code: Products_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + manager.products().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); } } ``` @@ -988,14 +897,16 @@ public final class ProductsCountDevicesSamples { ### Products_CreateOrUpdate ```java -/** Samples for Products CreateOrUpdate. */ +/** + * Samples for Products CreateOrUpdate. + */ public final class ProductsCreateOrUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutProduct.json */ /** * Sample code: Products_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -1007,14 +918,16 @@ public final class ProductsCreateOrUpdateSamples { ### Products_Delete ```java -/** Samples for Products Delete. */ +/** + * Samples for Products Delete. + */ public final class ProductsDeleteSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteProduct.json */ /** * Sample code: Products_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -1026,22 +939,20 @@ public final class ProductsDeleteSamples { ### Products_GenerateDefaultDeviceGroups ```java -/** Samples for Products GenerateDefaultDeviceGroups. */ +/** + * Samples for Products GenerateDefaultDeviceGroups. + */ public final class ProductsGenerateDefaultDeviceGroupsSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDefaultDeviceGroups.json */ /** * Sample code: Products_GenerateDefaultDeviceGroups. - * + * * @param manager Entry point to AzureSphereManager. */ - public static void productsGenerateDefaultDeviceGroups( - com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .generateDefaultDeviceGroups( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + public static void productsGenerateDefaultDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) { + manager.products().generateDefaultDeviceGroups("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); } } ``` @@ -1049,20 +960,20 @@ public final class ProductsGenerateDefaultDeviceGroupsSamples { ### Products_Get ```java -/** Samples for Products Get. */ +/** + * Samples for Products Get. + */ public final class ProductsGetSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProduct.json */ /** * Sample code: Products_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + manager.products().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); } } ``` @@ -1070,14 +981,16 @@ public final class ProductsGetSamples { ### Products_ListByCatalog ```java -/** Samples for Products ListByCatalog. */ +/** + * Samples for Products ListByCatalog. + */ public final class ProductsListByCatalogSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProducts.json */ /** * Sample code: Products_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { @@ -1091,22 +1004,20 @@ public final class ProductsListByCatalogSamples { ```java import com.azure.resourcemanager.sphere.models.Product; -/** Samples for Products Update. */ +/** + * Samples for Products Update. + */ public final class ProductsUpdateSamples { /* * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchProduct.json */ /** * Sample code: Products_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Product resource = - manager - .products() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE) - .getValue(); + Product resource = manager.products().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/pom.xml b/sdk/sphere/azure-resourcemanager-sphere/pom.xml index bce25e18b5389..73e87ab6df792 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/pom.xml +++ b/sdk/sphere/azure-resourcemanager-sphere/pom.xml @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java index 6b49b7f12dc7d..fe5e3f2a87dc1 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java @@ -48,7 +48,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AzureSphereManager. Azure Sphere resource management API. */ +/** + * Entry point to AzureSphereManager. + * Azure Sphere resource management API. + */ public final class AzureSphereManager { private Operations operations; @@ -71,18 +74,14 @@ public final class AzureSphereManager { private AzureSphereManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AzureSphereManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AzureSphereManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of AzureSphere service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the AzureSphere service API instance. @@ -95,7 +94,7 @@ public static AzureSphereManager authenticate(TokenCredential credential, AzureP /** * Creates an instance of AzureSphere service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the AzureSphere service API instance. @@ -108,14 +107,16 @@ public static AzureSphereManager authenticate(HttpPipeline httpPipeline, AzurePr /** * Gets a Configurable instance that can be used to create AzureSphereManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AzureSphereManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -187,8 +188,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -205,8 +206,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -226,21 +227,12 @@ public AzureSphereManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.sphere") - .append("/") + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.sphere").append("/") .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -259,38 +251,25 @@ public AzureSphereManager authenticate(TokenCredential credential, AzureProfile policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new AzureSphereManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -302,7 +281,7 @@ public Operations operations() { /** * Gets the resource collection API of Catalogs. It manages Catalog. - * + * * @return Resource collection API of Catalogs. */ public Catalogs catalogs() { @@ -314,7 +293,7 @@ public Catalogs catalogs() { /** * Gets the resource collection API of Certificates. - * + * * @return Resource collection API of Certificates. */ public Certificates certificates() { @@ -326,7 +305,7 @@ public Certificates certificates() { /** * Gets the resource collection API of Images. It manages Image. - * + * * @return Resource collection API of Images. */ public Images images() { @@ -338,7 +317,7 @@ public Images images() { /** * Gets the resource collection API of Products. It manages Product. - * + * * @return Resource collection API of Products. */ public Products products() { @@ -350,7 +329,7 @@ public Products products() { /** * Gets the resource collection API of DeviceGroups. It manages DeviceGroup. - * + * * @return Resource collection API of DeviceGroups. */ public DeviceGroups deviceGroups() { @@ -362,7 +341,7 @@ public DeviceGroups deviceGroups() { /** * Gets the resource collection API of Deployments. It manages Deployment. - * + * * @return Resource collection API of Deployments. */ public Deployments deployments() { @@ -374,7 +353,7 @@ public Deployments deployments() { /** * Gets the resource collection API of Devices. It manages Device. - * + * * @return Resource collection API of Devices. */ public Devices devices() { @@ -385,8 +364,10 @@ public Devices devices() { } /** - * @return Wrapped service client AzureSphereManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client AzureSphereManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client AzureSphereManagementClient. */ public AzureSphereManagementClient serviceClient() { return this.clientObject; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java index 82f217261953a..d6197ad1708b8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java @@ -7,95 +7,97 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AzureSphereManagementClient class. */ +/** + * The interface for AzureSphereManagementClient class. + */ public interface AzureSphereManagementClient { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the CatalogsClient object to access its operations. - * + * * @return the CatalogsClient object. */ CatalogsClient getCatalogs(); /** * Gets the CertificatesClient object to access its operations. - * + * * @return the CertificatesClient object. */ CertificatesClient getCertificates(); /** * Gets the ImagesClient object to access its operations. - * + * * @return the ImagesClient object. */ ImagesClient getImages(); /** * Gets the ProductsClient object to access its operations. - * + * * @return the ProductsClient object. */ ProductsClient getProducts(); /** * Gets the DeviceGroupsClient object to access its operations. - * + * * @return the DeviceGroupsClient object. */ DeviceGroupsClient getDeviceGroups(); /** * Gets the DeploymentsClient object to access its operations. - * + * * @return the DeploymentsClient object. */ DeploymentsClient getDeployments(); /** * Gets the DevicesClient object to access its operations. - * + * * @return the DevicesClient object. */ DevicesClient getDevices(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java index b06050790d6c4..120e828de6ed1 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java @@ -20,11 +20,13 @@ import com.azure.resourcemanager.sphere.models.CatalogUpdate; import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -/** An instance of this class provides access to all the operations defined in CatalogsClient. */ +/** + * An instance of this class provides access to all the operations defined in CatalogsClient. + */ public interface CatalogsClient { /** * List Catalog resources by subscription ID. - * + * * @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 response of a Catalog list operation as paginated response with {@link PagedIterable}. @@ -34,7 +36,7 @@ public interface CatalogsClient { /** * List Catalog resources by subscription ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,7 +48,7 @@ public interface CatalogsClient { /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,7 +60,7 @@ public interface CatalogsClient { /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,7 +73,7 @@ public interface CatalogsClient { /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -81,12 +83,12 @@ public interface CatalogsClient { * @return a Catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String catalogName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName, + Context context); /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +101,7 @@ Response getByResourceGroupWithResponse( /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -109,12 +111,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CatalogInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, CatalogInner resource); + SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + CatalogInner resource); /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -125,12 +127,12 @@ SyncPoller, CatalogInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CatalogInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, CatalogInner resource, Context context); + SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + CatalogInner resource, Context context); /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -144,7 +146,7 @@ SyncPoller, CatalogInner> beginCreateOrUpdate( /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -159,7 +161,7 @@ SyncPoller, CatalogInner> beginCreateOrUpdate( /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -170,12 +172,12 @@ SyncPoller, CatalogInner> beginCreateOrUpdate( * @return an Azure Sphere catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String catalogName, CatalogUpdate properties, Context context); + Response updateWithResponse(String resourceGroupName, String catalogName, CatalogUpdate properties, + Context context); /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -189,7 +191,7 @@ Response updateWithResponse( /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,7 +204,7 @@ Response updateWithResponse( /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -216,7 +218,7 @@ Response updateWithResponse( /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,7 +230,7 @@ Response updateWithResponse( /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -241,7 +243,7 @@ Response updateWithResponse( /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -251,12 +253,12 @@ Response updateWithResponse( * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + Context context); /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,7 +271,7 @@ Response countDevicesWithResponse( /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,7 +284,7 @@ Response countDevicesWithResponse( /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -296,18 +298,12 @@ Response countDevicesWithResponse( * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDeployments( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDeployments(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context); /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -317,12 +313,12 @@ PagedIterable listDeployments( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDeviceGroups( - String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest); + PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest); /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -337,19 +333,13 @@ PagedIterable listDeviceGroups( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDeviceGroups( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +352,7 @@ PagedIterable listDeviceGroups( /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -376,18 +366,12 @@ PagedIterable listDeviceGroups( * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDeviceInsights( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDeviceInsights(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context); /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -400,7 +384,7 @@ PagedIterable listDeviceInsights( /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -414,12 +398,6 @@ PagedIterable listDeviceInsights( * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDevices( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDevices(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java index a25275cddf218..b76a551fcd5e8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner; import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in CertificatesClient. + */ public interface CertificatesClient { /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,7 +33,7 @@ public interface CertificatesClient { /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -45,18 +47,12 @@ public interface CertificatesClient { * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context); /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -67,12 +63,12 @@ PagedIterable listByCatalog( * @return a Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber, + Context context); /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -86,7 +82,7 @@ Response getWithResponse( /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -97,12 +93,12 @@ Response getWithResponse( * @return the certificate chain response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveCertChainWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context); + Response retrieveCertChainWithResponse(String resourceGroupName, String catalogName, + String serialNumber, Context context); /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -116,7 +112,7 @@ Response retrieveCertChainWithResponse( /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -128,16 +124,13 @@ Response retrieveCertChainWithResponse( * @return the proof of possession nonce along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveProofOfPossessionNonceWithResponse( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, + Response retrieveProofOfPossessionNonceWithResponse(String resourceGroupName, + String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, Context context); /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -148,9 +141,6 @@ Response retrieveProofOfPossessionNonceWith * @return the proof of possession nonce. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest); + ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(String resourceGroupName, String catalogName, + String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java index 0d59f94edfa18..c02caa703a712 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java @@ -13,12 +13,14 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner; -/** An instance of this class provides access to all the operations defined in DeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeploymentsClient. + */ public interface DeploymentsClient { /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -29,13 +31,13 @@ public interface DeploymentsClient { * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -51,27 +53,19 @@ PagedIterable listByDeviceGroup( * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDeviceGroup( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -79,47 +73,38 @@ PagedIterable listByDeviceGroup( * @return a Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context); /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentInner get( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + DeploymentInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName); /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -127,24 +112,20 @@ DeploymentInner get( * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, + SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource); /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,25 +134,20 @@ SyncPoller, DeploymentInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, + SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource, Context context); /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -179,24 +155,19 @@ SyncPoller, DeploymentInner> beginCreateOrUpdate( * @return an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource); + DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource); /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,48 +176,38 @@ DeploymentInner createOrUpdate( * @return an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, - Context context); + DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource, Context context); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -254,57 +215,43 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deploymentName, Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java index 4e210133bb5c0..71c64596db430 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java @@ -16,12 +16,14 @@ import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest; import com.azure.resourcemanager.sphere.models.DeviceGroupUpdate; -/** An instance of this class provides access to all the operations defined in DeviceGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeviceGroupsClient. + */ public interface DeviceGroupsClient { /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -36,7 +38,7 @@ public interface DeviceGroupsClient { /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -51,20 +53,13 @@ public interface DeviceGroupsClient { * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProduct( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -76,13 +71,13 @@ PagedIterable listByProduct( * @return a DeviceGroup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context); /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -98,7 +93,7 @@ Response getWithResponse( /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -110,17 +105,13 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource); + SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource); /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -133,18 +124,13 @@ SyncPoller, DeviceGroupInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context); + SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource, Context context); /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -156,17 +142,13 @@ SyncPoller, DeviceGroupInner> beginCreateOrUpdate( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceGroupInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource); + DeviceGroupInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource); /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -179,18 +161,13 @@ DeviceGroupInner createOrUpdate( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceGroupInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context); + DeviceGroupInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource, Context context); /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -202,17 +179,13 @@ DeviceGroupInner createOrUpdate( * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceGroupInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties); + SyncPoller, DeviceGroupInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, DeviceGroupUpdate properties); /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -225,18 +198,13 @@ SyncPoller, DeviceGroupInner> beginUpdate( * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceGroupInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context); + SyncPoller, DeviceGroupInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, DeviceGroupUpdate properties, Context context); /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -248,17 +216,13 @@ SyncPoller, DeviceGroupInner> beginUpdate( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceGroupInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + DeviceGroupInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, DeviceGroupUpdate properties); /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -271,18 +235,13 @@ DeviceGroupInner update( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceGroupInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context); + DeviceGroupInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + DeviceGroupUpdate properties, Context context); /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -293,13 +252,13 @@ DeviceGroupInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -311,13 +270,13 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context); /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -332,7 +291,7 @@ SyncPoller, Void> beginDelete( /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -343,13 +302,13 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + Context context); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -361,17 +320,13 @@ void delete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClaimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest); + SyncPoller, Void> beginClaimDevices(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -384,18 +339,13 @@ SyncPoller, Void> beginClaimDevices( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClaimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context); + SyncPoller, Void> beginClaimDevices(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest, Context context); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -406,17 +356,13 @@ SyncPoller, Void> beginClaimDevices( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -428,18 +374,13 @@ void claimDevices( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context); + void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + ClaimDevicesRequest claimDevicesRequest, Context context); /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -451,13 +392,13 @@ void claimDevices( * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context); /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -468,6 +409,6 @@ Response countDevicesWithResponse( * @return response to the action call for count devices in a catalog. */ @ServiceMethod(returns = ReturnType.SINGLE) - CountDeviceResponseInner countDevices( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java index b053aa5cadace..9e6322247bf44 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java @@ -16,12 +16,14 @@ import com.azure.resourcemanager.sphere.models.DeviceUpdate; import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; -/** An instance of this class provides access to all the operations defined in DevicesClient. */ +/** + * An instance of this class provides access to all the operations defined in DevicesClient. + */ public interface DevicesClient { /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -32,13 +34,13 @@ public interface DevicesClient { * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -50,13 +52,13 @@ PagedIterable listByDeviceGroup( * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context); /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -69,18 +71,13 @@ PagedIterable listByDeviceGroup( * @return a Device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context); /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -92,13 +89,13 @@ Response getWithResponse( * @return a Device. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner get( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName); + DeviceInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName); /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -111,18 +108,13 @@ DeviceInner get( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource); + SyncPoller, DeviceInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceInner resource); /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -136,19 +128,13 @@ SyncPoller, DeviceInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, - Context context); + SyncPoller, DeviceInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceInner resource, Context context); /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -161,18 +147,13 @@ SyncPoller, DeviceInner> beginCreateOrUpdate( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource); + DeviceInner createOrUpdate(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceInner resource); /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -186,19 +167,13 @@ DeviceInner createOrUpdate( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, - Context context); + DeviceInner createOrUpdate(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceInner resource, Context context); /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -211,18 +186,13 @@ DeviceInner createOrUpdate( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties); + SyncPoller, DeviceInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties); /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -236,19 +206,13 @@ SyncPoller, DeviceInner> beginUpdate( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeviceInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context); + SyncPoller, DeviceInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties, Context context); /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -261,18 +225,13 @@ SyncPoller, DeviceInner> beginUpdate( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties); + DeviceInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceUpdate properties); /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -286,18 +245,12 @@ DeviceInner update( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context); + DeviceInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceUpdate properties, Context context); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -309,12 +262,12 @@ DeviceInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -327,17 +280,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -348,12 +296,12 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -365,18 +313,13 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, Context context); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -390,18 +333,13 @@ void delete( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest); + beginGenerateCapabilityImage(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -416,19 +354,14 @@ void delete( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, + beginGenerateCapabilityImage(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -441,18 +374,14 @@ void delete( * @return signed device capability image response. */ @ServiceMethod(returns = ReturnType.SINGLE) - SignedCapabilityImageResponseInner generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + SignedCapabilityImageResponseInner generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -466,12 +395,7 @@ SignedCapabilityImageResponseInner generateCapabilityImage( * @return signed device capability image response. */ @ServiceMethod(returns = ReturnType.SINGLE) - SignedCapabilityImageResponseInner generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context); + SignedCapabilityImageResponseInner generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java index 205ceca662eb9..c071226298289 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -/** An instance of this class provides access to all the operations defined in ImagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ImagesClient. + */ public interface ImagesClient { /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface ImagesClient { /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -44,18 +46,12 @@ public interface ImagesClient { * @return the response of a Image list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -66,12 +62,12 @@ PagedIterable listByCatalog( * @return a Image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String catalogName, String imageName, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String imageName, + Context context); /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -85,7 +81,7 @@ Response getWithResponse( /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -96,12 +92,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ImageInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource); + SyncPoller, ImageInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String imageName, ImageInner resource); /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -113,12 +109,12 @@ SyncPoller, ImageInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ImageInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context); + SyncPoller, ImageInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String imageName, ImageInner resource, Context context); /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -133,7 +129,7 @@ SyncPoller, ImageInner> beginCreateOrUpdate( /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -145,12 +141,12 @@ SyncPoller, ImageInner> beginCreateOrUpdate( * @return an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImageInner createOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context); + ImageInner createOrUpdate(String resourceGroupName, String catalogName, String imageName, ImageInner resource, + Context context); /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -164,7 +160,7 @@ ImageInner createOrUpdate( /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -175,12 +171,12 @@ ImageInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String imageName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String imageName, + Context context); /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -193,7 +189,7 @@ SyncPoller, Void> beginDelete( /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java index 628bd10d47fca..fa904d1972694 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java index bcf5c9ad48259..4a7da9d45a9cf 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java @@ -16,11 +16,13 @@ import com.azure.resourcemanager.sphere.fluent.models.ProductInner; import com.azure.resourcemanager.sphere.models.ProductUpdate; -/** An instance of this class provides access to all the operations defined in ProductsClient. */ +/** + * An instance of this class provides access to all the operations defined in ProductsClient. + */ public interface ProductsClient { /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +35,7 @@ public interface ProductsClient { /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -47,7 +49,7 @@ public interface ProductsClient { /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -58,12 +60,12 @@ public interface ProductsClient { * @return a Product along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String catalogName, String productName, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + Context context); /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -88,12 +90,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProductInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource); + SyncPoller, ProductInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String productName, ProductInner resource); /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -105,12 +107,12 @@ SyncPoller, ProductInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProductInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context); + SyncPoller, ProductInner> beginCreateOrUpdate(String resourceGroupName, String catalogName, + String productName, ProductInner resource, Context context); /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -121,12 +123,12 @@ SyncPoller, ProductInner> beginCreateOrUpdate( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner createOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource); + ProductInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + ProductInner resource); /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -138,12 +140,12 @@ ProductInner createOrUpdate( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner createOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context); + ProductInner createOrUpdate(String resourceGroupName, String catalogName, String productName, ProductInner resource, + Context context); /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -154,12 +156,12 @@ ProductInner createOrUpdate( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProductInner> beginUpdate( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties); + SyncPoller, ProductInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties); /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -171,12 +173,12 @@ SyncPoller, ProductInner> beginUpdate( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProductInner> beginUpdate( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context); + SyncPoller, ProductInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties, Context context); /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -191,7 +193,7 @@ SyncPoller, ProductInner> beginUpdate( /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -203,12 +205,12 @@ SyncPoller, ProductInner> beginUpdate( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProductInner update( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context); + ProductInner update(String resourceGroupName, String catalogName, String productName, ProductUpdate properties, + Context context); /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -222,7 +224,7 @@ ProductInner update( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -233,12 +235,12 @@ ProductInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName, + Context context); /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -251,7 +253,7 @@ SyncPoller, Void> beginDelete( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -266,7 +268,7 @@ SyncPoller, Void> beginDelete( /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -277,13 +279,13 @@ SyncPoller, Void> beginDelete( * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, Context context); /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -298,7 +300,7 @@ Response countDevicesWithResponse( /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -308,13 +310,13 @@ Response countDevicesWithResponse( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName); + PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName); /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -325,6 +327,6 @@ PagedIterable generateDefaultDeviceGroups( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName, Context context); + PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName, Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java index a639e4b67f15c..ccedd272070fc 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java @@ -7,18 +7,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.resourcemanager.sphere.models.CatalogProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An Azure Sphere catalog. */ +/** + * An Azure Sphere catalog. + */ @Fluent public final class CatalogInner extends Resource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private CatalogProperties innerProperties; + private CatalogProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -26,59 +28,67 @@ public final class CatalogInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CatalogInner class. */ + /** + * Creates an instance of CatalogInner class. + */ public CatalogInner() { } /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CatalogProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CatalogInner object itself. */ - private CatalogProperties innerProperties() { - return this.innerProperties; + public CatalogInner withProperties(CatalogProperties properties) { + this.properties = properties; + return this; } /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CatalogInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CatalogInner withTags(Map tags) { super.withTags(tags); return this; } - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java index e5e299011709c..645198a6ac0db 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The certificate chain response. */ +/** + * The certificate chain response. + */ @Immutable public final class CertificateChainResponseInner { /* @@ -16,13 +18,15 @@ public final class CertificateChainResponseInner { @JsonProperty(value = "certificateChain", access = JsonProperty.Access.WRITE_ONLY) private String certificateChain; - /** Creates an instance of CertificateChainResponseInner class. */ + /** + * Creates an instance of CertificateChainResponseInner class. + */ public CertificateChainResponseInner() { } /** * Get the certificateChain property: The certificate chain. - * + * * @return the certificateChain value. */ public String certificateChain() { @@ -31,7 +35,7 @@ public String certificateChain() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java index 9f50de6cf610b..8cb6c15c3e929 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java @@ -4,22 +4,22 @@ package com.azure.resourcemanager.sphere.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.sphere.models.CertificateStatus; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.resourcemanager.sphere.models.CertificateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -/** An certificate resource belonging to a catalog resource. */ -@Immutable +/** + * An certificate resource belonging to a catalog resource. + */ +@Fluent public final class CertificateInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private CertificateProperties innerProperties; + private CertificateProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -27,99 +27,49 @@ public final class CertificateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CertificateInner class. */ - public CertificateInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private CertificateProperties 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 certificate property: The certificate as a UTF-8 encoded base 64 string. - * - * @return the certificate value. - */ - public String certificate() { - return this.innerProperties() == null ? null : this.innerProperties().certificate(); - } - - /** - * Get the status property: The certificate status. - * - * @return the status value. - */ - public CertificateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the subject property: The certificate subject. - * - * @return the subject value. - */ - public String subject() { - return this.innerProperties() == null ? null : this.innerProperties().subject(); - } - /** - * Get the thumbprint property: The certificate thumbprint. - * - * @return the thumbprint value. + * Creates an instance of CertificateInner class. */ - public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + public CertificateInner() { } /** - * Get the expiryUtc property: The certificate expiry date. - * - * @return the expiryUtc value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public OffsetDateTime expiryUtc() { - return this.innerProperties() == null ? null : this.innerProperties().expiryUtc(); + public CertificateProperties properties() { + return this.properties; } /** - * Get the notBeforeUtc property: The certificate not before date. - * - * @return the notBeforeUtc value. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CertificateInner object itself. */ - public OffsetDateTime notBeforeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().notBeforeUtc(); + public CertificateInner withProperties(CertificateProperties properties) { + this.properties = properties; + return this; } /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java index 80c30909e9da4..75aa043ba58eb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java @@ -7,14 +7,20 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.sphere.models.CountElementsResponse; -/** Response to the action call for count devices in a catalog. */ +/** + * Response to the action call for count devices in a catalog. + */ @Fluent public final class CountDeviceResponseInner extends CountElementsResponse { - /** Creates an instance of CountDeviceResponseInner class. */ + /** + * Creates an instance of CountDeviceResponseInner class. + */ public CountDeviceResponseInner() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CountDeviceResponseInner withValue(int value) { super.withValue(value); @@ -23,7 +29,7 @@ public CountDeviceResponseInner withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java index ed70be5ad59c9..cc20d198b15b6 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java @@ -6,105 +6,70 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.sphere.models.DeploymentProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -/** An deployment resource belonging to a device group resource. */ +/** + * An deployment resource belonging to a device group resource. + */ @Fluent public final class DeploymentInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private DeploymentProperties innerProperties; + private DeploymentProperties properties; - /** Creates an instance of DeploymentInner class. */ - public DeploymentInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private DeploymentProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the deploymentId property: Deployment ID. - * - * @return the deploymentId value. + * Creates an instance of DeploymentInner class. */ - public String deploymentId() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentId(); - } - - /** - * Set the deploymentId property: Deployment ID. - * - * @param deploymentId the deploymentId value to set. - * @return the DeploymentInner object itself. - */ - public DeploymentInner withDeploymentId(String deploymentId) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentProperties(); - } - this.innerProperties().withDeploymentId(deploymentId); - return this; + public DeploymentInner() { } /** - * Get the deployedImages property: Images deployed. - * - * @return the deployedImages value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public List deployedImages() { - return this.innerProperties() == null ? null : this.innerProperties().deployedImages(); + public DeploymentProperties properties() { + return this.properties; } /** - * Set the deployedImages property: Images deployed. - * - * @param deployedImages the deployedImages value to set. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. * @return the DeploymentInner object itself. */ - public DeploymentInner withDeployedImages(List deployedImages) { - if (this.innerProperties() == null) { - this.innerProperties = new DeploymentProperties(); - } - this.innerProperties().withDeployedImages(deployedImages); + public DeploymentInner withProperties(DeploymentProperties properties) { + this.properties = properties; return this; } /** - * Get the deploymentDateUtc property: Deployment date UTC. - * - * @return the deploymentDateUtc value. - */ - public OffsetDateTime deploymentDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentDateUtc(); - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java index c09d49d6624ea..5bce6f135bb14 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java @@ -6,176 +6,70 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.sphere.models.DeviceGroupProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** An device group resource belonging to a product resource. */ +/** + * An device group resource belonging to a product resource. + */ @Fluent public final class DeviceGroupInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private DeviceGroupProperties innerProperties; + private DeviceGroupProperties properties; - /** Creates an instance of DeviceGroupInner class. */ - public DeviceGroupInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private DeviceGroupProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the description property: Description of the device group. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Description of the device group. - * - * @param description the description value to set. - * @return the DeviceGroupInner object itself. - */ - public DeviceGroupInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the osFeedType property: Operating system feed type of the device group. - * - * @return the osFeedType value. - */ - public OSFeedType osFeedType() { - return this.innerProperties() == null ? null : this.innerProperties().osFeedType(); - } - - /** - * Set the osFeedType property: Operating system feed type of the device group. - * - * @param osFeedType the osFeedType value to set. - * @return the DeviceGroupInner object itself. - */ - public DeviceGroupInner withOsFeedType(OSFeedType osFeedType) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupProperties(); - } - this.innerProperties().withOsFeedType(osFeedType); - return this; - } - - /** - * Get the updatePolicy property: Update policy of the device group. - * - * @return the updatePolicy value. - */ - public UpdatePolicy updatePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().updatePolicy(); - } - - /** - * Set the updatePolicy property: Update policy of the device group. - * - * @param updatePolicy the updatePolicy value to set. - * @return the DeviceGroupInner object itself. - */ - public DeviceGroupInner withUpdatePolicy(UpdatePolicy updatePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupProperties(); - } - this.innerProperties().withUpdatePolicy(updatePolicy); - return this; - } - - /** - * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * - * @return the allowCrashDumpsCollection value. + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - public AllowCrashDumpCollection allowCrashDumpsCollection() { - return this.innerProperties() == null ? null : this.innerProperties().allowCrashDumpsCollection(); - } + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * - * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set. - * @return the DeviceGroupInner object itself. + * Creates an instance of DeviceGroupInner class. */ - public DeviceGroupInner withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupProperties(); - } - this.innerProperties().withAllowCrashDumpsCollection(allowCrashDumpsCollection); - return this; + public DeviceGroupInner() { } /** - * Get the regionalDataBoundary property: Regional data boundary for the device group. - * - * @return the regionalDataBoundary value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public RegionalDataBoundary regionalDataBoundary() { - return this.innerProperties() == null ? null : this.innerProperties().regionalDataBoundary(); + public DeviceGroupProperties properties() { + return this.properties; } /** - * Set the regionalDataBoundary property: Regional data boundary for the device group. - * - * @param regionalDataBoundary the regionalDataBoundary value to set. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. * @return the DeviceGroupInner object itself. */ - public DeviceGroupInner withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupProperties(); - } - this.innerProperties().withRegionalDataBoundary(regionalDataBoundary); + public DeviceGroupInner withProperties(DeviceGroupProperties properties) { + this.properties = properties; return this; } /** - * Get the hasDeployment property: Deployment status for the device group. - * - * @return the hasDeployment value. - */ - public Boolean hasDeployment() { - return this.innerProperties() == null ? null : this.innerProperties().hasDeployment(); - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java index 4d6a8dfe174b8..5e37559821520 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java @@ -6,117 +6,70 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.sphere.models.DeviceProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -/** An device resource belonging to a device group resource. */ +/** + * An device resource belonging to a device group resource. + */ @Fluent public final class DeviceInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private DeviceProperties innerProperties; + private DeviceProperties properties; - /** Creates an instance of DeviceInner class. */ - public DeviceInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. + * Creates an instance of DeviceInner class. */ - private DeviceProperties innerProperties() { - return this.innerProperties; + public DeviceInner() { } /** - * Get the deviceId property: Device ID. - * - * @return the deviceId value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public String deviceId() { - return this.innerProperties() == null ? null : this.innerProperties().deviceId(); + public DeviceProperties properties() { + return this.properties; } /** - * Set the deviceId property: Device ID. - * - * @param deviceId the deviceId value to set. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. * @return the DeviceInner object itself. */ - public DeviceInner withDeviceId(String deviceId) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceProperties(); - } - this.innerProperties().withDeviceId(deviceId); + public DeviceInner withProperties(DeviceProperties properties) { + this.properties = properties; return this; } /** - * Get the chipSku property: SKU of the chip. - * - * @return the chipSku value. - */ - public String chipSku() { - return this.innerProperties() == null ? null : this.innerProperties().chipSku(); - } - - /** - * Get the lastAvailableOsVersion property: OS version available for installation when update requested. - * - * @return the lastAvailableOsVersion value. - */ - public String lastAvailableOsVersion() { - return this.innerProperties() == null ? null : this.innerProperties().lastAvailableOsVersion(); - } - - /** - * Get the lastInstalledOsVersion property: OS version running on device when update requested. - * - * @return the lastInstalledOsVersion value. - */ - public String lastInstalledOsVersion() { - return this.innerProperties() == null ? null : this.innerProperties().lastInstalledOsVersion(); - } - - /** - * Get the lastOsUpdateUtc property: Time when update requested and new OS version available. - * - * @return the lastOsUpdateUtc value. - */ - public OffsetDateTime lastOsUpdateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastOsUpdateUtc(); - } - - /** - * Get the lastUpdateRequestUtc property: Time when update was last requested. - * - * @return the lastUpdateRequestUtc value. - */ - public OffsetDateTime lastUpdateRequestUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdateRequestUtc(); - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java index 4290335b8721a..26e8172ee6491 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Device insight report. */ +/** + * Device insight report. + */ @Fluent public final class DeviceInsightInner { /* @@ -60,13 +62,15 @@ public final class DeviceInsightInner { @JsonProperty(value = "eventCount", required = true) private int eventCount; - /** Creates an instance of DeviceInsightInner class. */ + /** + * Creates an instance of DeviceInsightInner class. + */ public DeviceInsightInner() { } /** * Get the deviceId property: Device ID. - * + * * @return the deviceId value. */ public String deviceId() { @@ -75,7 +79,7 @@ public String deviceId() { /** * Set the deviceId property: Device ID. - * + * * @param deviceId the deviceId value to set. * @return the DeviceInsightInner object itself. */ @@ -86,7 +90,7 @@ public DeviceInsightInner withDeviceId(String deviceId) { /** * Get the description property: Event description. - * + * * @return the description value. */ public String description() { @@ -95,7 +99,7 @@ public String description() { /** * Set the description property: Event description. - * + * * @param description the description value to set. * @return the DeviceInsightInner object itself. */ @@ -106,7 +110,7 @@ public DeviceInsightInner withDescription(String description) { /** * Get the startTimestampUtc property: Event start timestamp. - * + * * @return the startTimestampUtc value. */ public OffsetDateTime startTimestampUtc() { @@ -115,7 +119,7 @@ public OffsetDateTime startTimestampUtc() { /** * Set the startTimestampUtc property: Event start timestamp. - * + * * @param startTimestampUtc the startTimestampUtc value to set. * @return the DeviceInsightInner object itself. */ @@ -126,7 +130,7 @@ public DeviceInsightInner withStartTimestampUtc(OffsetDateTime startTimestampUtc /** * Get the endTimestampUtc property: Event end timestamp. - * + * * @return the endTimestampUtc value. */ public OffsetDateTime endTimestampUtc() { @@ -135,7 +139,7 @@ public OffsetDateTime endTimestampUtc() { /** * Set the endTimestampUtc property: Event end timestamp. - * + * * @param endTimestampUtc the endTimestampUtc value to set. * @return the DeviceInsightInner object itself. */ @@ -146,7 +150,7 @@ public DeviceInsightInner withEndTimestampUtc(OffsetDateTime endTimestampUtc) { /** * Get the eventCategory property: Event category. - * + * * @return the eventCategory value. */ public String eventCategory() { @@ -155,7 +159,7 @@ public String eventCategory() { /** * Set the eventCategory property: Event category. - * + * * @param eventCategory the eventCategory value to set. * @return the DeviceInsightInner object itself. */ @@ -166,7 +170,7 @@ public DeviceInsightInner withEventCategory(String eventCategory) { /** * Get the eventClass property: Event class. - * + * * @return the eventClass value. */ public String eventClass() { @@ -175,7 +179,7 @@ public String eventClass() { /** * Set the eventClass property: Event class. - * + * * @param eventClass the eventClass value to set. * @return the DeviceInsightInner object itself. */ @@ -186,7 +190,7 @@ public DeviceInsightInner withEventClass(String eventClass) { /** * Get the eventType property: Event type. - * + * * @return the eventType value. */ public String eventType() { @@ -195,7 +199,7 @@ public String eventType() { /** * Set the eventType property: Event type. - * + * * @param eventType the eventType value to set. * @return the DeviceInsightInner object itself. */ @@ -206,7 +210,7 @@ public DeviceInsightInner withEventType(String eventType) { /** * Get the eventCount property: Event count. - * + * * @return the eventCount value. */ public int eventCount() { @@ -215,7 +219,7 @@ public int eventCount() { /** * Set the eventCount property: Event count. - * + * * @param eventCount the eventCount value to set. * @return the DeviceInsightInner object itself. */ @@ -226,47 +230,37 @@ public DeviceInsightInner withEventCount(int eventCount) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (deviceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property deviceId in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property deviceId in model DeviceInsightInner")); } if (description() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property description in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property description in model DeviceInsightInner")); } if (startTimestampUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimestampUtc in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property startTimestampUtc in model DeviceInsightInner")); } if (endTimestampUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTimestampUtc in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property endTimestampUtc in model DeviceInsightInner")); } if (eventCategory() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property eventCategory in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property eventCategory in model DeviceInsightInner")); } if (eventClass() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property eventClass in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property eventClass in model DeviceInsightInner")); } if (eventType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property eventType in model DeviceInsightInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property eventType in model DeviceInsightInner")); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java index 7f5a89784b1f0..d7bb5032b0f7a 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java @@ -6,166 +6,70 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.sphere.models.ImageType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.sphere.models.ImageProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** An image resource belonging to a catalog resource. */ +/** + * An image resource belonging to a catalog resource. + */ @Fluent public final class ImageInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private ImageProperties innerProperties; + private ImageProperties properties; - /** Creates an instance of ImageInner class. */ - public ImageInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private ImageProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image - * URI on image reads. - * - * @return the image value. - */ - public String image() { - return this.innerProperties() == null ? null : this.innerProperties().image(); - } - - /** - * Set the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image - * URI on image reads. - * - * @param image the image value to set. - * @return the ImageInner object itself. - */ - public ImageInner withImage(String image) { - if (this.innerProperties() == null) { - this.innerProperties = new ImageProperties(); - } - this.innerProperties().withImage(image); - return this; - } - - /** - * Get the imageId property: Image ID. - * - * @return the imageId value. - */ - public String imageId() { - return this.innerProperties() == null ? null : this.innerProperties().imageId(); - } - - /** - * Set the imageId property: Image ID. - * - * @param imageId the imageId value to set. - * @return the ImageInner object itself. + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - public ImageInner withImageId(String imageId) { - if (this.innerProperties() == null) { - this.innerProperties = new ImageProperties(); - } - this.innerProperties().withImageId(imageId); - return this; - } + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the imageName property: Image name. - * - * @return the imageName value. + * Creates an instance of ImageInner class. */ - public String imageName() { - return this.innerProperties() == null ? null : this.innerProperties().imageName(); + public ImageInner() { } /** - * Get the regionalDataBoundary property: Regional data boundary for an image. - * - * @return the regionalDataBoundary value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public RegionalDataBoundary regionalDataBoundary() { - return this.innerProperties() == null ? null : this.innerProperties().regionalDataBoundary(); + public ImageProperties properties() { + return this.properties; } /** - * Set the regionalDataBoundary property: Regional data boundary for an image. - * - * @param regionalDataBoundary the regionalDataBoundary value to set. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. * @return the ImageInner object itself. */ - public ImageInner withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) { - if (this.innerProperties() == null) { - this.innerProperties = new ImageProperties(); - } - this.innerProperties().withRegionalDataBoundary(regionalDataBoundary); + public ImageInner withProperties(ImageProperties properties) { + this.properties = properties; return this; } /** - * Get the uri property: Location the image. - * - * @return the uri value. - */ - public String uri() { - return this.innerProperties() == null ? null : this.innerProperties().uri(); - } - - /** - * Get the description property: The image description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the componentId property: The image component id. - * - * @return the componentId value. - */ - public String componentId() { - return this.innerProperties() == null ? null : this.innerProperties().componentId(); - } - - /** - * Get the imageType property: The image type. - * - * @return the imageType value. - */ - public ImageType imageType() { - return this.innerProperties() == null ? null : this.innerProperties().imageType(); - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java index 239055d7f0702..dfc05b47ebf82 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java @@ -12,8 +12,8 @@ /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { @@ -50,14 +50,16 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +118,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java index c5a3f9cc1d70a..a4bb450d3b9a4 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java @@ -6,71 +6,70 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.sphere.models.ProductProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** An product resource belonging to a catalog resource. */ +/** + * An product resource belonging to a catalog resource. + */ @Fluent public final class ProductInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private ProductProperties innerProperties; + private ProductProperties properties; - /** Creates an instance of ProductInner class. */ - public ProductInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. + * Creates an instance of ProductInner class. */ - private ProductProperties innerProperties() { - return this.innerProperties; + public ProductInner() { } /** - * Get the description property: Description of the product. - * - * @return the description value. + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public ProductProperties properties() { + return this.properties; } /** - * Set the description property: Description of the product. - * - * @param description the description value to set. + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. * @return the ProductInner object itself. */ - public ProductInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ProductProperties(); - } - this.innerProperties().withDescription(description); + public ProductInner withProperties(ProductProperties properties) { + this.properties = properties; return this; } /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public SystemData systemData() { + return this.systemData; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java index ee5f94ce18c2f..a1582786030f5 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java @@ -5,17 +5,22 @@ package com.azure.resourcemanager.sphere.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.sphere.models.CertificateProperties; -/** Result of the action to generate a proof of possession nonce. */ +/** + * Result of the action to generate a proof of possession nonce. + */ @Immutable public final class ProofOfPossessionNonceResponseInner extends CertificateProperties { - /** Creates an instance of ProofOfPossessionNonceResponseInner class. */ + /** + * Creates an instance of ProofOfPossessionNonceResponseInner class. + */ public ProofOfPossessionNonceResponseInner() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java index 1822b0e457228..e493a98d9a8e7 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Signed device capability image response. */ +/** + * Signed device capability image response. + */ @Immutable public final class SignedCapabilityImageResponseInner { /* @@ -16,13 +18,15 @@ public final class SignedCapabilityImageResponseInner { @JsonProperty(value = "image", access = JsonProperty.Access.WRITE_ONLY) private String image; - /** Creates an instance of SignedCapabilityImageResponseInner class. */ + /** + * Creates an instance of SignedCapabilityImageResponseInner class. + */ public SignedCapabilityImageResponseInner() { } /** * Get the image property: The signed device capability image as a UTF-8 encoded base 64 string. - * + * * @return the image value. */ public String image() { @@ -31,7 +35,7 @@ public String image() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java index 6c295b60279c0..282d5be0e6b81 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for AzureSphereManagementClient. Azure Sphere resource management API. */ +/** + * Package containing the inner data models for AzureSphereManagementClient. + * Azure Sphere resource management API. + */ package com.azure.resourcemanager.sphere.fluent.models; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java index 9853cc0ca23a1..4690f89ececb5 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for AzureSphereManagementClient. Azure Sphere resource management API. */ +/** + * Package containing the service clients for AzureSphereManagementClient. + * Azure Sphere resource management API. + */ package com.azure.resourcemanager.sphere.fluent; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java index 6f5c108a3bba2..18072266d45b5 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AzureSphereManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureSphereManagementClientImpl.class}) +/** + * A builder for creating a new instance of the AzureSphereManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AzureSphereManagementClientImpl.class }) public final class AzureSphereManagementClientBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class AzureSphereManagementClientBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the AzureSphereManagementClientBuilder. */ @@ -40,7 +42,7 @@ public AzureSphereManagementClientBuilder subscriptionId(String subscriptionId) /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the AzureSphereManagementClientBuilder. */ @@ -56,7 +58,7 @@ public AzureSphereManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the AzureSphereManagementClientBuilder. */ @@ -72,7 +74,7 @@ public AzureSphereManagementClientBuilder environment(AzureEnvironment environme /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the AzureSphereManagementClientBuilder. */ @@ -88,7 +90,7 @@ public AzureSphereManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the AzureSphereManagementClientBuilder. */ @@ -104,7 +106,7 @@ public AzureSphereManagementClientBuilder defaultPollInterval(Duration defaultPo /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureSphereManagementClientBuilder. */ @@ -115,30 +117,20 @@ public AzureSphereManagementClientBuilder serializerAdapter(SerializerAdapter se /** * Builds an instance of AzureSphereManagementClientImpl with the provided parameters. - * + * * @return an instance of AzureSphereManagementClientImpl. */ public AzureSphereManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureSphereManagementClientImpl client = - new AzureSphereManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AzureSphereManagementClientImpl client = new AzureSphereManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java index 251919142566f..dc35fc2688cc1 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java @@ -40,171 +40,201 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureSphereManagementClientImpl type. */ +/** + * Initializes a new instance of the AzureSphereManagementClientImpl type. + */ @ServiceClient(builder = AzureSphereManagementClientBuilder.class) public final class AzureSphereManagementClientImpl implements AzureSphereManagementClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The CatalogsClient object to access its operations. */ + /** + * The CatalogsClient object to access its operations. + */ private final CatalogsClient catalogs; /** * Gets the CatalogsClient object to access its operations. - * + * * @return the CatalogsClient object. */ public CatalogsClient getCatalogs() { return this.catalogs; } - /** The CertificatesClient object to access its operations. */ + /** + * The CertificatesClient object to access its operations. + */ private final CertificatesClient certificates; /** * Gets the CertificatesClient object to access its operations. - * + * * @return the CertificatesClient object. */ public CertificatesClient getCertificates() { return this.certificates; } - /** The ImagesClient object to access its operations. */ + /** + * The ImagesClient object to access its operations. + */ private final ImagesClient images; /** * Gets the ImagesClient object to access its operations. - * + * * @return the ImagesClient object. */ public ImagesClient getImages() { return this.images; } - /** The ProductsClient object to access its operations. */ + /** + * The ProductsClient object to access its operations. + */ private final ProductsClient products; /** * Gets the ProductsClient object to access its operations. - * + * * @return the ProductsClient object. */ public ProductsClient getProducts() { return this.products; } - /** The DeviceGroupsClient object to access its operations. */ + /** + * The DeviceGroupsClient object to access its operations. + */ private final DeviceGroupsClient deviceGroups; /** * Gets the DeviceGroupsClient object to access its operations. - * + * * @return the DeviceGroupsClient object. */ public DeviceGroupsClient getDeviceGroups() { return this.deviceGroups; } - /** The DeploymentsClient object to access its operations. */ + /** + * The DeploymentsClient object to access its operations. + */ private final DeploymentsClient deployments; /** * Gets the DeploymentsClient object to access its operations. - * + * * @return the DeploymentsClient object. */ public DeploymentsClient getDeployments() { return this.deployments; } - /** The DevicesClient object to access its operations. */ + /** + * The DevicesClient object to access its operations. + */ private final DevicesClient devices; /** * Gets the DevicesClient object to access its operations. - * + * * @return the DevicesClient object. */ public DevicesClient getDevices() { @@ -213,7 +243,7 @@ public DevicesClient getDevices() { /** * Initializes an instance of AzureSphereManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -221,13 +251,8 @@ public DevicesClient getDevices() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - AzureSphereManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + AzureSphereManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; @@ -246,7 +271,7 @@ public DevicesClient getDevices() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -255,7 +280,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -265,7 +290,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -275,26 +300,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -307,19 +321,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java index e36df7131263a..fc87826811d00 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.CatalogInner; import com.azure.resourcemanager.sphere.models.Catalog; +import com.azure.resourcemanager.sphere.models.CatalogProperties; import com.azure.resourcemanager.sphere.models.CatalogUpdate; import com.azure.resourcemanager.sphere.models.CountDeviceResponse; import com.azure.resourcemanager.sphere.models.Deployment; @@ -18,7 +19,6 @@ import com.azure.resourcemanager.sphere.models.DeviceGroup; import com.azure.resourcemanager.sphere.models.DeviceInsight; import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import java.util.Collections; import java.util.Map; @@ -52,12 +52,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); + public CatalogProperties properties() { + return this.innerModel().properties(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -92,20 +92,14 @@ public CatalogImpl withExistingResourceGroup(String resourceGroupName) { } public Catalog create() { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .createOrUpdate(resourceGroupName, catalogName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getCatalogs().createOrUpdate(resourceGroupName, catalogName, + this.innerModel(), Context.NONE); return this; } public Catalog create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .createOrUpdate(resourceGroupName, catalogName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getCatalogs().createOrUpdate(resourceGroupName, catalogName, + this.innerModel(), context); return this; } @@ -121,22 +115,14 @@ public CatalogImpl update() { } public Catalog apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .updateWithResponse(resourceGroupName, catalogName, updateProperties, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCatalogs() + .updateWithResponse(resourceGroupName, catalogName, updateProperties, Context.NONE).getValue(); return this; } public Catalog apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .updateWithResponse(resourceGroupName, catalogName, updateProperties, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCatalogs() + .updateWithResponse(resourceGroupName, catalogName, updateProperties, context).getValue(); return this; } @@ -148,22 +134,14 @@ public Catalog apply(Context context) { } public Catalog refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCatalogs() + .getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE).getValue(); return this; } public Catalog refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCatalogs() - .getByResourceGroupWithResponse(resourceGroupName, catalogName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCatalogs() + .getByResourceGroupWithResponse(resourceGroupName, catalogName, context).getValue(); return this; } @@ -179,50 +157,40 @@ public PagedIterable listDeployments() { return serviceManager.catalogs().listDeployments(resourceGroupName, catalogName); } - public PagedIterable listDeployments( - String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return serviceManager - .catalogs() - .listDeployments(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDeployments(String filter, Integer top, Integer skip, Integer maxpagesize, + Context context) { + return serviceManager.catalogs().listDeployments(resourceGroupName, catalogName, filter, top, skip, maxpagesize, + context); } public PagedIterable listDeviceGroups(ListDeviceGroupsRequest listDeviceGroupsRequest) { return serviceManager.catalogs().listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest); } - public PagedIterable listDeviceGroups( - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - return serviceManager - .catalogs() - .listDeviceGroups( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context); + public PagedIterable listDeviceGroups(ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { + return serviceManager.catalogs().listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest, + filter, top, skip, maxpagesize, context); } public PagedIterable listDeviceInsights() { return serviceManager.catalogs().listDeviceInsights(resourceGroupName, catalogName); } - public PagedIterable listDeviceInsights( - String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return serviceManager - .catalogs() - .listDeviceInsights(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDeviceInsights(String filter, Integer top, Integer skip, + Integer maxpagesize, Context context) { + return serviceManager.catalogs().listDeviceInsights(resourceGroupName, catalogName, filter, top, skip, + maxpagesize, context); } public PagedIterable listDevices() { return serviceManager.catalogs().listDevices(resourceGroupName, catalogName); } - public PagedIterable listDevices( - String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return serviceManager - .catalogs() - .listDevices(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDevices(String filter, Integer top, Integer skip, Integer maxpagesize, + Context context) { + return serviceManager.catalogs().listDevices(resourceGroupName, catalogName, filter, top, skip, maxpagesize, + context); } public CatalogImpl withRegion(Region location) { @@ -245,6 +213,11 @@ public CatalogImpl withTags(Map tags) { } } + public CatalogImpl withProperties(CatalogProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java index aab63c3693db3..42491e8c23914 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java @@ -51,17 +51,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CatalogsClient. */ +/** + * An instance of this class provides access to all the operations defined in CatalogsClient. + */ public final class CatalogsClientImpl implements CatalogsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CatalogsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of CatalogsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CatalogsClientImpl(AzureSphereManagementClientImpl client) { @@ -76,341 +82,232 @@ public final class CatalogsClientImpl implements CatalogsClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface CatalogsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") - @ExpectedResponses({200, 201}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @BodyParam("application/json") CatalogInner resource, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @BodyParam("application/json") CatalogInner resource, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @BodyParam("application/json") CatalogUpdate properties, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @BodyParam("application/json") CatalogUpdate properties, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices") - @ExpectedResponses({200}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> countDevices( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments") - @ExpectedResponses({200}) + Mono> countDevices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDeployments( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups") - @ExpectedResponses({200}) + Mono> listDeployments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDeviceGroups( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, + Mono> listDeviceGroups(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, @QueryParam("$maxpagesize") Integer maxpagesize, @BodyParam("application/json") ListDeviceGroupsRequest listDeviceGroupsRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDeviceInsights( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices") - @ExpectedResponses({200}) + Mono> listDeviceInsights(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDevices( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @HeaderParam("Accept") String accept, - Context context); + Mono> listDevices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDeploymentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDeviceGroupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDeviceInsightsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDevicesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listDevicesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List Catalog resources by subscription ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 Catalog resources by subscription ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Catalog resources by subscription ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List Catalog resources by subscription ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -419,13 +316,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List Catalog resources by subscription ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}. @@ -437,7 +334,7 @@ public PagedIterable list() { /** * List Catalog resources by subscription ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -451,27 +348,23 @@ public PagedIterable list(Context context) { /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -479,53 +372,34 @@ private Mono> listByResourceGroupSinglePageAsync(Str } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -534,27 +408,15 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -563,14 +425,13 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,14 +441,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -601,7 +461,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -616,7 +476,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -625,19 +485,15 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * @return a Catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String catalogName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String catalogName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -648,23 +504,14 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -674,19 +521,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a Catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String catalogName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String catalogName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -697,20 +540,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context); } /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -726,7 +562,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -736,14 +572,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * @return a Catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String catalogName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName, context).block(); } /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -758,7 +594,7 @@ public CatalogInner getByResourceGroup(String resourceGroupName, String catalogN /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -768,19 +604,15 @@ public CatalogInner getByResourceGroup(String resourceGroupName, String catalogN * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, CatalogInner resource) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, CatalogInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -796,24 +628,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -824,19 +646,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, CatalogInner resource, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, CatalogInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -852,21 +670,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, resource, accept, context); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -876,19 +686,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CatalogInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, CatalogInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CatalogInner.class, CatalogInner.class, this.client.getContext()); + private PollerFlux, CatalogInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, CatalogInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CatalogInner.class, CatalogInner.class, this.client.getContext()); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -899,20 +707,18 @@ private PollerFlux, CatalogInner> beginCreateOrUpdateAs * @return the {@link PollerFlux} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CatalogInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, CatalogInner resource, Context context) { + private PollerFlux, CatalogInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, CatalogInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CatalogInner.class, CatalogInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CatalogInner.class, CatalogInner.class, context); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -922,14 +728,14 @@ private PollerFlux, CatalogInner> beginCreateOrUpdateAs * @return the {@link SyncPoller} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CatalogInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, CatalogInner resource) { + public SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, CatalogInner resource) { return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).getSyncPoller(); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -940,14 +746,14 @@ public SyncPoller, CatalogInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CatalogInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, CatalogInner resource, Context context) { + public SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, CatalogInner resource, Context context) { return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context).getSyncPoller(); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -957,16 +763,15 @@ public SyncPoller, CatalogInner> beginCreateOrUpdate( * @return an Azure Sphere catalog on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, CatalogInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, + CatalogInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -977,16 +782,15 @@ private Mono createOrUpdateAsync( * @return an Azure Sphere catalog on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, CatalogInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, CatalogInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -1002,7 +806,7 @@ public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, /** * Create a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param resource Resource create parameters. @@ -1013,14 +817,14 @@ public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, * @return an Azure Sphere catalog. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CatalogInner createOrUpdate( - String resourceGroupName, String catalogName, CatalogInner resource, Context context) { + public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource, + Context context) { return createOrUpdateAsync(resourceGroupName, catalogName, resource, context).block(); } /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -1030,19 +834,15 @@ public CatalogInner createOrUpdate( * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String catalogName, CatalogUpdate properties) { + private Mono> updateWithResponseAsync(String resourceGroupName, String catalogName, + CatalogUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1058,24 +858,14 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - properties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -1086,19 +876,15 @@ private Mono> updateWithResponseAsync( * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String catalogName, CatalogUpdate properties, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String catalogName, + CatalogUpdate properties, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1114,21 +900,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, properties, accept, context); } /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -1145,7 +923,7 @@ private Mono updateAsync(String resourceGroupName, String catalogN /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -1156,14 +934,14 @@ private Mono updateAsync(String resourceGroupName, String catalogN * @return an Azure Sphere catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String catalogName, CatalogUpdate properties, Context context) { + public Response updateWithResponse(String resourceGroupName, String catalogName, + CatalogUpdate properties, Context context) { return updateWithResponseAsync(resourceGroupName, catalogName, properties, context).block(); } /** * Update a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param properties The resource properties to be updated. @@ -1179,7 +957,7 @@ public CatalogInner update(String resourceGroupName, String catalogName, Catalog /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1190,16 +968,12 @@ public CatalogInner update(String resourceGroupName, String catalogName, Catalog @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1210,23 +984,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1236,19 +1001,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1259,20 +1020,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, accept, context); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1283,15 +1037,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1301,18 +1053,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1327,7 +1078,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1337,14 +1088,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + Context context) { return this.beginDeleteAsync(resourceGroupName, catalogName, context).getSyncPoller(); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1359,7 +1110,7 @@ private Mono deleteAsync(String resourceGroupName, String catalogName) { /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1370,14 +1121,13 @@ private Mono deleteAsync(String resourceGroupName, String catalogName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String catalogName, Context context) { - return beginDeleteAsync(resourceGroupName, catalogName, context) - .last() + return beginDeleteAsync(resourceGroupName, catalogName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1391,7 +1141,7 @@ public void delete(String resourceGroupName, String catalogName) { /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1406,29 +1156,25 @@ public void delete(String resourceGroupName, String catalogName, Context context /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of 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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1439,23 +1185,14 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) + .withContext(context -> service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1463,22 +1200,18 @@ private Mono> countDevicesWithResponseAsync( * @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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName, Context context) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1489,20 +1222,13 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context); + return service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context); } /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1518,7 +1244,7 @@ private Mono countDevicesAsync(String resourceGroupNam /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -1528,14 +1254,14 @@ private Mono countDevicesAsync(String resourceGroupNam * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, Context context) { + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + Context context) { return countDevicesWithResponseAsync(resourceGroupName, catalogName, context).block(); } /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1550,7 +1276,7 @@ public CountDeviceResponseInner countDevices(String resourceGroupName, String ca /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -1561,22 +1287,18 @@ public CountDeviceResponseInner countDevices(String resourceGroupName, String ca * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeploymentsSinglePageAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private Mono> listDeploymentsSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1587,36 +1309,17 @@ private Mono> listDeploymentsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDeployments( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDeployments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -1628,28 +1331,18 @@ private Mono> listDeploymentsSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeploymentsSinglePageAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listDeploymentsSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1661,32 +1354,15 @@ private Mono> listDeploymentsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDeployments( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDeployments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -1699,8 +1375,8 @@ private Mono> listDeploymentsSinglePageAsync( * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeploymentsAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private PagedFlux listDeploymentsAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize) { return new PagedFlux<>( () -> listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize), nextLink -> listDeploymentsNextSinglePageAsync(nextLink)); @@ -1708,7 +1384,7 @@ private PagedFlux listDeploymentsAsync( /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1729,7 +1405,7 @@ private PagedFlux listDeploymentsAsync(String resourceGroupName /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -1743,23 +1419,15 @@ private PagedFlux listDeploymentsAsync(String resourceGroupName * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeploymentsAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - return new PagedFlux<>( - () -> - listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context), - nextLink -> listDeploymentsNextSinglePageAsync(nextLink, context)); + private PagedFlux listDeploymentsAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { + return new PagedFlux<>(() -> listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, + maxpagesize, context), nextLink -> listDeploymentsNextSinglePageAsync(nextLink, context)); } /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1779,7 +1447,7 @@ public PagedIterable listDeployments(String resourceGroupName, /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -1793,21 +1461,15 @@ public PagedIterable listDeployments(String resourceGroupName, * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDeployments( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listDeployments(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listDeploymentsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -1819,28 +1481,19 @@ public PagedIterable listDeployments( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceGroupsSinglePageAsync( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, + private Mono> listDeviceGroupsSinglePageAsync(String resourceGroupName, + String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1850,45 +1503,24 @@ private Mono> listDeviceGroupsSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); } if (listDeviceGroupsRequest == null) { - return Mono - .error( - new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null.")); } else { listDeviceGroupsRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDeviceGroups( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - listDeviceGroupsRequest, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDeviceGroups(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, filter, top, skip, maxpagesize, + listDeviceGroupsRequest, 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 the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -1901,29 +1533,19 @@ private Mono> listDeviceGroupsSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceGroupsSinglePageAsync( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listDeviceGroupsSinglePageAsync(String resourceGroupName, + String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, + Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1933,42 +1555,24 @@ private Mono> listDeviceGroupsSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null.")); } if (listDeviceGroupsRequest == null) { - return Mono - .error( - new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null.")); } else { listDeviceGroupsRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDeviceGroups( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - listDeviceGroupsRequest, - accept, + .listDeviceGroups(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, filter, top, skip, maxpagesize, listDeviceGroupsRequest, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -1982,24 +1586,17 @@ private Mono> listDeviceGroupsSinglePageAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeviceGroupsAsync( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, + private PagedFlux listDeviceGroupsAsync(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize) { - return new PagedFlux<>( - () -> - listDeviceGroupsSinglePageAsync( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize), + return new PagedFlux<>(() -> listDeviceGroupsSinglePageAsync(resourceGroupName, catalogName, + listDeviceGroupsRequest, filter, top, skip, maxpagesize), nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -2009,22 +1606,20 @@ private PagedFlux listDeviceGroupsAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeviceGroupsAsync( - String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest) { + private PagedFlux listDeviceGroupsAsync(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest) { final String filter = null; final Integer top = null; final Integer skip = null; final Integer maxpagesize = null; - return new PagedFlux<>( - () -> - listDeviceGroupsSinglePageAsync( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize), + return new PagedFlux<>(() -> listDeviceGroupsSinglePageAsync(resourceGroupName, catalogName, + listDeviceGroupsRequest, filter, top, skip, maxpagesize), nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -2039,25 +1634,17 @@ private PagedFlux listDeviceGroupsAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeviceGroupsAsync( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + private PagedFlux listDeviceGroupsAsync(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return new PagedFlux<>( - () -> - listDeviceGroupsSinglePageAsync( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context), + return new PagedFlux<>(() -> listDeviceGroupsSinglePageAsync(resourceGroupName, catalogName, + listDeviceGroupsRequest, filter, top, skip, maxpagesize, context), nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink, context)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -2067,20 +1654,19 @@ private PagedFlux listDeviceGroupsAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDeviceGroups( - String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest) { + public PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest) { final String filter = null; final Integer top = null; final Integer skip = null; final Integer maxpagesize = null; - return new PagedIterable<>( - listDeviceGroupsAsync( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize)); + return new PagedIterable<>(listDeviceGroupsAsync(resourceGroupName, catalogName, listDeviceGroupsRequest, + filter, top, skip, maxpagesize)); } /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -2095,23 +1681,16 @@ public PagedIterable listDeviceGroups( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDeviceGroups( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + public PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return new PagedIterable<>( - listDeviceGroupsAsync( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context)); + return new PagedIterable<>(listDeviceGroupsAsync(resourceGroupName, catalogName, listDeviceGroupsRequest, + filter, top, skip, maxpagesize, context)); } /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2122,22 +1701,18 @@ public PagedIterable listDeviceGroups( * @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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceInsightsSinglePageAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private Mono> listDeviceInsightsSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2148,36 +1723,17 @@ private Mono> listDeviceInsightsSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDeviceInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDeviceInsights(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2189,28 +1745,18 @@ private Mono> listDeviceInsightsSinglePageAsyn * @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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceInsightsSinglePageAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listDeviceInsightsSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2222,32 +1768,15 @@ private Mono> listDeviceInsightsSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDeviceInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDeviceInsights(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2260,8 +1789,8 @@ private Mono> listDeviceInsightsSinglePageAsyn * @return paged collection of DeviceInsight items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeviceInsightsAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private PagedFlux listDeviceInsightsAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize) { return new PagedFlux<>( () -> listDeviceInsightsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize), nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink)); @@ -2269,7 +1798,7 @@ private PagedFlux listDeviceInsightsAsync( /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2290,7 +1819,7 @@ private PagedFlux listDeviceInsightsAsync(String resourceGro /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2304,24 +1833,15 @@ private PagedFlux listDeviceInsightsAsync(String resourceGro * @return paged collection of DeviceInsight items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDeviceInsightsAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - return new PagedFlux<>( - () -> - listDeviceInsightsSinglePageAsync( - resourceGroupName, catalogName, filter, top, skip, maxpagesize, context), - nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink, context)); + private PagedFlux listDeviceInsightsAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { + return new PagedFlux<>(() -> listDeviceInsightsSinglePageAsync(resourceGroupName, catalogName, filter, top, + skip, maxpagesize, context), nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink, context)); } /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2341,7 +1861,7 @@ public PagedIterable listDeviceInsights(String resourceGroup /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2355,21 +1875,15 @@ public PagedIterable listDeviceInsights(String resourceGroup * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDeviceInsights( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listDeviceInsights(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listDeviceInsightsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context)); } /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2380,22 +1894,18 @@ public PagedIterable listDeviceInsights( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDevicesSinglePageAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private Mono> listDevicesSinglePageAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2406,36 +1916,17 @@ private Mono> listDevicesSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2447,28 +1938,18 @@ private Mono> listDevicesSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDevicesSinglePageAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listDevicesSinglePageAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2480,32 +1961,15 @@ private Mono> listDevicesSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - filter, - top, - skip, - maxpagesize, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDevices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, filter, top, skip, maxpagesize, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2518,8 +1982,8 @@ private Mono> listDevicesSinglePageAsync( * @return the response of a Device list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDevicesAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private PagedFlux listDevicesAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize) { return new PagedFlux<>( () -> listDevicesSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize), nextLink -> listDevicesNextSinglePageAsync(nextLink)); @@ -2527,7 +1991,7 @@ private PagedFlux listDevicesAsync( /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2548,7 +2012,7 @@ private PagedFlux listDevicesAsync(String resourceGroupName, String /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2562,14 +2026,8 @@ private PagedFlux listDevicesAsync(String resourceGroupName, String * @return the response of a Device list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDevicesAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private PagedFlux listDevicesAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedFlux<>( () -> listDevicesSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context), nextLink -> listDevicesNextSinglePageAsync(nextLink, context)); @@ -2577,7 +2035,7 @@ private PagedFlux listDevicesAsync( /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2596,7 +2054,7 @@ public PagedIterable listDevices(String resourceGroupName, String c /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -2610,28 +2068,23 @@ public PagedIterable listDevices(String resourceGroupName, String c * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDevices( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listDevices(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listDevicesAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2639,38 +2092,30 @@ private Mono> listBySubscriptionNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -2678,36 +2123,27 @@ private Mono> listBySubscriptionNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2715,38 +2151,30 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -2754,36 +2182,27 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsNextSinglePageAsync(String nextLink) { @@ -2791,37 +2210,29 @@ private Mono> listDeploymentsNextSinglePageAsync( 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.")); + 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.listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsNextSinglePageAsync(String nextLink, Context context) { @@ -2829,36 +2240,27 @@ private Mono> listDeploymentsNextSinglePageAsync( 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.")); + 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 - .listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeviceGroupsNextSinglePageAsync(String nextLink) { @@ -2866,75 +2268,58 @@ private Mono> listDeviceGroupsNextSinglePageAsyn 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.")); + 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.listDeviceGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceGroupsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listDeviceGroupsNextSinglePageAsync(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.")); + 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 - .listDeviceGroupsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDeviceGroupsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeviceInsightsNextSinglePageAsync(String nextLink) { @@ -2942,76 +2327,59 @@ private Mono> listDeviceInsightsNextSinglePage 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.")); + 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.listDeviceInsightsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDeviceInsightsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listDeviceInsightsNextSinglePageAsync(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.")); + 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 - .listDeviceInsightsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDeviceInsightsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDevicesNextSinglePageAsync(String nextLink) { @@ -3019,37 +2387,29 @@ private Mono> listDevicesNextSinglePageAsync(String n 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.")); + 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.listDevicesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDevicesNextSinglePageAsync(String nextLink, Context context) { @@ -3057,23 +2417,13 @@ private Mono> listDevicesNextSinglePageAsync(String n 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.")); + 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 - .listDevicesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDevicesNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java index 7204f29b10d98..32000435e1e8c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java @@ -32,8 +32,8 @@ public final class CatalogsImpl implements Catalogs { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public CatalogsImpl( - CatalogsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public CatalogsImpl(CatalogsClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -58,15 +58,12 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Cont return Utils.mapPage(inner, inner1 -> new CatalogImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String catalogName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, catalogName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, catalogName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CatalogImpl(inner.getValue(), this.manager())); } else { return null; @@ -90,15 +87,12 @@ public void delete(String resourceGroupName, String catalogName, Context context this.serviceClient().delete(resourceGroupName, catalogName, context); } - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, Context context) { - Response inner = - this.serviceClient().countDevicesWithResponse(resourceGroupName, catalogName, context); + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + Context context) { + Response inner + = this.serviceClient().countDevicesWithResponse(resourceGroupName, catalogName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CountDeviceResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -119,63 +113,38 @@ public PagedIterable listDeployments(String resourceGroupName, Strin return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); } - public PagedIterable listDeployments( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listDeployments(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDeployments(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listDeployments(resourceGroupName, catalogName, + filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); } - public PagedIterable listDeviceGroups( - String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest) { - PagedIterable inner = - this.serviceClient().listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest); + public PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest) { + PagedIterable inner + = this.serviceClient().listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } - public PagedIterable listDeviceGroups( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + public PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - PagedIterable inner = - this - .serviceClient() - .listDeviceGroups( - resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context); + PagedIterable inner = this.serviceClient().listDeviceGroups(resourceGroupName, catalogName, + listDeviceGroupsRequest, filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } public PagedIterable listDeviceInsights(String resourceGroupName, String catalogName) { - PagedIterable inner = - this.serviceClient().listDeviceInsights(resourceGroupName, catalogName); + PagedIterable inner + = this.serviceClient().listDeviceInsights(resourceGroupName, catalogName); return Utils.mapPage(inner, inner1 -> new DeviceInsightImpl(inner1, this.manager())); } - public PagedIterable listDeviceInsights( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listDeviceInsights(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDeviceInsights(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listDeviceInsights(resourceGroupName, + catalogName, filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeviceInsightImpl(inner1, this.manager())); } @@ -184,34 +153,23 @@ public PagedIterable listDevices(String resourceGroupName, String catalo return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); } - public PagedIterable listDevices( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this.serviceClient().listDevices(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listDevices(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner + = this.serviceClient().listDevices(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); } public Catalog getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE).getValue(); } @@ -219,18 +177,13 @@ public Catalog getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, catalogName, context); } @@ -238,18 +191,13 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } this.delete(resourceGroupName, catalogName, Context.NONE); } @@ -257,18 +205,13 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } this.delete(resourceGroupName, catalogName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateChainResponseImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateChainResponseImpl.java index c4f161c524887..42b6500cfaf00 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateChainResponseImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateChainResponseImpl.java @@ -12,8 +12,8 @@ public final class CertificateChainResponseImpl implements CertificateChainRespo private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - CertificateChainResponseImpl( - CertificateChainResponseInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + CertificateChainResponseImpl(CertificateChainResponseInner innerObject, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateImpl.java index 89bed5e2be67d..91f8136a0edd8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificateImpl.java @@ -7,9 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.sphere.fluent.models.CertificateInner; import com.azure.resourcemanager.sphere.models.Certificate; -import com.azure.resourcemanager.sphere.models.CertificateStatus; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import java.time.OffsetDateTime; +import com.azure.resourcemanager.sphere.models.CertificateProperties; public final class CertificateImpl implements Certificate { private CertificateInner innerObject; @@ -33,36 +31,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String certificate() { - return this.innerModel().certificate(); - } - - public CertificateStatus status() { - return this.innerModel().status(); - } - - public String subject() { - return this.innerModel().subject(); + public CertificateProperties properties() { + return this.innerModel().properties(); } - public String thumbprint() { - return this.innerModel().thumbprint(); - } - - public OffsetDateTime expiryUtc() { - return this.innerModel().expiryUtc(); - } - - public OffsetDateTime notBeforeUtc() { - return this.innerModel().notBeforeUtc(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public CertificateInner innerModel() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesClientImpl.java index 317dfa9c52f3e..ab506da82d82e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesClientImpl.java @@ -35,22 +35,28 @@ import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in CertificatesClient. + */ public final class CertificatesClientImpl implements CertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of CertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CertificatesClientImpl(AzureSphereManagementClientImpl client) { - this.service = - RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,84 +67,59 @@ public final class CertificatesClientImpl implements CertificatesClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface CertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCatalog( - @HostParam("$host") String endpoint, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> listByCatalog(@HostParam("$host") String endpoint, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("serialNumber") String serialNumber, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> retrieveCertChain( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("serialNumber") String serialNumber, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("serialNumber") String serialNumber, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> retrieveCertChain(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("serialNumber") String serialNumber, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> retrieveProofOfPossessionNonce( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, @PathParam("serialNumber") String serialNumber, @BodyParam("application/json") ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCatalogNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -149,22 +130,18 @@ Mono> listByCatalogNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Certificate list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,36 +152,17 @@ private Mono> listByCatalogSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCatalog( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByCatalog(this.client.getEndpoint(), filter, top, skip, maxpagesize, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, 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 Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -216,28 +174,18 @@ private Mono> listByCatalogSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Certificate list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, + String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -249,32 +197,15 @@ private Mono> listByCatalogSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCatalog( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByCatalog(this.client.getEndpoint(), filter, top, skip, maxpagesize, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -287,8 +218,8 @@ private Mono> listByCatalogSinglePageAsync( * @return the response of a Certificate list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCatalogAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize) { return new PagedFlux<>( () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize), nextLink -> listByCatalogNextSinglePageAsync(nextLink)); @@ -296,7 +227,7 @@ private PagedFlux listByCatalogAsync( /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -317,7 +248,7 @@ private PagedFlux listByCatalogAsync(String resourceGroupName, /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -331,14 +262,8 @@ private PagedFlux listByCatalogAsync(String resourceGroupName, * @return the response of a Certificate list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCatalogAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedFlux<>( () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context), nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); @@ -346,7 +271,7 @@ private PagedFlux listByCatalogAsync( /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -365,7 +290,7 @@ public PagedIterable listByCatalog(String resourceGroupName, S /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -379,21 +304,15 @@ public PagedIterable listByCatalog(String resourceGroupName, S * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listByCatalogAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context)); } /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -403,19 +322,15 @@ public PagedIterable listByCatalog( * @return a Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String serialNumber) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String serialNumber) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -429,24 +344,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, serialNumber, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -457,19 +362,15 @@ private Mono> getWithResponseAsync( * @return a Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String serialNumber, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String serialNumber, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -483,21 +384,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, serialNumber, accept, context); } /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -514,7 +407,7 @@ private Mono getAsync(String resourceGroupName, String catalog /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -525,14 +418,14 @@ private Mono getAsync(String resourceGroupName, String catalog * @return a Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context) { + public Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber, + Context context) { return getWithResponseAsync(resourceGroupName, catalogName, serialNumber, context).block(); } /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -548,7 +441,7 @@ public CertificateInner get(String resourceGroupName, String catalogName, String /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -558,19 +451,15 @@ public CertificateInner get(String resourceGroupName, String catalogName, String * @return the certificate chain response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> retrieveCertChainWithResponseAsync( - String resourceGroupName, String catalogName, String serialNumber) { + private Mono> retrieveCertChainWithResponseAsync(String resourceGroupName, + String catalogName, String serialNumber) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -584,24 +473,14 @@ private Mono> retrieveCertChainWithRespo } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .retrieveCertChain( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - accept, - context)) + .withContext(context -> service.retrieveCertChain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, serialNumber, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -612,19 +491,15 @@ private Mono> retrieveCertChainWithRespo * @return the certificate chain response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> retrieveCertChainWithResponseAsync( - String resourceGroupName, String catalogName, String serialNumber, Context context) { + private Mono> retrieveCertChainWithResponseAsync(String resourceGroupName, + String catalogName, String serialNumber, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,21 +513,13 @@ private Mono> retrieveCertChainWithRespo } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .retrieveCertChain( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - accept, - context); + return service.retrieveCertChain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, serialNumber, accept, context); } /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -662,15 +529,15 @@ private Mono> retrieveCertChainWithRespo * @return the certificate chain response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono retrieveCertChainAsync( - String resourceGroupName, String catalogName, String serialNumber) { + private Mono retrieveCertChainAsync(String resourceGroupName, String catalogName, + String serialNumber) { return retrieveCertChainWithResponseAsync(resourceGroupName, catalogName, serialNumber) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -681,14 +548,14 @@ private Mono retrieveCertChainAsync( * @return the certificate chain response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response retrieveCertChainWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context) { + public Response retrieveCertChainWithResponse(String resourceGroupName, + String catalogName, String serialNumber, Context context) { return retrieveCertChainWithResponseAsync(resourceGroupName, catalogName, serialNumber, context).block(); } /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -698,14 +565,14 @@ public Response retrieveCertChainWithResponse( * @return the certificate chain response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateChainResponseInner retrieveCertChain( - String resourceGroupName, String catalogName, String serialNumber) { + public CertificateChainResponseInner retrieveCertChain(String resourceGroupName, String catalogName, + String serialNumber) { return retrieveCertChainWithResponse(resourceGroupName, catalogName, serialNumber, Context.NONE).getValue(); } /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -717,21 +584,15 @@ public CertificateChainResponseInner retrieveCertChain( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> retrieveProofOfPossessionNonceWithResponseAsync( - String resourceGroupName, - String catalogName, - String serialNumber, + String resourceGroupName, String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -744,34 +605,22 @@ private Mono> retrieveProofOfPosse return Mono.error(new IllegalArgumentException("Parameter serialNumber is required and cannot be null.")); } if (proofOfPossessionNonceRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter proofOfPossessionNonceRequest is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter proofOfPossessionNonceRequest is required and cannot be null.")); } else { proofOfPossessionNonceRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .retrieveProofOfPossessionNonce( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - proofOfPossessionNonceRequest, - accept, - context)) + .withContext(context -> service.retrieveProofOfPossessionNonce(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, + serialNumber, proofOfPossessionNonceRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -784,22 +633,15 @@ private Mono> retrieveProofOfPosse */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> retrieveProofOfPossessionNonceWithResponseAsync( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, - Context context) { + String resourceGroupName, String catalogName, String serialNumber, + ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -812,31 +654,21 @@ private Mono> retrieveProofOfPosse return Mono.error(new IllegalArgumentException("Parameter serialNumber is required and cannot be null.")); } if (proofOfPossessionNonceRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter proofOfPossessionNonceRequest is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter proofOfPossessionNonceRequest is required and cannot be null.")); } else { proofOfPossessionNonceRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .retrieveProofOfPossessionNonce( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - serialNumber, - proofOfPossessionNonceRequest, - accept, - context); + return service.retrieveProofOfPossessionNonce(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, serialNumber, + proofOfPossessionNonceRequest, accept, context); } /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -847,19 +679,15 @@ private Mono> retrieveProofOfPosse * @return the proof of possession nonce on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono retrieveProofOfPossessionNonceAsync( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { - return retrieveProofOfPossessionNonceWithResponseAsync( - resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono retrieveProofOfPossessionNonceAsync(String resourceGroupName, + String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { + return retrieveProofOfPossessionNonceWithResponseAsync(resourceGroupName, catalogName, serialNumber, + proofOfPossessionNonceRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -872,19 +700,15 @@ private Mono retrieveProofOfPossessionNonce */ @ServiceMethod(returns = ReturnType.SINGLE) public Response retrieveProofOfPossessionNonceWithResponse( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, - Context context) { - return retrieveProofOfPossessionNonceWithResponseAsync( - resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest, context) - .block(); + String resourceGroupName, String catalogName, String serialNumber, + ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, Context context) { + return retrieveProofOfPossessionNonceWithResponseAsync(resourceGroupName, catalogName, serialNumber, + proofOfPossessionNonceRequest, context).block(); } /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -895,26 +719,23 @@ public Response retrieveProofOfPossessionNo * @return the proof of possession nonce. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { - return retrieveProofOfPossessionNonceWithResponse( - resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest, Context.NONE) - .getValue(); + public ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(String resourceGroupName, + String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { + return retrieveProofOfPossessionNonceWithResponse(resourceGroupName, catalogName, serialNumber, + proofOfPossessionNonceRequest, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Certificate list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink) { @@ -922,37 +743,29 @@ private Mono> listByCatalogNextSinglePageAsync(S 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.")); + 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)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Certificate list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink, Context context) { @@ -960,23 +773,13 @@ private Mono> listByCatalogNextSinglePageAsync(S 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.")); + 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)); + 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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesImpl.java index d8edb696338e5..89d9ca0491f92 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CertificatesImpl.java @@ -26,8 +26,8 @@ public final class CertificatesImpl implements Certificates { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public CertificatesImpl( - CertificatesClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public CertificatesImpl(CertificatesClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -37,28 +37,19 @@ public PagedIterable listByCatalog(String resourceGroupName, String return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } - public PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this.serviceClient().listByCatalog(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listByCatalog(resourceGroupName, catalogName, + filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, catalogName, serialNumber, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, catalogName, serialNumber, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,25 +65,22 @@ public Certificate get(String resourceGroupName, String catalogName, String seri } } - public Response retrieveCertChainWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context) { - Response inner = - this.serviceClient().retrieveCertChainWithResponse(resourceGroupName, catalogName, serialNumber, context); + public Response retrieveCertChainWithResponse(String resourceGroupName, + String catalogName, String serialNumber, Context context) { + Response inner + = this.serviceClient().retrieveCertChainWithResponse(resourceGroupName, catalogName, serialNumber, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateChainResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public CertificateChainResponse retrieveCertChain( - String resourceGroupName, String catalogName, String serialNumber) { - CertificateChainResponseInner inner = - this.serviceClient().retrieveCertChain(resourceGroupName, catalogName, serialNumber); + public CertificateChainResponse retrieveCertChain(String resourceGroupName, String catalogName, + String serialNumber) { + CertificateChainResponseInner inner + = this.serviceClient().retrieveCertChain(resourceGroupName, catalogName, serialNumber); if (inner != null) { return new CertificateChainResponseImpl(inner, this.manager()); } else { @@ -100,38 +88,24 @@ public CertificateChainResponse retrieveCertChain( } } - public Response retrieveProofOfPossessionNonceWithResponse( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, + public Response retrieveProofOfPossessionNonceWithResponse(String resourceGroupName, + String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, Context context) { - Response inner = - this - .serviceClient() - .retrieveProofOfPossessionNonceWithResponse( - resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest, context); + Response inner + = this.serviceClient().retrieveProofOfPossessionNonceWithResponse(resourceGroupName, catalogName, + serialNumber, proofOfPossessionNonceRequest, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ProofOfPossessionNonceResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public ProofOfPossessionNonceResponse retrieveProofOfPossessionNonce( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { - ProofOfPossessionNonceResponseInner inner = - this - .serviceClient() - .retrieveProofOfPossessionNonce( - resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest); + public ProofOfPossessionNonceResponse retrieveProofOfPossessionNonce(String resourceGroupName, String catalogName, + String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest) { + ProofOfPossessionNonceResponseInner inner = this.serviceClient().retrieveProofOfPossessionNonce( + resourceGroupName, catalogName, serialNumber, proofOfPossessionNonceRequest); if (inner != null) { return new ProofOfPossessionNonceResponseImpl(inner, this.manager()); } else { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CountDeviceResponseImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CountDeviceResponseImpl.java index fb2b9e03cdc00..ec53058d6975d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CountDeviceResponseImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CountDeviceResponseImpl.java @@ -12,8 +12,8 @@ public final class CountDeviceResponseImpl implements CountDeviceResponse { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - CountDeviceResponseImpl( - CountDeviceResponseInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + CountDeviceResponseImpl(CountDeviceResponseInner innerObject, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentImpl.java index 1f1923be9b2be..9149da31b0f23 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentImpl.java @@ -4,16 +4,11 @@ package com.azure.resourcemanager.sphere.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; import com.azure.resourcemanager.sphere.models.Deployment; -import com.azure.resourcemanager.sphere.models.Image; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; +import com.azure.resourcemanager.sphere.models.DeploymentProperties; public final class DeploymentImpl implements Deployment, Deployment.Definition, Deployment.Update { private DeploymentInner innerObject; @@ -32,27 +27,12 @@ public String type() { return this.innerModel().type(); } - public String deploymentId() { - return this.innerModel().deploymentId(); + public DeploymentProperties properties() { + return this.innerModel().properties(); } - public List deployedImages() { - List inner = this.innerModel().deployedImages(); - if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new ImageImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public OffsetDateTime deploymentDateUtc() { - return this.innerModel().deploymentDateUtc(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -77,8 +57,8 @@ private com.azure.resourcemanager.sphere.AzureSphereManager manager() { private String deploymentName; - public DeploymentImpl withExistingDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public DeploymentImpl withExistingDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { this.resourceGroupName = resourceGroupName; this.catalogName = catalogName; this.productName = productName; @@ -87,34 +67,14 @@ public DeploymentImpl withExistingDeviceGroup( } public Deployment create() { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - this.innerModel(), - Context.NONE); + this.innerObject = serviceManager.serviceClient().getDeployments().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, deploymentName, this.innerModel(), Context.NONE); return this; } public Deployment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - this.innerModel(), - context); + this.innerObject = serviceManager.serviceClient().getDeployments().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, deploymentName, this.innerModel(), context); return this; } @@ -129,34 +89,14 @@ public DeploymentImpl update() { } public Deployment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - this.innerModel(), - Context.NONE); + this.innerObject = serviceManager.serviceClient().getDeployments().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, deploymentName, this.innerModel(), Context.NONE); return this; } public Deployment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - this.innerModel(), - context); + this.innerObject = serviceManager.serviceClient().getDeployments().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, deploymentName, this.innerModel(), context); return this; } @@ -171,33 +111,21 @@ public Deployment apply(Context context) { } public Deployment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .getWithResponse( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeployments() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, Context.NONE) + .getValue(); return this; } public Deployment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeployments() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context) - .getValue(); - return this; - } - - public DeploymentImpl withDeploymentId(String deploymentId) { - this.innerModel().withDeploymentId(deploymentId); + this.innerObject = serviceManager.serviceClient().getDeployments() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context) + .getValue(); return this; } - public DeploymentImpl withDeployedImages(List deployedImages) { - this.innerModel().withDeployedImages(deployedImages); + public DeploymentImpl withProperties(DeploymentProperties properties) { + this.innerModel().withProperties(properties); return this; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsClientImpl.java index 8e614c30d24c4..2c3ac36ea66fd 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeploymentsClient. + */ public final class DeploymentsClientImpl implements DeploymentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DeploymentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of DeploymentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DeploymentsClientImpl(AzureSphereManagementClientImpl client) { - this.service = - RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,93 +70,62 @@ public final class DeploymentsClientImpl implements DeploymentsClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface DeploymentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDeviceGroup( - @HostParam("$host") String endpoint, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @QueryParam("api-version") String apiVersion, + Mono> listByDeviceGroup(@HostParam("$host") String endpoint, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") + @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("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deploymentName") String deploymentName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deploymentName") String deploymentName, - @BodyParam("application/json") DeploymentInner resource, - @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deploymentName") String deploymentName, @BodyParam("application/json") DeploymentInner resource, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deploymentName") String deploymentName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDeviceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -163,29 +138,19 @@ Mono> listByDeviceGroupNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDeviceGroupSinglePageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, + private Mono> listByDeviceGroupSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,39 +168,18 @@ private Mono> listByDeviceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDeviceGroup( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDeviceGroup(this.client.getEndpoint(), filter, top, skip, maxpagesize, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, + productName, deviceGroupName, 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 Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -249,30 +193,19 @@ private Mono> listByDeviceGroupSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDeviceGroupSinglePageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listByDeviceGroupSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String filter, Integer top, Integer skip, + Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -291,35 +224,17 @@ private Mono> listByDeviceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDeviceGroup( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, + .listByDeviceGroup(this.client.getEndpoint(), filter, top, skip, maxpagesize, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -334,26 +249,17 @@ private Mono> listByDeviceGroupSinglePageAsync( * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDeviceGroupAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize) { - return new PagedFlux<>( - () -> - listByDeviceGroupSinglePageAsync( - resourceGroupName, catalogName, productName, deviceGroupName, filter, top, skip, maxpagesize), + private PagedFlux listByDeviceGroupAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize) { + return new PagedFlux<>(() -> listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, + deviceGroupName, filter, top, skip, maxpagesize), nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink)); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -364,23 +270,21 @@ private PagedFlux listByDeviceGroupAsync( * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDeviceGroupAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private PagedFlux listByDeviceGroupAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { final String filter = null; final Integer top = null; final Integer skip = null; final Integer maxpagesize = null; - return new PagedFlux<>( - () -> - listByDeviceGroupSinglePageAsync( - resourceGroupName, catalogName, productName, deviceGroupName, filter, top, skip, maxpagesize), + return new PagedFlux<>(() -> listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, + deviceGroupName, filter, top, skip, maxpagesize), nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink)); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -396,35 +300,18 @@ private PagedFlux listByDeviceGroupAsync( * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDeviceGroupAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + private PagedFlux listByDeviceGroupAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return new PagedFlux<>( - () -> - listByDeviceGroupSinglePageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - filter, - top, - skip, - maxpagesize, - context), + return new PagedFlux<>(() -> listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, + deviceGroupName, filter, top, skip, maxpagesize, context), nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink, context)); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -435,21 +322,20 @@ private PagedFlux listByDeviceGroupAsync( * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { final String filter = null; final Integer top = null; final Integer skip = null; final Integer maxpagesize = null; - return new PagedIterable<>( - listByDeviceGroupAsync( - resourceGroupName, catalogName, productName, deviceGroupName, filter, top, skip, maxpagesize)); + return new PagedIterable<>(listByDeviceGroupAsync(resourceGroupName, catalogName, productName, deviceGroupName, + filter, top, skip, maxpagesize)); } /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -465,54 +351,38 @@ public PagedIterable listByDeviceGroup( * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDeviceGroup( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { - return new PagedIterable<>( - listByDeviceGroupAsync( - resourceGroupName, catalogName, productName, deviceGroupName, filter, top, skip, maxpagesize, context)); + return new PagedIterable<>(listByDeviceGroupAsync(resourceGroupName, catalogName, productName, deviceGroupName, + filter, top, skip, maxpagesize, context)); } /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,33 +403,22 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -567,24 +426,15 @@ private Mono> getWithResponseAsync( * @return a Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -605,42 +455,28 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, accept, context); } /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { + private Mono getAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName) { return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -648,13 +484,13 @@ private Mono getAsync( /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -662,81 +498,62 @@ private Mono getAsync( * @return a Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { - return getWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context) { + return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + context).block(); } /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentInner get( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public DeploymentInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName) { - return getWithResponse( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, Context.NONE) - .getValue(); + return getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + Context.NONE).getValue(); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @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 deployment resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -762,62 +579,41 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @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 deployment resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -843,31 +639,21 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, resource, accept, context); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -875,36 +661,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, + private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DeploymentInner.class, - DeploymentInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deploymentName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeploymentInner.class, DeploymentInner.class, this.client.getContext()); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -913,34 +688,26 @@ private PollerFlux, DeploymentInner> beginCreateOrUp * @return the {@link PollerFlux} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, + private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeploymentInner.class, DeploymentInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deploymentName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeploymentInner.class, DeploymentInner.class, context); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -948,29 +715,23 @@ private PollerFlux, DeploymentInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, + public SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, resource).getSyncPoller(); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -979,30 +740,23 @@ public SyncPoller, DeploymentInner> beginCreateOrUpd * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, + public SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource, Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource, context) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, resource, context).getSyncPoller(); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1010,29 +764,22 @@ public SyncPoller, DeploymentInner> beginCreateOrUpd * @return an deployment resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource) { - return beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + resource).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1041,30 +788,22 @@ private Mono createOrUpdateAsync( * @return an deployment resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + resource, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1072,28 +811,22 @@ private Mono createOrUpdateAsync( * @return an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource) { - return createOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource) - .block(); + public DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource) { + return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + resource).block(); } /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1102,52 +835,37 @@ public DeploymentInner createOrUpdate( * @return an deployment resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - DeploymentInner resource, - Context context) { - return createOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, resource, context) - .block(); + public DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, DeploymentInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + resource, context).block(); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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>> deleteWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1168,33 +886,22 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deploymentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -1202,24 +909,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1240,60 +938,44 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deploymentName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, accept, context); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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> beginDeleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -1301,59 +983,47 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, productName, + deviceGroupName, deploymentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { - return this - .beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName) { + return this.beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName) .getSyncPoller(); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -1361,13 +1031,8 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deploymentName, Context context) { return this .beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context) .getSyncPoller(); @@ -1376,40 +1041,35 @@ public SyncPoller, Void> beginDelete( /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 deleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName) { - return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName) - .last() + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName) { + return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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. @@ -1417,38 +1077,28 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context) { return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName) { deleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName).block(); } @@ -1456,39 +1106,35 @@ public void delete( /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deploymentName, Context context) { deleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDeviceGroupNextSinglePageAsync(String nextLink) { @@ -1496,62 +1142,44 @@ private Mono> listByDeviceGroupNextSinglePageAsyn 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.")); + 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.listByDeviceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDeviceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDeviceGroupNextSinglePageAsync(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.")); + 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 - .listByDeviceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDeviceGroupNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsImpl.java index eb743c5dd580b..e3aefa1a66b69 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeploymentsImpl.java @@ -21,75 +21,42 @@ public final class DeploymentsImpl implements Deployments { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public DeploymentsImpl( - DeploymentsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public DeploymentsImpl(DeploymentsClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { - PagedIterable inner = - this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, productName, deviceGroupName); + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { + PagedIterable inner + = this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, productName, deviceGroupName); return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); } - public PagedIterable listByDeviceGroup( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByDeviceGroup( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - filter, - top, - skip, - maxpagesize, - context); + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, + productName, deviceGroupName, filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, catalogName, + productName, deviceGroupName, deploymentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeploymentImpl(inner.getValue(), this.manager())); } else { return null; } } - public Deployment get( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public Deployment get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName) { - DeploymentInner inner = - this.serviceClient().get(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName); + DeploymentInner inner + = this.serviceClient().get(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName); if (inner != null) { return new DeploymentImpl(inner, this.manager()); } else { @@ -97,63 +64,42 @@ public Deployment get( } } - public void delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName) { this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName); } - public void delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context) { - this - .serviceClient() - .delete(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context); + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deploymentName, Context context) { + this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + context); } public Deployment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } return this .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, Context.NONE) @@ -163,80 +109,58 @@ public Deployment getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } - return this - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context); + return this.getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, + context); } public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, Context.NONE); } @@ -244,39 +168,28 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, deploymentName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupImpl.java index b62722fd63eeb..3e9d09de71604 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupImpl.java @@ -5,17 +5,15 @@ package com.azure.resourcemanager.sphere.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest; import com.azure.resourcemanager.sphere.models.CountDeviceResponse; import com.azure.resourcemanager.sphere.models.DeviceGroup; +import com.azure.resourcemanager.sphere.models.DeviceGroupProperties; import com.azure.resourcemanager.sphere.models.DeviceGroupUpdate; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; +import com.azure.resourcemanager.sphere.models.DeviceGroupUpdateProperties; public final class DeviceGroupImpl implements DeviceGroup, DeviceGroup.Definition, DeviceGroup.Update { private DeviceGroupInner innerObject; @@ -34,32 +32,12 @@ public String type() { return this.innerModel().type(); } - public String description() { - return this.innerModel().description(); + public DeviceGroupProperties properties() { + return this.innerModel().properties(); } - public OSFeedType osFeedType() { - return this.innerModel().osFeedType(); - } - - public UpdatePolicy updatePolicy() { - return this.innerModel().updatePolicy(); - } - - public AllowCrashDumpCollection allowCrashDumpsCollection() { - return this.innerModel().allowCrashDumpsCollection(); - } - - public RegionalDataBoundary regionalDataBoundary() { - return this.innerModel().regionalDataBoundary(); - } - - public Boolean hasDeployment() { - return this.innerModel().hasDeployment(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -92,22 +70,14 @@ public DeviceGroupImpl withExistingProduct(String resourceGroupName, String cata } public DeviceGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .createOrUpdate( - resourceGroupName, catalogName, productName, deviceGroupName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getDeviceGroups().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, this.innerModel(), Context.NONE); return this; } public DeviceGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .createOrUpdate( - resourceGroupName, catalogName, productName, deviceGroupName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getDeviceGroups().createOrUpdate(resourceGroupName, + catalogName, productName, deviceGroupName, this.innerModel(), context); return this; } @@ -123,20 +93,14 @@ public DeviceGroupImpl update() { } public DeviceGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .update(resourceGroupName, catalogName, productName, deviceGroupName, updateProperties, Context.NONE); + this.innerObject = serviceManager.serviceClient().getDeviceGroups().update(resourceGroupName, catalogName, + productName, deviceGroupName, updateProperties, Context.NONE); return this; } public DeviceGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .update(resourceGroupName, catalogName, productName, deviceGroupName, updateProperties, context); + this.innerObject = serviceManager.serviceClient().getDeviceGroups().update(resourceGroupName, catalogName, + productName, deviceGroupName, updateProperties, context); return this; } @@ -150,98 +114,43 @@ public DeviceGroup apply(Context context) { } public DeviceGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceGroups() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE).getValue(); return this; } public DeviceGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceGroups() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceGroups() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context).getValue(); return this; } public void claimDevices(ClaimDevicesRequest claimDevicesRequest) { - serviceManager - .deviceGroups() - .claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest); + serviceManager.deviceGroups().claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest); } public void claimDevices(ClaimDevicesRequest claimDevicesRequest, Context context) { - serviceManager - .deviceGroups() - .claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context); + serviceManager.deviceGroups().claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest, context); } public Response countDevicesWithResponse(Context context) { - return serviceManager - .deviceGroups() - .countDevicesWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context); + return serviceManager.deviceGroups().countDevicesWithResponse(resourceGroupName, catalogName, productName, + deviceGroupName, context); } public CountDeviceResponse countDevices() { return serviceManager.deviceGroups().countDevices(resourceGroupName, catalogName, productName, deviceGroupName); } - public DeviceGroupImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateProperties.withDescription(description); - return this; - } - } - - public DeviceGroupImpl withOsFeedType(OSFeedType osFeedType) { - if (isInCreateMode()) { - this.innerModel().withOsFeedType(osFeedType); - return this; - } else { - this.updateProperties.withOsFeedType(osFeedType); - return this; - } - } - - public DeviceGroupImpl withUpdatePolicy(UpdatePolicy updatePolicy) { - if (isInCreateMode()) { - this.innerModel().withUpdatePolicy(updatePolicy); - return this; - } else { - this.updateProperties.withUpdatePolicy(updatePolicy); - return this; - } - } - - public DeviceGroupImpl withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) { - if (isInCreateMode()) { - this.innerModel().withAllowCrashDumpsCollection(allowCrashDumpsCollection); - return this; - } else { - this.updateProperties.withAllowCrashDumpsCollection(allowCrashDumpsCollection); - return this; - } - } - - public DeviceGroupImpl withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) { - if (isInCreateMode()) { - this.innerModel().withRegionalDataBoundary(regionalDataBoundary); - return this; - } else { - this.updateProperties.withRegionalDataBoundary(regionalDataBoundary); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + public DeviceGroupImpl withProperties(DeviceGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public DeviceGroupImpl withProperties(DeviceGroupUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsClientImpl.java index 2e01c5ca4e09a..8d2590c96e918 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsClientImpl.java @@ -43,22 +43,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeviceGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeviceGroupsClient. + */ public final class DeviceGroupsClientImpl implements DeviceGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DeviceGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of DeviceGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DeviceGroupsClientImpl(AzureSphereManagementClientImpl client) { - this.service = - RestProxy.create(DeviceGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DeviceGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -69,139 +75,93 @@ public final class DeviceGroupsClientImpl implements DeviceGroupsClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface DeviceGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProduct( - @HostParam("$host") String endpoint, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @QueryParam("api-version") String apiVersion, + Mono> listByProduct(@HostParam("$host") String endpoint, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") + @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("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @BodyParam("application/json") DeviceGroupInner resource, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @BodyParam("application/json") DeviceGroupInner resource, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @BodyParam("application/json") DeviceGroupUpdate properties, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @BodyParam("application/json") DeviceGroupUpdate properties, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices") - @ExpectedResponses({202}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> claimDevices( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, + Mono>> claimDevices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, @BodyParam("application/json") ClaimDevicesRequest claimDevicesRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> countDevices( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @HeaderParam("Accept") String accept, - Context context); + Mono> countDevices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByProductNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -213,28 +173,18 @@ Mono> listByProductNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByProductSinglePageAsync( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize) { + private Mono> listByProductSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -248,38 +198,18 @@ private Mono> listByProductSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByProduct( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByProduct(this.client.getEndpoint(), filter, top, skip, maxpagesize, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, + productName, 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 DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -292,29 +222,19 @@ private Mono> listByProductSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByProductSinglePageAsync( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + private Mono> listByProductSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -329,34 +249,16 @@ private Mono> listByProductSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByProduct( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByProduct(this.client.getEndpoint(), filter, top, skip, maxpagesize, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -370,25 +272,16 @@ private Mono> listByProductSinglePageAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByProductAsync( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize) { - return new PagedFlux<>( - () -> - listByProductSinglePageAsync( - resourceGroupName, catalogName, productName, filter, top, skip, maxpagesize), - nextLink -> listByProductNextSinglePageAsync(nextLink)); + private PagedFlux listByProductAsync(String resourceGroupName, String catalogName, + String productName, String filter, Integer top, Integer skip, Integer maxpagesize) { + return new PagedFlux<>(() -> listByProductSinglePageAsync(resourceGroupName, catalogName, productName, filter, + top, skip, maxpagesize), nextLink -> listByProductNextSinglePageAsync(nextLink)); } /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -398,23 +291,20 @@ private PagedFlux listByProductAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByProductAsync( - String resourceGroupName, String catalogName, String productName) { + private PagedFlux listByProductAsync(String resourceGroupName, String catalogName, + String productName) { final String filter = null; final Integer top = null; final Integer skip = null; final Integer maxpagesize = null; - return new PagedFlux<>( - () -> - listByProductSinglePageAsync( - resourceGroupName, catalogName, productName, filter, top, skip, maxpagesize), - nextLink -> listByProductNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByProductSinglePageAsync(resourceGroupName, catalogName, productName, filter, + top, skip, maxpagesize), nextLink -> listByProductNextSinglePageAsync(nextLink)); } /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -429,26 +319,16 @@ private PagedFlux listByProductAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByProductAsync( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - return new PagedFlux<>( - () -> - listByProductSinglePageAsync( - resourceGroupName, catalogName, productName, filter, top, skip, maxpagesize, context), - nextLink -> listByProductNextSinglePageAsync(nextLink, context)); + private PagedFlux listByProductAsync(String resourceGroupName, String catalogName, + String productName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { + return new PagedFlux<>(() -> listByProductSinglePageAsync(resourceGroupName, catalogName, productName, filter, + top, skip, maxpagesize, context), nextLink -> listByProductNextSinglePageAsync(nextLink, context)); } /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -458,8 +338,8 @@ private PagedFlux listByProductAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProduct( - String resourceGroupName, String catalogName, String productName) { + public PagedIterable listByProduct(String resourceGroupName, String catalogName, + String productName) { final String filter = null; final Integer top = null; final Integer skip = null; @@ -471,7 +351,7 @@ public PagedIterable listByProduct( /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -486,15 +366,8 @@ public PagedIterable listByProduct( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProduct( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listByProduct(String resourceGroupName, String catalogName, + String productName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listByProductAsync(resourceGroupName, catalogName, productName, filter, top, skip, maxpagesize, context)); } @@ -502,7 +375,7 @@ public PagedIterable listByProduct( /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -513,19 +386,15 @@ public PagedIterable listByProduct( * @return a DeviceGroup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -543,26 +412,16 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -574,19 +433,15 @@ private Mono> getWithResponseAsync( * @return a DeviceGroup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -604,23 +459,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, accept, context); } /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -631,8 +477,8 @@ private Mono> getWithResponseAsync( * @return a DeviceGroup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono getAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -640,7 +486,7 @@ private Mono getAsync( /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -652,15 +498,15 @@ private Mono getAsync( * @return a DeviceGroup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context) { return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, context).block(); } /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -671,15 +517,15 @@ public Response getWithResponse( * @return a DeviceGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceGroupInner get( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public DeviceGroupInner get(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { return getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE).getValue(); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -689,26 +535,18 @@ public DeviceGroupInner get( * @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 device group resource belonging to a product resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -731,27 +569,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, resource, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -762,27 +589,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 device group resource belonging to a product resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -805,24 +623,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, resource, + accept, context); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -835,27 +644,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeviceGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + String resourceGroupName, String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DeviceGroupInner.class, - DeviceGroupInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceGroupInner.class, DeviceGroupInner.class, this.client.getContext()); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -869,26 +669,19 @@ private PollerFlux, DeviceGroupInner> beginCreateOr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeviceGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context) { + String resourceGroupName, String catalogName, String productName, String deviceGroupName, + DeviceGroupInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceGroupInner.class, DeviceGroupInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceGroupInner.class, DeviceGroupInner.class, context); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -900,21 +693,16 @@ private PollerFlux, DeviceGroupInner> beginCreateOr * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource) + public SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource) .getSyncPoller(); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -927,13 +715,8 @@ public SyncPoller, DeviceGroupInner> beginCreateOrU * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context) { + public SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource, context) .getSyncPoller(); @@ -942,7 +725,7 @@ public SyncPoller, DeviceGroupInner> beginCreateOrU /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -954,21 +737,16 @@ public SyncPoller, DeviceGroupInner> beginCreateOrU * @return an device group resource belonging to a product resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -981,22 +759,16 @@ private Mono createOrUpdateAsync( * @return an device group resource belonging to a product resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1008,19 +780,15 @@ private Mono createOrUpdateAsync( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceGroupInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource) { + public DeviceGroupInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource) { return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource).block(); } /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1033,13 +801,8 @@ public DeviceGroupInner createOrUpdate( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceGroupInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupInner resource, - Context context) { + public DeviceGroupInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupInner resource, Context context) { return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, resource, context) .block(); } @@ -1047,7 +810,7 @@ public DeviceGroupInner createOrUpdate( /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1057,26 +820,18 @@ public DeviceGroupInner createOrUpdate( * @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 device group resource belonging to a product resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, DeviceGroupUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1099,27 +854,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - properties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1130,27 +874,18 @@ private Mono>> updateWithResponseAsync( * @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 device group resource belonging to a product resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, DeviceGroupUpdate properties, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1173,24 +908,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, properties, accept, context); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1202,28 +927,18 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceGroupInner> beginUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DeviceGroupInner.class, - DeviceGroupInner.class, - this.client.getContext()); + private PollerFlux, DeviceGroupInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceGroupInner.class, DeviceGroupInner.class, this.client.getContext()); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1236,26 +951,19 @@ private PollerFlux, DeviceGroupInner> beginUpdateAs * @return the {@link PollerFlux} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceGroupInner> beginUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context) { + private PollerFlux, DeviceGroupInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupUpdate properties, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceGroupInner.class, DeviceGroupInner.class, context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, catalogName, productName, + deviceGroupName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceGroupInner.class, DeviceGroupInner.class, context); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1267,21 +975,16 @@ private PollerFlux, DeviceGroupInner> beginUpdateAs * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceGroupInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties) { - return this - .beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties) + public SyncPoller, DeviceGroupInner> beginUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties) .getSyncPoller(); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1294,22 +997,16 @@ public SyncPoller, DeviceGroupInner> beginUpdate( * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceGroupInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties, context) + public SyncPoller, DeviceGroupInner> beginUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, DeviceGroupUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties, context) .getSyncPoller(); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1321,21 +1018,16 @@ public SyncPoller, DeviceGroupInner> beginUpdate( * @return an device group resource belonging to a product resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties) { - return beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties) - .last() + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupUpdate properties) { + return beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1348,22 +1040,16 @@ private Mono updateAsync( * @return an device group resource belonging to a product resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context) { + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupUpdate properties, Context context) { return beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1375,19 +1061,15 @@ private Mono updateAsync( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceGroupInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties) { + public DeviceGroupInner update(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupUpdate properties) { return updateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties).block(); } /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1400,20 +1082,15 @@ public DeviceGroupInner update( * @return an device group resource belonging to a product resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceGroupInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - DeviceGroupUpdate properties, - Context context) { + public DeviceGroupInner update(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, DeviceGroupUpdate properties, Context context) { return updateAsync(resourceGroupName, catalogName, productName, deviceGroupName, properties, context).block(); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1424,19 +1101,15 @@ public DeviceGroupInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1454,26 +1127,16 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1485,19 +1148,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1515,23 +1174,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, accept, context); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1542,20 +1192,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1567,20 +1215,19 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1591,15 +1238,15 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { return this.beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName).getSyncPoller(); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1611,17 +1258,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, context) .getSyncPoller(); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1632,17 +1278,16 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { - return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName) - .last() + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { + return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1654,17 +1299,16 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1681,7 +1325,7 @@ public void delete(String resourceGroupName, String catalogName, String productN /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1692,15 +1336,15 @@ public void delete(String resourceGroupName, String catalogName, String productN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + Context context) { deleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, context).block(); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1712,23 +1356,15 @@ public void delete( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> claimDevicesWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest) { + private Mono>> claimDevicesWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1752,27 +1388,16 @@ private Mono>> claimDevicesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .claimDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - claimDevicesRequest, - accept, - context)) + .withContext(context -> service.claimDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1785,24 +1410,15 @@ private Mono>> claimDevicesWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> claimDevicesWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { + private Mono>> claimDevicesWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1826,24 +1442,15 @@ private Mono>> claimDevicesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .claimDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - claimDevicesRequest, - accept, - context); + return service.claimDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest, accept, context); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1855,25 +1462,18 @@ private Mono>> claimDevicesWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClaimDevicesAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest) { - Mono>> mono = - claimDevicesWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginClaimDevicesAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { + Mono>> mono = claimDevicesWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, claimDevicesRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1886,26 +1486,19 @@ private PollerFlux, Void> beginClaimDevicesAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClaimDevicesAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { + private PollerFlux, Void> beginClaimDevicesAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - claimDevicesWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = claimDevicesWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, claimDevicesRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1917,12 +1510,8 @@ private PollerFlux, Void> beginClaimDevicesAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClaimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest) { + public SyncPoller, Void> beginClaimDevices(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { return this .beginClaimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest) .getSyncPoller(); @@ -1931,7 +1520,7 @@ public SyncPoller, Void> beginClaimDevices( /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1944,23 +1533,16 @@ public SyncPoller, Void> beginClaimDevices( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClaimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { - return this - .beginClaimDevicesAsync( - resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context) - .getSyncPoller(); + public SyncPoller, Void> beginClaimDevices(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest, Context context) { + return this.beginClaimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest, context).getSyncPoller(); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1972,21 +1554,16 @@ public SyncPoller, Void> beginClaimDevices( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono claimDevicesAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest) { + private Mono claimDevicesAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { return beginClaimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1999,23 +1576,16 @@ private Mono claimDevicesAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono claimDevicesAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { - return beginClaimDevicesAsync( - resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono claimDevicesAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, ClaimDevicesRequest claimDevicesRequest, Context context) { + return beginClaimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2026,11 +1596,7 @@ private Mono claimDevicesAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { claimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest).block(); } @@ -2038,7 +1604,7 @@ public void claimDevices( /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2050,13 +1616,8 @@ public void claimDevices( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { + public void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + ClaimDevicesRequest claimDevicesRequest, Context context) { claimDevicesAsync(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context) .block(); } @@ -2064,7 +1625,7 @@ public void claimDevices( /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2073,22 +1634,18 @@ public void claimDevices( * @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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2106,26 +1663,16 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context)) + .withContext(context -> service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2135,22 +1682,18 @@ private Mono> countDevicesWithResponseAsync( * @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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2168,23 +1711,15 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context); + return service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, accept, + context); } /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2195,8 +1730,8 @@ private Mono> countDevicesWithResponseAsync( * @return response to the action call for count devices in a catalog on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono countDevicesAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono countDevicesAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { return countDevicesWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -2204,7 +1739,7 @@ private Mono countDevicesAsync( /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2216,8 +1751,8 @@ private Mono countDevicesAsync( * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { return countDevicesWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, context) .block(); } @@ -2225,7 +1760,7 @@ public Response countDevicesWithResponse( /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2236,22 +1771,23 @@ public Response countDevicesWithResponse( * @return response to the action call for count devices in a catalog. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CountDeviceResponseInner countDevices( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { return countDevicesWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByProductNextSinglePageAsync(String nextLink) { @@ -2259,37 +1795,29 @@ private Mono> listByProductNextSinglePageAsync(S 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.")); + 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.listByProductNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByProductNextSinglePageAsync(String nextLink, Context context) { @@ -2297,23 +1825,13 @@ private Mono> listByProductNextSinglePageAsync(S 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.")); + 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 - .listByProductNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByProductNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsImpl.java index 3e768fc39155e..c43db7485e6ac 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceGroupsImpl.java @@ -24,43 +24,31 @@ public final class DeviceGroupsImpl implements DeviceGroups { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public DeviceGroupsImpl( - DeviceGroupsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public DeviceGroupsImpl(DeviceGroupsClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName) { - PagedIterable inner = - this.serviceClient().listByProduct(resourceGroupName, catalogName, productName); + PagedIterable inner + = this.serviceClient().listByProduct(resourceGroupName, catalogName, productName); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } - public PagedIterable listByProduct( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByProduct(resourceGroupName, catalogName, productName, filter, top, skip, maxpagesize, context); + public PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listByProduct(resourceGroupName, catalogName, + productName, filter, top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, catalogName, + productName, deviceGroupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeviceGroupImpl(inner.getValue(), this.manager())); } else { return null; @@ -80,55 +68,39 @@ public void delete(String resourceGroupName, String catalogName, String productN this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName); } - public void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + Context context) { this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName, context); } - public void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + public void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest) { - this - .serviceClient() - .claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest); + this.serviceClient().claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest); } - public void claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context) { - this - .serviceClient() - .claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, claimDevicesRequest, context); + public void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + ClaimDevicesRequest claimDevicesRequest, Context context) { + this.serviceClient().claimDevices(resourceGroupName, catalogName, productName, deviceGroupName, + claimDevicesRequest, context); } - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - Response inner = - this - .serviceClient() - .countDevicesWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context); + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { + Response inner = this.serviceClient().countDevicesWithResponse(resourceGroupName, + catalogName, productName, deviceGroupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CountDeviceResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public CountDeviceResponse countDevices( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { - CountDeviceResponseInner inner = - this.serviceClient().countDevices(resourceGroupName, catalogName, productName, deviceGroupName); + public CountDeviceResponse countDevices(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { + CountDeviceResponseInner inner + = this.serviceClient().countDevices(resourceGroupName, catalogName, productName, deviceGroupName); if (inner != null) { return new CountDeviceResponseImpl(inner, this.manager()); } else { @@ -139,67 +111,48 @@ public CountDeviceResponse countDevices( public DeviceGroup getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } - return this - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE) + return this.getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, context); } @@ -207,32 +160,23 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, Context.NONE); } @@ -240,32 +184,23 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceImpl.java index a7b8dd47135f1..35c9c62d276db 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceImpl.java @@ -4,14 +4,15 @@ package com.azure.resourcemanager.sphere.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeviceInner; import com.azure.resourcemanager.sphere.models.Device; +import com.azure.resourcemanager.sphere.models.DeviceProperties; import com.azure.resourcemanager.sphere.models.DeviceUpdate; +import com.azure.resourcemanager.sphere.models.DeviceUpdateProperties; import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import com.azure.resourcemanager.sphere.models.SignedCapabilityImageResponse; -import java.time.OffsetDateTime; public final class DeviceImpl implements Device, Device.Definition, Device.Update { private DeviceInner innerObject; @@ -30,32 +31,12 @@ public String type() { return this.innerModel().type(); } - public String deviceId() { - return this.innerModel().deviceId(); + public DeviceProperties properties() { + return this.innerModel().properties(); } - public String chipSku() { - return this.innerModel().chipSku(); - } - - public String lastAvailableOsVersion() { - return this.innerModel().lastAvailableOsVersion(); - } - - public String lastInstalledOsVersion() { - return this.innerModel().lastInstalledOsVersion(); - } - - public OffsetDateTime lastOsUpdateUtc() { - return this.innerModel().lastOsUpdateUtc(); - } - - public OffsetDateTime lastUpdateRequestUtc() { - return this.innerModel().lastUpdateRequestUtc(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -82,8 +63,8 @@ private com.azure.resourcemanager.sphere.AzureSphereManager manager() { private DeviceUpdate updateProperties; - public DeviceImpl withExistingDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public DeviceImpl withExistingDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { this.resourceGroupName = resourceGroupName; this.catalogName = catalogName; this.productName = productName; @@ -92,34 +73,14 @@ public DeviceImpl withExistingDeviceGroup( } public Device create() { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - this.innerModel(), - Context.NONE); + this.innerObject = serviceManager.serviceClient().getDevices().createOrUpdate(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, this.innerModel(), Context.NONE); return this; } public Device create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .createOrUpdate( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - this.innerModel(), - context); + this.innerObject = serviceManager.serviceClient().getDevices().createOrUpdate(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, this.innerModel(), context); return this; } @@ -135,34 +96,14 @@ public DeviceImpl update() { } public Device apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .update( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - updateProperties, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getDevices().update(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, updateProperties, Context.NONE); return this; } public Device apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .update( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - updateProperties, - context); + this.innerObject = serviceManager.serviceClient().getDevices().update(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, updateProperties, context); return this; } @@ -177,59 +118,38 @@ public Device apply(Context context) { } public Device refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDevices() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, Context.NONE) + .getValue(); return this; } public Device refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDevices() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDevices() + .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) + .getValue(); return this; } - public SignedCapabilityImageResponse generateCapabilityImage( - GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - return serviceManager - .devices() - .generateCapabilityImage( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest); - } - - public SignedCapabilityImageResponse generateCapabilityImage( - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { - return serviceManager - .devices() - .generateCapabilityImage( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context); - } - - public DeviceImpl withDeviceId(String deviceId) { - this.innerModel().withDeviceId(deviceId); + public SignedCapabilityImageResponse + generateCapabilityImage(GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { + return serviceManager.devices().generateCapabilityImage(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, generateDeviceCapabilityRequest); + } + + public SignedCapabilityImageResponse + generateCapabilityImage(GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { + return serviceManager.devices().generateCapabilityImage(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, generateDeviceCapabilityRequest, context); + } + + public DeviceImpl withProperties(DeviceProperties properties) { + this.innerModel().withProperties(properties); return this; } - public DeviceImpl withDeviceGroupId(String deviceGroupId) { - this.updateProperties.withDeviceGroupId(deviceGroupId); + public DeviceImpl withProperties(DeviceUpdateProperties properties) { + this.updateProperties.withProperties(properties); return this; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceInsightImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceInsightImpl.java index 8ad28a3361318..1671950314c7f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceInsightImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DeviceInsightImpl.java @@ -13,8 +13,8 @@ public final class DeviceInsightImpl implements DeviceInsight { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - DeviceInsightImpl( - DeviceInsightInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + DeviceInsightImpl(DeviceInsightInner innerObject, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesClientImpl.java index ab9b3fdad9735..ad2f22c266bad 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesClientImpl.java @@ -43,17 +43,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DevicesClient. */ +/** + * An instance of this class provides access to all the operations defined in DevicesClient. + */ public final class DevicesClientImpl implements DevicesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DevicesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of DevicesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DevicesClientImpl(AzureSphereManagementClientImpl client) { @@ -62,131 +68,89 @@ public final class DevicesClientImpl implements DevicesClient { } /** - * The interface defining all the services for AzureSphereManagementClientDevices to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for AzureSphereManagementClientDevices to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface DevicesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDeviceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") - @ExpectedResponses({200}) + Mono> listByDeviceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") + @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("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deviceName") String deviceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deviceName") String deviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deviceName") String deviceName, - @BodyParam("application/json") DeviceInner resource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") - @ExpectedResponses({200, 202}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deviceName") String deviceName, @BodyParam("application/json") DeviceInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deviceName") String deviceName, - @BodyParam("application/json") DeviceUpdate properties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") - @ExpectedResponses({200, 202, 204}) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deviceName") String deviceName, @BodyParam("application/json") DeviceUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, - @PathParam("deviceName") String deviceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, + @PathParam("deviceName") String deviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> generateCapabilityImage( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @PathParam("deviceGroupName") String deviceGroupName, + Mono>> generateCapabilityImage(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @PathParam("deviceGroupName") String deviceGroupName, @PathParam("deviceName") String deviceName, @BodyParam("application/json") GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDeviceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -195,22 +159,18 @@ Mono> listByDeviceGroupNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDeviceGroupSinglePageAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private Mono> listByDeviceGroupSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,35 +188,18 @@ private Mono> listByDeviceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDeviceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDeviceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, 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 Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -266,22 +209,18 @@ private Mono> listByDeviceGroupSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDeviceGroupSinglePageAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + private Mono> listByDeviceGroupSinglePageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -300,31 +239,16 @@ private Mono> listByDeviceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDeviceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDeviceGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -335,8 +259,8 @@ private Mono> listByDeviceGroupSinglePageAsync( * @return the response of a Device list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDeviceGroupAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + private PagedFlux listByDeviceGroupAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { return new PagedFlux<>( () -> listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, deviceGroupName), nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink)); @@ -345,7 +269,7 @@ private PagedFlux listByDeviceGroupAsync( /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -357,18 +281,16 @@ private PagedFlux listByDeviceGroupAsync( * @return the response of a Device list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDeviceGroupAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - return new PagedFlux<>( - () -> - listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, deviceGroupName, context), - nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink, context)); + private PagedFlux listByDeviceGroupAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { + return new PagedFlux<>(() -> listByDeviceGroupSinglePageAsync(resourceGroupName, catalogName, productName, + deviceGroupName, context), nextLink -> listByDeviceGroupNextSinglePageAsync(nextLink, context)); } /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -379,8 +301,8 @@ private PagedFlux listByDeviceGroupAsync( * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, + String productName, String deviceGroupName) { return new PagedIterable<>( listByDeviceGroupAsync(resourceGroupName, catalogName, productName, deviceGroupName)); } @@ -388,7 +310,7 @@ public PagedIterable listByDeviceGroup( /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -400,8 +322,8 @@ public PagedIterable listByDeviceGroup( * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context) { return new PagedIterable<>( listByDeviceGroupAsync(resourceGroupName, catalogName, productName, deviceGroupName, context)); } @@ -409,7 +331,7 @@ public PagedIterable listByDeviceGroup( /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -421,19 +343,15 @@ public PagedIterable listByDeviceGroup( * @return a Device along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -454,27 +372,16 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -487,24 +394,15 @@ private Mono> getWithResponseAsync( * @return a Device along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -525,24 +423,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, deviceName, accept, context); } /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -554,8 +442,8 @@ private Mono> getWithResponseAsync( * @return a Device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + private Mono getAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName) { return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -563,7 +451,7 @@ private Mono getAsync( /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -576,13 +464,8 @@ private Mono getAsync( * @return a Device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context) { return getWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) .block(); } @@ -590,7 +473,7 @@ public Response getWithResponse( /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -602,8 +485,8 @@ public Response getWithResponse( * @return a Device. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner get( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + public DeviceInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName) { return getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, Context.NONE) .getValue(); } @@ -611,7 +494,7 @@ public DeviceInner get( /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -622,27 +505,18 @@ public DeviceInner get( * @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 device resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -668,28 +542,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -701,28 +563,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 device resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -748,25 +601,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + resource, accept, context); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -779,26 +622,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, this.client.getContext()); + private PollerFlux, DeviceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceInner.class, DeviceInner.class, this.client.getContext()); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -812,28 +647,20 @@ private PollerFlux, DeviceInner> beginCreateOrUpdateAsyn * @return the {@link PollerFlux} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, + private PollerFlux, DeviceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceInner.class, DeviceInner.class, context); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -846,23 +673,16 @@ private PollerFlux, DeviceInner> beginCreateOrUpdateAsyn * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource) - .getSyncPoller(); + public SyncPoller, DeviceInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + resource).getSyncPoller(); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -876,24 +696,17 @@ public SyncPoller, DeviceInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceInner> beginCreateOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, + public SyncPoller, DeviceInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceInner resource, Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource, context) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + resource, context).getSyncPoller(); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -906,23 +719,16 @@ public SyncPoller, DeviceInner> beginCreateOrUpdate( * @return an device resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource) { - return beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + resource).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -936,24 +742,16 @@ private Mono createOrUpdateAsync( * @return an device resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + resource, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -966,13 +764,8 @@ private Mono createOrUpdateAsync( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource) { + public DeviceInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceInner resource) { return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource) .block(); } @@ -980,7 +773,7 @@ public DeviceInner createOrUpdate( /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the * catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -994,23 +787,16 @@ public DeviceInner createOrUpdate( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner createOrUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceInner resource, - Context context) { - return createOrUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource, context) - .block(); + public DeviceInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, resource, + context).block(); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1021,27 +807,18 @@ public DeviceInner createOrUpdate( * @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 device resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1067,28 +844,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - properties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1100,28 +865,18 @@ private Mono>> updateWithResponseAsync( * @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 device resource belonging to a device group resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1147,25 +902,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, accept, context); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1178,26 +922,18 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceInner> beginUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, this.client.getContext()); + private PollerFlux, DeviceInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceInner.class, DeviceInner.class, this.client.getContext()); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1211,28 +947,20 @@ private PollerFlux, DeviceInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeviceInner> beginUpdateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, + private PollerFlux, DeviceInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, DeviceUpdate properties, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeviceInner.class, DeviceInner.class, context); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1245,13 +973,8 @@ private PollerFlux, DeviceInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties) { + public SyncPoller, DeviceInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties) { return this .beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties) .getSyncPoller(); @@ -1260,7 +983,7 @@ public SyncPoller, DeviceInner> beginUpdate( /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1274,24 +997,16 @@ public SyncPoller, DeviceInner> beginUpdate( * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeviceInner> beginUpdate( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context) { - return this - .beginUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, context) - .getSyncPoller(); + public SyncPoller, DeviceInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, DeviceUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + properties, context).getSyncPoller(); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1304,22 +1019,16 @@ public SyncPoller, DeviceInner> beginUpdate( * @return an device resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties) { + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceUpdate properties) { return beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1333,24 +1042,16 @@ private Mono updateAsync( * @return an device resource belonging to a device group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context) { - return beginUpdateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, DeviceUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1363,13 +1064,8 @@ private Mono updateAsync( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties) { + public DeviceInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceUpdate properties) { return updateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties) .block(); } @@ -1377,7 +1073,7 @@ public DeviceInner update( /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the * catalog level. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1391,22 +1087,15 @@ public DeviceInner update( * @return an device resource belonging to a device group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner update( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - DeviceUpdate properties, - Context context) { - return updateAsync( - resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, context) - .block(); + public DeviceInner update(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, DeviceUpdate properties, Context context) { + return updateAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, properties, + context).block(); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1418,19 +1107,15 @@ public DeviceInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1451,26 +1136,15 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1483,24 +1157,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1521,23 +1186,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, deviceGroupName, deviceName, accept, context); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1549,19 +1204,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1574,24 +1227,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1603,16 +1250,15 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { - return this - .beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName) { + return this.beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName) .getSyncPoller(); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1625,21 +1271,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { - return this - .beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) .getSyncPoller(); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1651,16 +1291,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { - return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName) - .last() + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName) { + return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1673,21 +1312,15 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context) { return beginDeleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1698,14 +1331,14 @@ private Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName) { deleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName).block(); } /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1717,20 +1350,15 @@ public void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, Context context) { deleteAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context).block(); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1740,28 +1368,20 @@ public void delete( * @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 signed device capability image response along with {@link Response} on successful completion of {@link - * Mono}. + * @return signed device capability image response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateCapabilityImageWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + private Mono>> generateCapabilityImageWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1781,37 +1401,23 @@ private Mono>> generateCapabilityImageWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); } if (generateDeviceCapabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter generateDeviceCapabilityRequest is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter generateDeviceCapabilityRequest is required and cannot be null.")); } else { generateDeviceCapabilityRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .generateCapabilityImage( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - accept, - context)) + .withContext(context -> service.generateCapabilityImage(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, generateDeviceCapabilityRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1822,29 +1428,20 @@ private Mono>> generateCapabilityImageWithResponseAsyn * @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 signed device capability image response along with {@link Response} on successful completion of {@link - * Mono}. + * @return signed device capability image response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateCapabilityImageWithResponseAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context) { + private Mono>> generateCapabilityImageWithResponseAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1864,34 +1461,22 @@ private Mono>> generateCapabilityImageWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter deviceName is required and cannot be null.")); } if (generateDeviceCapabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter generateDeviceCapabilityRequest is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter generateDeviceCapabilityRequest is required and cannot be null.")); } else { generateDeviceCapabilityRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .generateCapabilityImage( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - accept, - context); + return service.generateCapabilityImage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + generateDeviceCapabilityRequest, accept, context); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1905,35 +1490,19 @@ private Mono>> generateCapabilityImageWithResponseAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - Mono>> mono = - generateCapabilityImageWithResponseAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SignedCapabilityImageResponseInner.class, - SignedCapabilityImageResponseInner.class, - this.client.getContext()); + beginGenerateCapabilityImageAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { + Mono>> mono = generateCapabilityImageWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, generateDeviceCapabilityRequest); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SignedCapabilityImageResponseInner.class, + SignedCapabilityImageResponseInner.class, this.client.getContext()); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1948,38 +1517,21 @@ private Mono>> generateCapabilityImageWithResponseAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, + beginGenerateCapabilityImageAsync(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - generateCapabilityImageWithResponseAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SignedCapabilityImageResponseInner.class, - SignedCapabilityImageResponseInner.class, - context); + Mono>> mono = generateCapabilityImageWithResponseAsync(resourceGroupName, catalogName, + productName, deviceGroupName, deviceName, generateDeviceCapabilityRequest, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SignedCapabilityImageResponseInner.class, + SignedCapabilityImageResponseInner.class, context); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1993,28 +1545,16 @@ private Mono>> generateCapabilityImageWithResponseAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - return this - .beginGenerateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest) - .getSyncPoller(); + beginGenerateCapabilityImage(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { + return this.beginGenerateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, generateDeviceCapabilityRequest).getSyncPoller(); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2029,30 +1569,17 @@ private Mono>> generateCapabilityImageWithResponseAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignedCapabilityImageResponseInner> - beginGenerateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, + beginGenerateCapabilityImage(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { - return this - .beginGenerateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context) - .getSyncPoller(); + return this.beginGenerateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, generateDeviceCapabilityRequest, context).getSyncPoller(); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2065,28 +1592,17 @@ private Mono>> generateCapabilityImageWithResponseAsyn * @return signed device capability image response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCapabilityImageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + private Mono generateCapabilityImageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - return beginGenerateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginGenerateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, generateDeviceCapabilityRequest).last().flatMap(this.client::getLroFinalResultOrError); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2100,30 +1616,17 @@ private Mono generateCapabilityImageAsync( * @return signed device capability image response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCapabilityImageAsync( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context) { - return beginGenerateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono generateCapabilityImageAsync(String resourceGroupName, + String catalogName, String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { + return beginGenerateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, + deviceName, generateDeviceCapabilityRequest, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2136,27 +1639,17 @@ private Mono generateCapabilityImageAsync( * @return signed device capability image response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SignedCapabilityImageResponseInner generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + public SignedCapabilityImageResponseInner generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - return generateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest) - .block(); + return generateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + generateDeviceCapabilityRequest).block(); } /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -2170,35 +1663,24 @@ public SignedCapabilityImageResponseInner generateCapabilityImage( * @return signed device capability image response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SignedCapabilityImageResponseInner generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context) { - return generateCapabilityImageAsync( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context) - .block(); + public SignedCapabilityImageResponseInner generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { + return generateCapabilityImageAsync(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, + generateDeviceCapabilityRequest, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDeviceGroupNextSinglePageAsync(String nextLink) { @@ -2206,37 +1688,29 @@ private Mono> listByDeviceGroupNextSinglePageAsync(St 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.")); + 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.listByDeviceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDeviceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -2244,23 +1718,13 @@ private Mono> listByDeviceGroupNextSinglePageAsync(St 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.")); + 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 - .listByDeviceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDeviceGroupNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesImpl.java index 2da011f018f7c..359a9347c3ff4 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/DevicesImpl.java @@ -29,48 +29,36 @@ public DevicesImpl(DevicesClient innerClient, com.azure.resourcemanager.sphere.A this.serviceManager = serviceManager; } - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName) { - PagedIterable inner = - this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, productName, deviceGroupName); + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName) { + PagedIterable inner + = this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, productName, deviceGroupName); return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); } - public PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context) { - PagedIterable inner = - this - .serviceClient() - .listByDeviceGroup(resourceGroupName, catalogName, productName, deviceGroupName, context); + public PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByDeviceGroup(resourceGroupName, catalogName, + productName, deviceGroupName, context); return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, catalogName, productName, + deviceGroupName, deviceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeviceImpl(inner.getValue(), this.manager())); } else { return null; } } - public Device get( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { - DeviceInner inner = - this.serviceClient().get(resourceGroupName, catalogName, productName, deviceGroupName, deviceName); + public Device get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName) { + DeviceInner inner + = this.serviceClient().get(resourceGroupName, catalogName, productName, deviceGroupName, deviceName); if (inner != null) { return new DeviceImpl(inner, this.manager()); } else { @@ -78,38 +66,21 @@ public Device get( } } - public void delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName) { this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName, deviceName); } - public void delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context) { + public void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, Context context) { this.serviceClient().delete(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context); } - public SignedCapabilityImageResponse generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + public SignedCapabilityImageResponse generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest) { - SignedCapabilityImageResponseInner inner = - this - .serviceClient() - .generateCapabilityImage( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest); + SignedCapabilityImageResponseInner inner = this.serviceClient().generateCapabilityImage(resourceGroupName, + catalogName, productName, deviceGroupName, deviceName, generateDeviceCapabilityRequest); if (inner != null) { return new SignedCapabilityImageResponseImpl(inner, this.manager()); } else { @@ -117,25 +88,11 @@ public SignedCapabilityImageResponse generateCapabilityImage( } } - public SignedCapabilityImageResponse generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context) { - SignedCapabilityImageResponseInner inner = - this - .serviceClient() - .generateCapabilityImage( - resourceGroupName, - catalogName, - productName, - deviceGroupName, - deviceName, - generateDeviceCapabilityRequest, - context); + public SignedCapabilityImageResponse generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context) { + SignedCapabilityImageResponseInner inner = this.serviceClient().generateCapabilityImage(resourceGroupName, + catalogName, productName, deviceGroupName, deviceName, generateDeviceCapabilityRequest, context); if (inner != null) { return new SignedCapabilityImageResponseImpl(inner, this.manager()); } else { @@ -146,39 +103,28 @@ public SignedCapabilityImageResponse generateCapabilityImage( public Device getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); } return this .getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, Context.NONE) @@ -188,39 +134,28 @@ public Device getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context); } @@ -228,39 +163,28 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, Context.NONE); } @@ -268,39 +192,28 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } String deviceGroupName = Utils.getValueFromIdByName(id, "deviceGroups"); if (deviceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceGroups'.", id))); } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); } this.delete(resourceGroupName, catalogName, productName, deviceGroupName, deviceName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImageImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImageImpl.java index a1d69b14dd2ab..8571a2fb68e68 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImageImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImageImpl.java @@ -4,12 +4,11 @@ package com.azure.resourcemanager.sphere.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.ImageInner; import com.azure.resourcemanager.sphere.models.Image; -import com.azure.resourcemanager.sphere.models.ImageType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; +import com.azure.resourcemanager.sphere.models.ImageProperties; public final class ImageImpl implements Image, Image.Definition, Image.Update { private ImageInner innerObject; @@ -28,40 +27,12 @@ public String type() { return this.innerModel().type(); } - public String image() { - return this.innerModel().image(); + public ImageProperties properties() { + return this.innerModel().properties(); } - public String imageId() { - return this.innerModel().imageId(); - } - - public String imageName() { - return this.innerModel().imageName(); - } - - public RegionalDataBoundary regionalDataBoundary() { - return this.innerModel().regionalDataBoundary(); - } - - public String uri() { - return this.innerModel().uri(); - } - - public String description() { - return this.innerModel().description(); - } - - public String componentId() { - return this.innerModel().componentId(); - } - - public ImageType imageType() { - return this.innerModel().imageType(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -89,20 +60,14 @@ public ImageImpl withExistingCatalog(String resourceGroupName, String catalogNam } public Image create() { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .createOrUpdate(resourceGroupName, catalogName, imageName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getImages().createOrUpdate(resourceGroupName, catalogName, + imageName, this.innerModel(), Context.NONE); return this; } public Image create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .createOrUpdate(resourceGroupName, catalogName, imageName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getImages().createOrUpdate(resourceGroupName, catalogName, + imageName, this.innerModel(), context); return this; } @@ -117,20 +82,14 @@ public ImageImpl update() { } public Image apply() { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .createOrUpdate(resourceGroupName, catalogName, imageName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getImages().createOrUpdate(resourceGroupName, catalogName, + imageName, this.innerModel(), Context.NONE); return this; } public Image apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .createOrUpdate(resourceGroupName, catalogName, imageName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getImages().createOrUpdate(resourceGroupName, catalogName, + imageName, this.innerModel(), context); return this; } @@ -143,37 +102,19 @@ public Image apply(Context context) { } public Image refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .getWithResponse(resourceGroupName, catalogName, imageName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getImages() + .getWithResponse(resourceGroupName, catalogName, imageName, Context.NONE).getValue(); return this; } public Image refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getImages() - .getWithResponse(resourceGroupName, catalogName, imageName, context) - .getValue(); - return this; - } - - public ImageImpl withImage(String image) { - this.innerModel().withImage(image); - return this; - } - - public ImageImpl withImageId(String imageId) { - this.innerModel().withImageId(imageId); + this.innerObject = serviceManager.serviceClient().getImages() + .getWithResponse(resourceGroupName, catalogName, imageName, context).getValue(); return this; } - public ImageImpl withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) { - this.innerModel().withRegionalDataBoundary(regionalDataBoundary); + public ImageImpl withProperties(ImageProperties properties) { + this.innerModel().withProperties(properties); return this; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesClientImpl.java index fa5d3497afd07..6ad16ea2b48cb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesClientImpl.java @@ -38,17 +38,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ImagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ImagesClient. + */ public final class ImagesClientImpl implements ImagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ImagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of ImagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ImagesClientImpl(AzureSphereManagementClientImpl client) { @@ -63,84 +69,57 @@ public final class ImagesClientImpl implements ImagesClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface ImagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCatalog( - @HostParam("$host") String endpoint, - @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @QueryParam("$maxpagesize") Integer maxpagesize, - @QueryParam("api-version") String apiVersion, + Mono> listByCatalog(@HostParam("$host") String endpoint, + @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, + @QueryParam("$maxpagesize") Integer maxpagesize, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") + @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("catalogName") String catalogName, - @PathParam("imageName") String imageName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("imageName") String imageName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("imageName") String imageName, - @BodyParam("application/json") ImageInner resource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("imageName") String imageName, @BodyParam("application/json") ImageInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("imageName") String imageName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("imageName") String imageName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCatalogNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -151,22 +130,18 @@ Mono> listByCatalogNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Image list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,36 +152,17 @@ private Mono> listByCatalogSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCatalog( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByCatalog(this.client.getEndpoint(), filter, top, skip, maxpagesize, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, catalogName, 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 Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -218,28 +174,18 @@ private Mono> listByCatalogSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Image list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, String catalogName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -251,32 +197,15 @@ private Mono> listByCatalogSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCatalog( - this.client.getEndpoint(), - filter, - top, - skip, - maxpagesize, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByCatalog(this.client.getEndpoint(), filter, top, skip, maxpagesize, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -289,8 +218,8 @@ private Mono> listByCatalogSinglePageAsync( * @return the response of a Image list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCatalogAsync( - String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) { + private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize) { return new PagedFlux<>( () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize), nextLink -> listByCatalogNextSinglePageAsync(nextLink)); @@ -298,7 +227,7 @@ private PagedFlux listByCatalogAsync( /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,7 +248,7 @@ private PagedFlux listByCatalogAsync(String resourceGroupName, Strin /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -333,14 +262,8 @@ private PagedFlux listByCatalogAsync(String resourceGroupName, Strin * @return the response of a Image list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCatalogAsync( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedFlux<>( () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context), nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); @@ -348,7 +271,7 @@ private PagedFlux listByCatalogAsync( /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,7 +290,7 @@ public PagedIterable listByCatalog(String resourceGroupName, String /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -381,21 +304,15 @@ public PagedIterable listByCatalog(String resourceGroupName, String * @return the response of a Image list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { + public PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context) { return new PagedIterable<>( listByCatalogAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context)); } /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -405,19 +322,15 @@ public PagedIterable listByCatalog( * @return a Image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String imageName) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String imageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,24 +344,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, imageName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -459,19 +362,15 @@ private Mono> getWithResponseAsync( * @return a Image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String imageName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String imageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -485,21 +384,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, imageName, accept, context); } /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -516,7 +407,7 @@ private Mono getAsync(String resourceGroupName, String catalogName, /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -527,14 +418,14 @@ private Mono getAsync(String resourceGroupName, String catalogName, * @return a Image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String catalogName, String imageName, Context context) { + public Response getWithResponse(String resourceGroupName, String catalogName, String imageName, + Context context) { return getWithResponseAsync(resourceGroupName, catalogName, imageName, context).block(); } /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -550,7 +441,7 @@ public ImageInner get(String resourceGroupName, String catalogName, String image /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -559,22 +450,18 @@ public ImageInner get(String resourceGroupName, String catalogName, String image * @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 image resource belonging to a catalog resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String imageName, ImageInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -593,25 +480,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, imageName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -621,22 +497,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 image resource belonging to a catalog resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String imageName, ImageInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -655,22 +527,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, imageName, resource, accept, context); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -681,19 +544,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ImageInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, imageName, resource); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ImageInner.class, ImageInner.class, this.client.getContext()); + private PollerFlux, ImageInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String imageName, ImageInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, imageName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), ImageInner.class, + ImageInner.class, this.client.getContext()); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -705,20 +566,18 @@ private PollerFlux, ImageInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ImageInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context) { + private PollerFlux, ImageInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String imageName, ImageInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, imageName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ImageInner.class, ImageInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, imageName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), ImageInner.class, + ImageInner.class, context); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -729,14 +588,14 @@ private PollerFlux, ImageInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ImageInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource) { + public SyncPoller, ImageInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String imageName, ImageInner resource) { return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource).getSyncPoller(); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -748,16 +607,15 @@ public SyncPoller, ImageInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ImageInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource, context) + public SyncPoller, ImageInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String imageName, ImageInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource, context) .getSyncPoller(); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -768,16 +626,15 @@ public SyncPoller, ImageInner> beginCreateOrUpdate( * @return an image resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String imageName, + ImageInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -789,16 +646,15 @@ private Mono createOrUpdateAsync( * @return an image resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String imageName, + ImageInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, imageName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -809,14 +665,14 @@ private Mono createOrUpdateAsync( * @return an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner createOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource) { + public ImageInner createOrUpdate(String resourceGroupName, String catalogName, String imageName, + ImageInner resource) { return createOrUpdateAsync(resourceGroupName, catalogName, imageName, resource).block(); } /** * Create a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -828,14 +684,14 @@ public ImageInner createOrUpdate( * @return an image resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner createOrUpdate( - String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context) { + public ImageInner createOrUpdate(String resourceGroupName, String catalogName, String imageName, + ImageInner resource, Context context) { return createOrUpdateAsync(resourceGroupName, catalogName, imageName, resource, context).block(); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -845,19 +701,15 @@ public ImageInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String imageName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String imageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -871,24 +723,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, imageName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -899,19 +741,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String imageName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String imageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -925,21 +763,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - imageName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, imageName, accept, context); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -949,18 +779,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String imageName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String imageName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, imageName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -971,19 +799,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String imageName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String imageName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, imageName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, imageName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -993,14 +820,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String imageName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String imageName) { return this.beginDeleteAsync(resourceGroupName, catalogName, imageName).getSyncPoller(); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -1011,14 +838,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String imageName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String imageName, Context context) { return this.beginDeleteAsync(resourceGroupName, catalogName, imageName, context).getSyncPoller(); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -1029,14 +856,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String catalogName, String imageName) { - return beginDeleteAsync(resourceGroupName, catalogName, imageName) - .last() + return beginDeleteAsync(resourceGroupName, catalogName, imageName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -1048,14 +874,13 @@ private Mono deleteAsync(String resourceGroupName, String catalogName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String catalogName, String imageName, Context context) { - return beginDeleteAsync(resourceGroupName, catalogName, imageName, context) - .last() + return beginDeleteAsync(resourceGroupName, catalogName, imageName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -1070,7 +895,7 @@ public void delete(String resourceGroupName, String catalogName, String imageNam /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -1086,14 +911,15 @@ public void delete(String resourceGroupName, String catalogName, String imageNam /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Image list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink) { @@ -1101,37 +927,29 @@ private Mono> listByCatalogNextSinglePageAsync(String 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.")); + 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)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Image list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink, Context context) { @@ -1139,23 +957,13 @@ private Mono> listByCatalogNextSinglePageAsync(String 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.")); + 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)); + 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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesImpl.java index 827d4f6b672f7..a8de042285966 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ImagesImpl.java @@ -31,28 +31,19 @@ public PagedIterable listByCatalog(String resourceGroupName, String catal return Utils.mapPage(inner, inner1 -> new ImageImpl(inner1, this.manager())); } - public PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context) { - PagedIterable inner = - this.serviceClient().listByCatalog(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context); + public PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context) { + PagedIterable inner = this.serviceClient().listByCatalog(resourceGroupName, catalogName, filter, + top, skip, maxpagesize, context); return Utils.mapPage(inner, inner1 -> new ImageImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String catalogName, String imageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, catalogName, imageName, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String imageName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, catalogName, imageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ImageImpl(inner.getValue(), this.manager())); } else { return null; @@ -79,25 +70,18 @@ public void delete(String resourceGroupName, String catalogName, String imageNam public Image getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, imageName, Context.NONE).getValue(); } @@ -105,25 +89,18 @@ public Image getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, imageName, context); } @@ -131,25 +108,18 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); } this.delete(resourceGroupName, catalogName, imageName, Context.NONE); } @@ -157,25 +127,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); } this.delete(resourceGroupName, catalogName, imageName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsClientImpl.java index ddee369b0405a..4c0112021b399 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsClientImpl.java @@ -30,125 +30,106 @@ import com.azure.resourcemanager.sphere.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(AzureSphereManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureSphereManagementClientOperations to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureSphereManagementClientOperations to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AzureSphere/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -157,27 +138,27 @@ private PagedFlux listAsync() { /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -186,13 +167,13 @@ public PagedIterable list() { /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -201,14 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -216,37 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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. + * + * 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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -254,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsImpl.java index 6ae70f0841532..dd6f137e8a87d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/OperationsImpl.java @@ -19,8 +19,8 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductImpl.java index 26314d6c9732e..cf45e90d4f577 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductImpl.java @@ -6,13 +6,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.ProductInner; import com.azure.resourcemanager.sphere.models.CountDeviceResponse; import com.azure.resourcemanager.sphere.models.DeviceGroup; import com.azure.resourcemanager.sphere.models.Product; +import com.azure.resourcemanager.sphere.models.ProductProperties; import com.azure.resourcemanager.sphere.models.ProductUpdate; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.resourcemanager.sphere.models.ProductUpdateProperties; public final class ProductImpl implements Product, Product.Definition, Product.Update { private ProductInner innerObject; @@ -31,12 +33,12 @@ public String type() { return this.innerModel().type(); } - public String description() { - return this.innerModel().description(); + public ProductProperties properties() { + return this.innerModel().properties(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -66,20 +68,14 @@ public ProductImpl withExistingCatalog(String resourceGroupName, String catalogN } public Product create() { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .createOrUpdate(resourceGroupName, catalogName, productName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getProducts().createOrUpdate(resourceGroupName, catalogName, + productName, this.innerModel(), Context.NONE); return this; } public Product create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .createOrUpdate(resourceGroupName, catalogName, productName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getProducts().createOrUpdate(resourceGroupName, catalogName, + productName, this.innerModel(), context); return this; } @@ -95,20 +91,14 @@ public ProductImpl update() { } public Product apply() { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .update(resourceGroupName, catalogName, productName, updateProperties, Context.NONE); + this.innerObject = serviceManager.serviceClient().getProducts().update(resourceGroupName, catalogName, + productName, updateProperties, Context.NONE); return this; } public Product apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .update(resourceGroupName, catalogName, productName, updateProperties, context); + this.innerObject = serviceManager.serviceClient().getProducts().update(resourceGroupName, catalogName, + productName, updateProperties, context); return this; } @@ -121,22 +111,14 @@ public Product apply(Context context) { } public Product refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .getWithResponse(resourceGroupName, catalogName, productName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getProducts() + .getWithResponse(resourceGroupName, catalogName, productName, Context.NONE).getValue(); return this; } public Product refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProducts() - .getWithResponse(resourceGroupName, catalogName, productName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getProducts() + .getWithResponse(resourceGroupName, catalogName, productName, context).getValue(); return this; } @@ -153,22 +135,17 @@ public PagedIterable generateDefaultDeviceGroups() { } public PagedIterable generateDefaultDeviceGroups(Context context) { - return serviceManager - .products() - .generateDefaultDeviceGroups(resourceGroupName, catalogName, productName, context); + return serviceManager.products().generateDefaultDeviceGroups(resourceGroupName, catalogName, productName, + context); } - public ProductImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateProperties.withDescription(description); - return this; - } + public ProductImpl withProperties(ProductProperties properties) { + this.innerModel().withProperties(properties); + return this; } - private boolean isInCreateMode() { - return this.innerModel().id() == null; + public ProductImpl withProperties(ProductUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsClientImpl.java index 1a9ea5f50753b..34c8026163e5c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsClientImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsClientImpl.java @@ -44,17 +44,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ProductsClient. */ +/** + * An instance of this class provides access to all the operations defined in ProductsClient. + */ public final class ProductsClientImpl implements ProductsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ProductsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureSphereManagementClientImpl client; /** * Initializes an instance of ProductsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ProductsClientImpl(AzureSphereManagementClientImpl client) { @@ -69,158 +75,109 @@ public final class ProductsClientImpl implements ProductsClient { @Host("{$host}") @ServiceInterface(name = "AzureSphereManagemen") public interface ProductsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products") + @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("catalogName") String catalogName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") - @ExpectedResponses({200}) + Mono> listByCatalog(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") + @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("catalogName") String catalogName, - @PathParam("productName") String productName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @BodyParam("application/json") ProductInner resource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") - @ExpectedResponses({200, 202}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @BodyParam("application/json") ProductInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @BodyParam("application/json") ProductUpdate properties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") - @ExpectedResponses({200, 202, 204}) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @BodyParam("application/json") ProductUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices") - @ExpectedResponses({200}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> countDevices( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups") - @ExpectedResponses({200}) + Mono> countDevices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateDefaultDeviceGroups( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("catalogName") String catalogName, - @PathParam("productName") String productName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> generateDefaultDeviceGroups(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName, + @PathParam("productName") String productName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCatalogNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> generateDefaultDeviceGroupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of 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 response of a Product list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, String catalogName) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, + String catalogName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -231,32 +188,16 @@ private Mono> listByCatalogSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCatalog( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByCatalog(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, 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 Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -264,22 +205,18 @@ private Mono> listByCatalogSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Product list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCatalogSinglePageAsync( - String resourceGroupName, String catalogName, Context context) { + private Mono> listByCatalogSinglePageAsync(String resourceGroupName, String catalogName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -291,28 +228,15 @@ private Mono> listByCatalogSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCatalog( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByCatalog(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,14 +246,13 @@ private Mono> listByCatalogSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName) { - return new PagedFlux<>( - () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName), + return new PagedFlux<>(() -> listByCatalogSinglePageAsync(resourceGroupName, catalogName), nextLink -> listByCatalogNextSinglePageAsync(nextLink)); } /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -340,14 +263,13 @@ private PagedFlux listByCatalogAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCatalogAsync(String resourceGroupName, String catalogName, Context context) { - return new PagedFlux<>( - () -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, context), + return new PagedFlux<>(() -> listByCatalogSinglePageAsync(resourceGroupName, catalogName, context), nextLink -> listByCatalogNextSinglePageAsync(nextLink, context)); } /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +284,7 @@ public PagedIterable listByCatalog(String resourceGroupName, Strin /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -378,7 +300,7 @@ public PagedIterable listByCatalog(String resourceGroupName, Strin /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -388,19 +310,15 @@ public PagedIterable listByCatalog(String resourceGroupName, Strin * @return a Product along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String productName) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -414,24 +332,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -442,19 +350,15 @@ private Mono> getWithResponseAsync( * @return a Product along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String catalogName, + String productName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -468,21 +372,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, accept, context); } /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -499,7 +395,7 @@ private Mono getAsync(String resourceGroupName, String catalogName /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -510,14 +406,14 @@ private Mono getAsync(String resourceGroupName, String catalogName * @return a Product along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String catalogName, String productName, Context context) { + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + Context context) { return getWithResponseAsync(resourceGroupName, catalogName, productName, context).block(); } /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -533,7 +429,7 @@ public ProductInner get(String resourceGroupName, String catalogName, String pro /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -542,22 +438,18 @@ public ProductInner get(String resourceGroupName, String catalogName, String pro * @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 product resource belonging to a catalog resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, ProductInner resource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -576,25 +468,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, resource, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -604,22 +486,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 product resource belonging to a catalog resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String catalogName, String productName, ProductInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,22 +516,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, resource, accept, context); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -664,19 +533,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProductInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, resource); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ProductInner.class, ProductInner.class, this.client.getContext()); + private PollerFlux, ProductInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, ProductInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProductInner.class, ProductInner.class, this.client.getContext()); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -688,20 +555,18 @@ private PollerFlux, ProductInner> beginCreateOrUpdateAs * @return the {@link PollerFlux} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProductInner> beginCreateOrUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context) { + private PollerFlux, ProductInner> beginCreateOrUpdateAsync(String resourceGroupName, + String catalogName, String productName, ProductInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, resource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ProductInner.class, ProductInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, catalogName, productName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProductInner.class, ProductInner.class, context); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -712,14 +577,14 @@ private PollerFlux, ProductInner> beginCreateOrUpdateAs * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProductInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource) { + public SyncPoller, ProductInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, ProductInner resource) { return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource).getSyncPoller(); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -731,16 +596,15 @@ public SyncPoller, ProductInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProductInner> beginCreateOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource, context) + public SyncPoller, ProductInner> beginCreateOrUpdate(String resourceGroupName, + String catalogName, String productName, ProductInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource, context) .getSyncPoller(); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -751,16 +615,15 @@ public SyncPoller, ProductInner> beginCreateOrUpdate( * @return an product resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + ProductInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -772,16 +635,15 @@ private Mono createOrUpdateAsync( * @return an product resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, String productName, + ProductInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, catalogName, productName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -792,14 +654,14 @@ private Mono createOrUpdateAsync( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner createOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource) { + public ProductInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + ProductInner resource) { return createOrUpdateAsync(resourceGroupName, catalogName, productName, resource).block(); } /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -811,14 +673,14 @@ public ProductInner createOrUpdate( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner createOrUpdate( - String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context) { + public ProductInner createOrUpdate(String resourceGroupName, String catalogName, String productName, + ProductInner resource, Context context) { return createOrUpdateAsync(resourceGroupName, catalogName, productName, resource, context).block(); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -827,22 +689,18 @@ public ProductInner createOrUpdate( * @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 product resource belonging to a catalog resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -860,26 +718,14 @@ private Mono>> updateWithResponseAsync( properties.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - properties, - accept, - context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -889,22 +735,18 @@ private Mono>> updateWithResponseAsync( * @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 product resource belonging to a catalog resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -923,22 +765,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, properties, accept, context); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -949,19 +782,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProductInner> beginUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, catalogName, productName, properties); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ProductInner.class, ProductInner.class, this.client.getContext()); + private PollerFlux, ProductInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, ProductUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, catalogName, productName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProductInner.class, ProductInner.class, this.client.getContext()); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -973,20 +804,18 @@ private PollerFlux, ProductInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProductInner> beginUpdateAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context) { + private PollerFlux, ProductInner> beginUpdateAsync(String resourceGroupName, + String catalogName, String productName, ProductUpdate properties, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, catalogName, productName, properties, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ProductInner.class, ProductInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, catalogName, productName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProductInner.class, ProductInner.class, context); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -997,14 +826,14 @@ private PollerFlux, ProductInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProductInner> beginUpdate( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties) { + public SyncPoller, ProductInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties) { return this.beginUpdateAsync(resourceGroupName, catalogName, productName, properties).getSyncPoller(); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1016,14 +845,14 @@ public SyncPoller, ProductInner> beginUpdate( * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProductInner> beginUpdate( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context) { + public SyncPoller, ProductInner> beginUpdate(String resourceGroupName, String catalogName, + String productName, ProductUpdate properties, Context context) { return this.beginUpdateAsync(resourceGroupName, catalogName, productName, properties, context).getSyncPoller(); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1034,16 +863,15 @@ public SyncPoller, ProductInner> beginUpdate( * @return an product resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties) { - return beginUpdateAsync(resourceGroupName, catalogName, productName, properties) - .last() + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + ProductUpdate properties) { + return beginUpdateAsync(resourceGroupName, catalogName, productName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1055,16 +883,15 @@ private Mono updateAsync( * @return an product resource belonging to a catalog resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, catalogName, productName, properties, context) - .last() + private Mono updateAsync(String resourceGroupName, String catalogName, String productName, + ProductUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, catalogName, productName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1075,14 +902,14 @@ private Mono updateAsync( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner update( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties) { + public ProductInner update(String resourceGroupName, String catalogName, String productName, + ProductUpdate properties) { return updateAsync(resourceGroupName, catalogName, productName, properties).block(); } /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1094,14 +921,14 @@ public ProductInner update( * @return an product resource belonging to a catalog resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProductInner update( - String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context) { + public ProductInner update(String resourceGroupName, String catalogName, String productName, + ProductUpdate properties, Context context) { return updateAsync(resourceGroupName, catalogName, productName, properties, context).block(); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1111,19 +938,15 @@ public ProductInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String productName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1137,24 +960,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1165,19 +978,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName, + String productName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1191,21 +1000,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, catalogName, productName, accept, context); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1215,18 +1016,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String productName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, productName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1237,19 +1036,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName, + String productName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, catalogName, productName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, catalogName, productName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1259,14 +1057,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName) { return this.beginDeleteAsync(resourceGroupName, catalogName, productName).getSyncPoller(); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1277,14 +1075,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String catalogName, String productName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, + String productName, Context context) { return this.beginDeleteAsync(resourceGroupName, catalogName, productName, context).getSyncPoller(); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1295,14 +1093,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String catalogName, String productName) { - return beginDeleteAsync(resourceGroupName, catalogName, productName) - .last() + return beginDeleteAsync(resourceGroupName, catalogName, productName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1314,14 +1111,13 @@ private Mono deleteAsync(String resourceGroupName, String catalogName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String catalogName, String productName, Context context) { - return beginDeleteAsync(resourceGroupName, catalogName, productName, context) - .last() + return beginDeleteAsync(resourceGroupName, catalogName, productName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1336,7 +1132,7 @@ public void delete(String resourceGroupName, String catalogName, String productN /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1353,7 +1149,7 @@ public void delete(String resourceGroupName, String catalogName, String productN /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1361,22 +1157,18 @@ public void delete(String resourceGroupName, String catalogName, String productN * @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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName, String productName) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName, String productName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1390,25 +1182,15 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context)) + .withContext(context -> service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1417,22 +1199,18 @@ private Mono> countDevicesWithResponseAsync( * @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 response to the action call for count devices in a catalog along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> countDevicesWithResponseAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private Mono> countDevicesWithResponseAsync(String resourceGroupName, + String catalogName, String productName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1446,22 +1224,14 @@ private Mono> countDevicesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .countDevices( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context); + return service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context); } /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1471,8 +1241,8 @@ private Mono> countDevicesWithResponseAsync( * @return response to the action call for count devices in a catalog on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono countDevicesAsync( - String resourceGroupName, String catalogName, String productName) { + private Mono countDevicesAsync(String resourceGroupName, String catalogName, + String productName) { return countDevicesWithResponseAsync(resourceGroupName, catalogName, productName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1480,7 +1250,7 @@ private Mono countDevicesAsync( /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1491,15 +1261,15 @@ private Mono countDevicesAsync( * @return response to the action call for count devices in a catalog along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, Context context) { + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, Context context) { return countDevicesWithResponseAsync(resourceGroupName, catalogName, productName, context).block(); } /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1516,7 +1286,7 @@ public CountDeviceResponseInner countDevices(String resourceGroupName, String ca /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1524,22 +1294,18 @@ public CountDeviceResponseInner countDevices(String resourceGroupName, String ca * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateDefaultDeviceGroupsSinglePageAsync( - String resourceGroupName, String catalogName, String productName) { + private Mono> generateDefaultDeviceGroupsSinglePageAsync(String resourceGroupName, + String catalogName, String productName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1554,33 +1320,17 @@ private Mono> generateDefaultDeviceGroupsSingleP final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .generateDefaultDeviceGroups( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.generateDefaultDeviceGroups(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, 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())); } /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1589,22 +1339,18 @@ private Mono> generateDefaultDeviceGroupsSingleP * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateDefaultDeviceGroupsSinglePageAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private Mono> generateDefaultDeviceGroupsSinglePageAsync(String resourceGroupName, + String catalogName, String productName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1619,30 +1365,16 @@ private Mono> generateDefaultDeviceGroupsSingleP final String accept = "application/json"; context = this.client.mergeContext(context); return service - .generateDefaultDeviceGroups( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - catalogName, - productName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .generateDefaultDeviceGroups(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, catalogName, productName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1652,8 +1384,8 @@ private Mono> generateDefaultDeviceGroupsSingleP * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux generateDefaultDeviceGroupsAsync( - String resourceGroupName, String catalogName, String productName) { + private PagedFlux generateDefaultDeviceGroupsAsync(String resourceGroupName, String catalogName, + String productName) { return new PagedFlux<>( () -> generateDefaultDeviceGroupsSinglePageAsync(resourceGroupName, catalogName, productName), nextLink -> generateDefaultDeviceGroupsNextSinglePageAsync(nextLink)); @@ -1662,7 +1394,7 @@ private PagedFlux generateDefaultDeviceGroupsAsync( /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1673,8 +1405,8 @@ private PagedFlux generateDefaultDeviceGroupsAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux generateDefaultDeviceGroupsAsync( - String resourceGroupName, String catalogName, String productName, Context context) { + private PagedFlux generateDefaultDeviceGroupsAsync(String resourceGroupName, String catalogName, + String productName, Context context) { return new PagedFlux<>( () -> generateDefaultDeviceGroupsSinglePageAsync(resourceGroupName, catalogName, productName, context), nextLink -> generateDefaultDeviceGroupsNextSinglePageAsync(nextLink, context)); @@ -1683,7 +1415,7 @@ private PagedFlux generateDefaultDeviceGroupsAsync( /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1693,15 +1425,15 @@ private PagedFlux generateDefaultDeviceGroupsAsync( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName) { + public PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName) { return new PagedIterable<>(generateDefaultDeviceGroupsAsync(resourceGroupName, catalogName, productName)); } /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -1712,22 +1444,23 @@ public PagedIterable generateDefaultDeviceGroups( * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName, Context context) { + public PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName, Context context) { return new PagedIterable<>( generateDefaultDeviceGroupsAsync(resourceGroupName, catalogName, productName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Product list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink) { @@ -1735,37 +1468,29 @@ private Mono> listByCatalogNextSinglePageAsync(Strin 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.")); + 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)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Product list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCatalogNextSinglePageAsync(String nextLink, Context context) { @@ -1773,36 +1498,27 @@ private Mono> listByCatalogNextSinglePageAsync(Strin 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.")); + 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)); + 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)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> generateDefaultDeviceGroupsNextSinglePageAsync(String nextLink) { @@ -1810,64 +1526,44 @@ private Mono> generateDefaultDeviceGroupsNextSin 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.")); + 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.generateDefaultDeviceGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.generateDefaultDeviceGroupsNext(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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateDefaultDeviceGroupsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> generateDefaultDeviceGroupsNextSinglePageAsync(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.")); + 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 - .generateDefaultDeviceGroupsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.generateDefaultDeviceGroupsNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsImpl.java index c58e2369b00ca..a8d6468b9dfa9 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProductsImpl.java @@ -25,8 +25,8 @@ public final class ProductsImpl implements Products { private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - public ProductsImpl( - ProductsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { + public ProductsImpl(ProductsClient innerClient, + com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -41,15 +41,12 @@ public PagedIterable listByCatalog(String resourceGroupName, String cat return Utils.mapPage(inner, inner1 -> new ProductImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String catalogName, String productName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, catalogName, productName, context); + public Response getWithResponse(String resourceGroupName, String catalogName, String productName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, catalogName, productName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ProductImpl(inner.getValue(), this.manager())); } else { return null; @@ -73,15 +70,12 @@ public void delete(String resourceGroupName, String catalogName, String productN this.serviceClient().delete(resourceGroupName, catalogName, productName, context); } - public Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, Context context) { - Response inner = - this.serviceClient().countDevicesWithResponse(resourceGroupName, catalogName, productName, context); + public Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, Context context) { + Response inner + = this.serviceClient().countDevicesWithResponse(resourceGroupName, catalogName, productName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CountDeviceResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -97,42 +91,35 @@ public CountDeviceResponse countDevices(String resourceGroupName, String catalog } } - public PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName) { - PagedIterable inner = - this.serviceClient().generateDefaultDeviceGroups(resourceGroupName, catalogName, productName); + public PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName) { + PagedIterable inner + = this.serviceClient().generateDefaultDeviceGroups(resourceGroupName, catalogName, productName); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } - public PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName, Context context) { - PagedIterable inner = - this.serviceClient().generateDefaultDeviceGroups(resourceGroupName, catalogName, productName, context); + public PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName, Context context) { + PagedIterable inner + = this.serviceClient().generateDefaultDeviceGroups(resourceGroupName, catalogName, productName, context); return Utils.mapPage(inner, inner1 -> new DeviceGroupImpl(inner1, this.manager())); } public Product getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, productName, Context.NONE).getValue(); } @@ -140,25 +127,18 @@ public Product getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } return this.getWithResponse(resourceGroupName, catalogName, productName, context); } @@ -166,25 +146,18 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } this.delete(resourceGroupName, catalogName, productName, Context.NONE); } @@ -192,25 +165,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String catalogName = Utils.getValueFromIdByName(id, "catalogs"); if (catalogName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'catalogs'.", id))); } String productName = Utils.getValueFromIdByName(id, "products"); if (productName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'products'.", id))); } this.delete(resourceGroupName, catalogName, productName, context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProofOfPossessionNonceResponseImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProofOfPossessionNonceResponseImpl.java index ac1feb2ee3e36..431290bc7a552 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProofOfPossessionNonceResponseImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/ProofOfPossessionNonceResponseImpl.java @@ -15,8 +15,7 @@ public final class ProofOfPossessionNonceResponseImpl implements ProofOfPossessi private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - ProofOfPossessionNonceResponseImpl( - ProofOfPossessionNonceResponseInner innerObject, + ProofOfPossessionNonceResponseImpl(ProofOfPossessionNonceResponseInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/SignedCapabilityImageResponseImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/SignedCapabilityImageResponseImpl.java index 95d73dc3ec3eb..d5767277af923 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/SignedCapabilityImageResponseImpl.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/SignedCapabilityImageResponseImpl.java @@ -12,8 +12,7 @@ public final class SignedCapabilityImageResponseImpl implements SignedCapability private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager; - SignedCapabilityImageResponseImpl( - SignedCapabilityImageResponseInner innerObject, + SignedCapabilityImageResponseImpl(SignedCapabilityImageResponseInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/Utils.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/Utils.java index 505f4413ce8df..ae9d179299129 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/Utils.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/package-info.java index 0f24134af586d..bbc8cbf38c380 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/package-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AzureSphereManagementClient. Azure Sphere resource management API. */ +/** + * Package containing the implementations for AzureSphereManagementClient. + * Azure Sphere resource management API. + */ package com.azure.resourcemanager.sphere.implementation; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ActionType.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ActionType.java index 16187bc8760ca..8a331ea51dcfc 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ActionType.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/AllowCrashDumpCollection.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/AllowCrashDumpCollection.java index 421f6c355637a..3fb7732e3328e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/AllowCrashDumpCollection.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/AllowCrashDumpCollection.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Allow crash dumps values. */ +/** + * Allow crash dumps values. + */ public final class AllowCrashDumpCollection extends ExpandableStringEnum { - /** Static value Enabled for AllowCrashDumpCollection. */ + /** + * Static value Enabled for AllowCrashDumpCollection. + */ public static final AllowCrashDumpCollection ENABLED = fromString("Enabled"); - /** Static value Disabled for AllowCrashDumpCollection. */ + /** + * Static value Disabled for AllowCrashDumpCollection. + */ public static final AllowCrashDumpCollection DISABLED = fromString("Disabled"); /** * Creates a new instance of AllowCrashDumpCollection value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AllowCrashDumpCollection() { /** * Creates or finds a AllowCrashDumpCollection from its string representation. - * + * * @param name a name to look for. * @return the corresponding AllowCrashDumpCollection. */ @@ -38,7 +44,7 @@ public static AllowCrashDumpCollection fromString(String name) { /** * Gets known AllowCrashDumpCollection values. - * + * * @return known AllowCrashDumpCollection values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CapabilityType.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CapabilityType.java index 20606302764a2..a3f2ec5709f2e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CapabilityType.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CapabilityType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Capability image type. */ +/** + * Capability image type. + */ public final class CapabilityType extends ExpandableStringEnum { - /** Static value ApplicationDevelopment for CapabilityType. */ + /** + * Static value ApplicationDevelopment for CapabilityType. + */ public static final CapabilityType APPLICATION_DEVELOPMENT = fromString("ApplicationDevelopment"); - /** Static value FieldServicing for CapabilityType. */ + /** + * Static value FieldServicing for CapabilityType. + */ public static final CapabilityType FIELD_SERVICING = fromString("FieldServicing"); /** * Creates a new instance of CapabilityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public CapabilityType() { /** * Creates or finds a CapabilityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CapabilityType. */ @@ -38,7 +44,7 @@ public static CapabilityType fromString(String name) { /** * Gets known CapabilityType values. - * + * * @return known CapabilityType values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalog.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalog.java index f93fe02c2a042..66366c013539b 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalog.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalog.java @@ -12,104 +12,111 @@ import com.azure.resourcemanager.sphere.fluent.models.CatalogInner; import java.util.Map; -/** An immutable client-side representation of Catalog. */ +/** + * An immutable client-side representation of Catalog. + */ public interface Catalog { /** * 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 location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - SystemData systemData(); + CatalogProperties properties(); /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.CatalogInner object. - * + * * @return the inner object. */ CatalogInner innerModel(); - /** The entirety of the Catalog definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Catalog definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Catalog definition stages. */ + /** + * The Catalog definition stages. + */ interface DefinitionStages { - /** The first stage of the Catalog definition. */ + /** + * The first stage of the Catalog definition. + */ interface Blank extends WithLocation { } - /** The stage of the Catalog definition allowing to specify location. */ + /** + * The stage of the Catalog definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -117,18 +124,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Catalog definition allowing to specify parent resource. */ + /** + * The stage of the Catalog definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -139,67 +148,88 @@ interface WithResourceGroup { * 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. */ - interface WithCreate extends DefinitionStages.WithTags { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Catalog create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Catalog create(Context context); } - /** The stage of the Catalog definition allowing to specify tags. */ + /** + * The stage of the Catalog definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } + + /** + * The stage of the Catalog definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(CatalogProperties properties); + } } /** * Begins update for the Catalog resource. - * + * * @return the stage of resource update. */ Catalog.Update update(); - /** The template for Catalog update. */ + /** + * The template for Catalog update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ Catalog apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Catalog apply(Context context); } - /** The Catalog update stages. */ + /** + * The Catalog update stages. + */ interface UpdateStages { - /** The stage of the Catalog update allowing to specify tags. */ + /** + * The stage of the Catalog update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -209,14 +239,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Catalog refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -224,7 +254,7 @@ interface WithTags { /** * Counts devices in 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. @@ -235,7 +265,7 @@ interface WithTags { /** * Counts devices in catalog. - * + * * @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 response to the action call for count devices in a catalog. @@ -244,7 +274,7 @@ interface WithTags { /** * Lists deployments for catalog. - * + * * @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 response of a Deployment list operation as paginated response with {@link PagedIterable}. @@ -253,7 +283,7 @@ interface WithTags { /** * Lists deployments for catalog. - * + * * @param filter Filter the result list using the given expression. * @param top The number of result items to return. * @param skip The number of result items to skip. @@ -264,12 +294,12 @@ interface WithTags { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDeployments( - String filter, Integer top, Integer skip, Integer maxpagesize, Context context); + PagedIterable listDeployments(String filter, Integer top, Integer skip, Integer maxpagesize, + Context context); /** * List the device groups for the catalog. - * + * * @param listDeviceGroupsRequest List device groups for catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -280,7 +310,7 @@ PagedIterable listDeployments( /** * List the device groups for the catalog. - * + * * @param listDeviceGroupsRequest List device groups for catalog. * @param filter Filter the result list using the given expression. * @param top The number of result items to return. @@ -292,17 +322,12 @@ PagedIterable listDeployments( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDeviceGroups( - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDeviceGroups(ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context); /** * Lists device insights for catalog. - * + * * @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 paged collection of DeviceInsight items as paginated response with {@link PagedIterable}. @@ -311,7 +336,7 @@ PagedIterable listDeviceGroups( /** * Lists device insights for catalog. - * + * * @param filter Filter the result list using the given expression. * @param top The number of result items to return. * @param skip The number of result items to skip. @@ -322,12 +347,12 @@ PagedIterable listDeviceGroups( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}. */ - PagedIterable listDeviceInsights( - String filter, Integer top, Integer skip, Integer maxpagesize, Context context); + PagedIterable listDeviceInsights(String filter, Integer top, Integer skip, Integer maxpagesize, + Context context); /** * Lists devices for catalog. - * + * * @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 response of a Device list operation as paginated response with {@link PagedIterable}. @@ -336,7 +361,7 @@ PagedIterable listDeviceInsights( /** * Lists devices for catalog. - * + * * @param filter Filter the result list using the given expression. * @param top The number of result items to return. * @param skip The number of result items to skip. diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogListResult.java index 9c82d8fefe24f..7d61e964e3664 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Catalog list operation. */ +/** + * The response of a Catalog list operation. + */ @Fluent public final class CatalogListResult { /* @@ -25,13 +27,15 @@ public final class CatalogListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CatalogListResult class. */ + /** + * Creates an instance of CatalogListResult class. + */ public CatalogListResult() { } /** * Get the value property: The Catalog items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Catalog items on this page. - * + * * @param value the value value to set. * @return the CatalogListResult object itself. */ @@ -51,7 +55,7 @@ public CatalogListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the CatalogListResult object itself. */ @@ -71,14 +75,13 @@ public CatalogListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model CatalogListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model CatalogListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogProperties.java similarity index 80% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogProperties.java index e5e5c035f83a0..f1dad92040027 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogProperties.java @@ -2,13 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Catalog properties. */ +/** + * Catalog properties. + */ @Immutable public final class CatalogProperties { /* @@ -17,13 +18,15 @@ public final class CatalogProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of CatalogProperties class. */ + /** + * Creates an instance of CatalogProperties class. + */ public CatalogProperties() { } /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -32,7 +35,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogUpdate.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogUpdate.java index a8798215ccb2c..63df52959467a 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogUpdate.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CatalogUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The type used for update operations of the Catalog. */ +/** + * The type used for update operations of the Catalog. + */ @Fluent public final class CatalogUpdate { /* @@ -19,13 +21,15 @@ public final class CatalogUpdate { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of CatalogUpdate class. */ + /** + * Creates an instance of CatalogUpdate class. + */ public CatalogUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the CatalogUpdate object itself. */ @@ -45,7 +49,7 @@ public CatalogUpdate withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalogs.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalogs.java index b7919b56ccf95..a66803c7bc47b 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalogs.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Catalogs.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Catalogs. */ +/** + * Resource collection API of Catalogs. + */ public interface Catalogs { /** * List Catalog resources by subscription ID. - * + * * @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 response of a Catalog list operation as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface Catalogs { /** * List Catalog resources by subscription ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface Catalogs { /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface Catalogs { /** * List Catalog resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +57,7 @@ public interface Catalogs { /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -68,7 +70,7 @@ public interface Catalogs { /** * Get a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +82,7 @@ public interface Catalogs { /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,7 +93,7 @@ public interface Catalogs { /** * Delete a Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -103,7 +105,7 @@ public interface Catalogs { /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -112,12 +114,12 @@ public interface Catalogs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response to the action call for count devices in a catalog along with {@link Response}. */ - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + Context context); /** * Counts devices in catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,7 +131,7 @@ Response countDevicesWithResponse( /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,7 +143,7 @@ Response countDevicesWithResponse( /** * Lists deployments for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -154,18 +156,12 @@ Response countDevicesWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDeployments( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDeployments(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -174,12 +170,12 @@ PagedIterable listDeployments( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDeviceGroups( - String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest); + PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest); /** * List the device groups for the catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param listDeviceGroupsRequest List device groups for catalog. @@ -193,19 +189,13 @@ PagedIterable listDeviceGroups( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDeviceGroups( - String resourceGroupName, - String catalogName, - ListDeviceGroupsRequest listDeviceGroupsRequest, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, + PagedIterable listDeviceGroups(String resourceGroupName, String catalogName, + ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,7 +207,7 @@ PagedIterable listDeviceGroups( /** * Lists device insights for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -230,18 +220,12 @@ PagedIterable listDeviceGroups( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}. */ - PagedIterable listDeviceInsights( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDeviceInsights(String resourceGroupName, String catalogName, String filter, + Integer top, Integer skip, Integer maxpagesize, Context context); /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,7 +237,7 @@ PagedIterable listDeviceInsights( /** * Lists devices for catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -266,18 +250,12 @@ PagedIterable listDeviceInsights( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDevices( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listDevices(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); /** * Get a Catalog. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,7 +266,7 @@ PagedIterable listDevices( /** * Get a Catalog. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,7 +278,7 @@ PagedIterable listDevices( /** * Delete a Catalog. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -310,7 +288,7 @@ PagedIterable listDevices( /** * Delete a Catalog. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,7 +299,7 @@ PagedIterable listDevices( /** * Begins definition for a new Catalog resource. - * + * * @param name resource name. * @return the first stage of the new Catalog definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificate.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificate.java index 458d70f643c8b..1aee6fd4d576d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificate.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificate.java @@ -6,90 +6,49 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.sphere.fluent.models.CertificateInner; -import java.time.OffsetDateTime; -/** An immutable client-side representation of Certificate. */ +/** + * An immutable client-side representation of Certificate. + */ public interface Certificate { /** * 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 certificate property: The certificate as a UTF-8 encoded base 64 string. - * - * @return the certificate value. - */ - String certificate(); - - /** - * Gets the status property: The certificate status. - * - * @return the status value. - */ - CertificateStatus status(); - - /** - * Gets the subject property: The certificate subject. - * - * @return the subject value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String subject(); + CertificateProperties properties(); /** - * Gets the thumbprint property: The certificate thumbprint. - * - * @return the thumbprint value. - */ - String thumbprint(); - - /** - * Gets the expiryUtc property: The certificate expiry date. - * - * @return the expiryUtc value. - */ - OffsetDateTime expiryUtc(); - - /** - * Gets the notBeforeUtc property: The certificate not before date. - * - * @return the notBeforeUtc value. - */ - OffsetDateTime notBeforeUtc(); - - /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.CertificateInner object. - * + * * @return the inner object. */ CertificateInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateChainResponse.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateChainResponse.java index 9ecd4c11ccc0f..940f393fa3a8d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateChainResponse.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateChainResponse.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner; -/** An immutable client-side representation of CertificateChainResponse. */ +/** + * An immutable client-side representation of CertificateChainResponse. + */ public interface CertificateChainResponse { /** * Gets the certificateChain property: The certificate chain. - * + * * @return the certificateChain value. */ String certificateChain(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner object. - * + * * @return the inner object. */ CertificateChainResponseInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateListResult.java index 6325d017199a2..049a7e1a51706 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Certificate list operation. */ +/** + * The response of a Certificate list operation. + */ @Fluent public final class CertificateListResult { /* @@ -25,13 +27,15 @@ public final class CertificateListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CertificateListResult class. */ + /** + * Creates an instance of CertificateListResult class. + */ public CertificateListResult() { } /** * Get the value property: The Certificate items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Certificate items on this page. - * + * * @param value the value value to set. * @return the CertificateListResult object itself. */ @@ -51,7 +55,7 @@ public CertificateListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the CertificateListResult object itself. */ @@ -71,14 +75,13 @@ public CertificateListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model CertificateListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model CertificateListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateProperties.java similarity index 90% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateProperties.java index 94db576f28bde..ff0a7b9f59c4e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateProperties.java @@ -2,15 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.sphere.models.CertificateStatus; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The properties of certificate. */ +/** + * The properties of certificate. + */ @Immutable public class CertificateProperties { /* @@ -55,13 +55,15 @@ public class CertificateProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of CertificateProperties class. */ + /** + * Creates an instance of CertificateProperties class. + */ public CertificateProperties() { } /** * Get the certificate property: The certificate as a UTF-8 encoded base 64 string. - * + * * @return the certificate value. */ public String certificate() { @@ -70,7 +72,7 @@ public String certificate() { /** * Get the status property: The certificate status. - * + * * @return the status value. */ public CertificateStatus status() { @@ -79,7 +81,7 @@ public CertificateStatus status() { /** * Get the subject property: The certificate subject. - * + * * @return the subject value. */ public String subject() { @@ -88,7 +90,7 @@ public String subject() { /** * Get the thumbprint property: The certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -97,7 +99,7 @@ public String thumbprint() { /** * Get the expiryUtc property: The certificate expiry date. - * + * * @return the expiryUtc value. */ public OffsetDateTime expiryUtc() { @@ -106,7 +108,7 @@ public OffsetDateTime expiryUtc() { /** * Get the notBeforeUtc property: The certificate not before date. - * + * * @return the notBeforeUtc value. */ public OffsetDateTime notBeforeUtc() { @@ -115,7 +117,7 @@ public OffsetDateTime notBeforeUtc() { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -124,7 +126,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateStatus.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateStatus.java index e38e138072baf..0ef99819e1d63 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateStatus.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CertificateStatus.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Certificate status values. */ +/** + * Certificate status values. + */ public final class CertificateStatus extends ExpandableStringEnum { - /** Static value Active for CertificateStatus. */ + /** + * Static value Active for CertificateStatus. + */ public static final CertificateStatus ACTIVE = fromString("Active"); - /** Static value Inactive for CertificateStatus. */ + /** + * Static value Inactive for CertificateStatus. + */ public static final CertificateStatus INACTIVE = fromString("Inactive"); - /** Static value Expired for CertificateStatus. */ + /** + * Static value Expired for CertificateStatus. + */ public static final CertificateStatus EXPIRED = fromString("Expired"); - /** Static value Revoked for CertificateStatus. */ + /** + * Static value Revoked for CertificateStatus. + */ public static final CertificateStatus REVOKED = fromString("Revoked"); /** * Creates a new instance of CertificateStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public CertificateStatus() { /** * Creates or finds a CertificateStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding CertificateStatus. */ @@ -44,7 +54,7 @@ public static CertificateStatus fromString(String name) { /** * Gets known CertificateStatus values. - * + * * @return known CertificateStatus values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificates.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificates.java index 0ed52f203f244..bf130ef1ce0fe 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificates.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Certificates.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Certificates. */ +/** + * Resource collection API of Certificates. + */ public interface Certificates { /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Certificates { /** * List Certificate resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -37,18 +39,12 @@ public interface Certificates { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -58,12 +54,12 @@ PagedIterable listByCatalog( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Certificate along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber, + Context context); /** * Get a Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -76,7 +72,7 @@ Response getWithResponse( /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -86,12 +82,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the certificate chain response along with {@link Response}. */ - Response retrieveCertChainWithResponse( - String resourceGroupName, String catalogName, String serialNumber, Context context); + Response retrieveCertChainWithResponse(String resourceGroupName, String catalogName, + String serialNumber, Context context); /** * Retrieves cert chain. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -104,7 +100,7 @@ Response retrieveCertChainWithResponse( /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -115,16 +111,13 @@ Response retrieveCertChainWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the proof of possession nonce along with {@link Response}. */ - Response retrieveProofOfPossessionNonceWithResponse( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, + Response retrieveProofOfPossessionNonceWithResponse(String resourceGroupName, + String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest, Context context); /** * Gets the proof of possession nonce. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate. @@ -134,9 +127,6 @@ Response retrieveProofOfPossessionNonceWithRespo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the proof of possession nonce. */ - ProofOfPossessionNonceResponse retrieveProofOfPossessionNonce( - String resourceGroupName, - String catalogName, - String serialNumber, - ProofOfPossessionNonceRequest proofOfPossessionNonceRequest); + ProofOfPossessionNonceResponse retrieveProofOfPossessionNonce(String resourceGroupName, String catalogName, + String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ClaimDevicesRequest.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ClaimDevicesRequest.java index ae3e8c806059d..12cd6f0eb35df 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ClaimDevicesRequest.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ClaimDevicesRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Request to the action call to bulk claim devices. */ +/** + * Request to the action call to bulk claim devices. + */ @Fluent public final class ClaimDevicesRequest { /* @@ -18,13 +20,15 @@ public final class ClaimDevicesRequest { @JsonProperty(value = "deviceIdentifiers", required = true) private List deviceIdentifiers; - /** Creates an instance of ClaimDevicesRequest class. */ + /** + * Creates an instance of ClaimDevicesRequest class. + */ public ClaimDevicesRequest() { } /** * Get the deviceIdentifiers property: Device identifiers of the devices to be claimed. - * + * * @return the deviceIdentifiers value. */ public List deviceIdentifiers() { @@ -33,7 +37,7 @@ public List deviceIdentifiers() { /** * Set the deviceIdentifiers property: Device identifiers of the devices to be claimed. - * + * * @param deviceIdentifiers the deviceIdentifiers value to set. * @return the ClaimDevicesRequest object itself. */ @@ -44,15 +48,13 @@ public ClaimDevicesRequest withDeviceIdentifiers(List deviceIdentifiers) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (deviceIdentifiers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property deviceIdentifiers in model ClaimDevicesRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property deviceIdentifiers in model ClaimDevicesRequest")); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountDeviceResponse.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountDeviceResponse.java index 7cadda61b459f..e94d525171290 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountDeviceResponse.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountDeviceResponse.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner; -/** An immutable client-side representation of CountDeviceResponse. */ +/** + * An immutable client-side representation of CountDeviceResponse. + */ public interface CountDeviceResponse { /** * Gets the value property: Number of children resources in parent resource. - * + * * @return the value value. */ int value(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner object. - * + * * @return the inner object. */ CountDeviceResponseInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountElementsResponse.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountElementsResponse.java index 8f716d7182f12..1c4ca678f5fe2 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountElementsResponse.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/CountElementsResponse.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Response of the count for elements. */ +/** + * Response of the count for elements. + */ @Fluent public class CountElementsResponse { /* @@ -16,13 +18,15 @@ public class CountElementsResponse { @JsonProperty(value = "value", required = true) private int value; - /** Creates an instance of CountElementsResponse class. */ + /** + * Creates an instance of CountElementsResponse class. + */ public CountElementsResponse() { } /** * Get the value property: Number of children resources in parent resource. - * + * * @return the value value. */ public int value() { @@ -31,7 +35,7 @@ public int value() { /** * Set the value property: Number of children resources in parent resource. - * + * * @param value the value value to set. * @return the CountElementsResponse object itself. */ @@ -42,7 +46,7 @@ public CountElementsResponse withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployment.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployment.java index 52b52dcfd10bc..50a4bb9c4ac16 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployment.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployment.java @@ -4,186 +4,175 @@ package com.azure.resourcemanager.sphere.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import java.time.OffsetDateTime; -import java.util.List; -/** An immutable client-side representation of Deployment. */ +/** + * An immutable client-side representation of Deployment. + */ public interface Deployment { /** * 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 deploymentId property: Deployment ID. - * - * @return the deploymentId value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String deploymentId(); + DeploymentProperties properties(); /** - * Gets the deployedImages property: Images deployed. - * - * @return the deployedImages value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - List deployedImages(); - - /** - * Gets the deploymentDateUtc property: Deployment date UTC. - * - * @return the deploymentDateUtc value. - */ - OffsetDateTime deploymentDateUtc(); - - /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.DeploymentInner object. - * + * * @return the inner object. */ DeploymentInner innerModel(); - /** The entirety of the Deployment definition. */ + /** + * The entirety of the Deployment definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Deployment definition stages. */ + /** + * The Deployment definition stages. + */ interface DefinitionStages { - /** The first stage of the Deployment definition. */ + /** + * The first stage of the Deployment definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Deployment definition allowing to specify parent resource. */ + /** + * The stage of the Deployment definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, catalogName, productName, deviceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @return the next definition stage. */ - WithCreate withExistingDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + WithCreate withExistingDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); } /** * The stage of the Deployment 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.WithDeploymentId, DefinitionStages.WithDeployedImages { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Deployment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Deployment create(Context context); } - /** The stage of the Deployment definition allowing to specify deploymentId. */ - interface WithDeploymentId { - /** - * Specifies the deploymentId property: Deployment ID. - * - * @param deploymentId Deployment ID. - * @return the next definition stage. - */ - WithCreate withDeploymentId(String deploymentId); - } - - /** The stage of the Deployment definition allowing to specify deployedImages. */ - interface WithDeployedImages { + /** + * The stage of the Deployment definition allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the deployedImages property: Images deployed. - * - * @param deployedImages Images deployed. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withDeployedImages(List deployedImages); + WithCreate withProperties(DeploymentProperties properties); } } /** * Begins update for the Deployment resource. - * + * * @return the stage of resource update. */ Deployment.Update update(); - /** The template for Deployment update. */ + /** + * The template for Deployment update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ Deployment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Deployment apply(Context context); } - /** The Deployment update stages. */ + /** + * The Deployment update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Deployment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentListResult.java index 6c7498792bfa5..d17833f047729 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Deployment list operation. */ +/** + * The response of a Deployment list operation. + */ @Fluent public final class DeploymentListResult { /* @@ -25,13 +27,15 @@ public final class DeploymentListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DeploymentListResult class. */ + /** + * Creates an instance of DeploymentListResult class. + */ public DeploymentListResult() { } /** * Get the value property: The Deployment items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Deployment items on this page. - * + * * @param value the value value to set. * @return the DeploymentListResult object itself. */ @@ -51,7 +55,7 @@ public DeploymentListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the DeploymentListResult object itself. */ @@ -71,14 +75,13 @@ public DeploymentListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DeploymentListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DeploymentListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentProperties.java similarity index 90% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentProperties.java index 426c75a317fd1..301897ce51c8e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeploymentProperties.java @@ -2,15 +2,17 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.models.ProvisioningState; +import com.azure.resourcemanager.sphere.fluent.models.ImageInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** The properties of deployment. */ +/** + * The properties of deployment. + */ @Fluent public final class DeploymentProperties { /* @@ -37,13 +39,15 @@ public final class DeploymentProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of DeploymentProperties class. */ + /** + * Creates an instance of DeploymentProperties class. + */ public DeploymentProperties() { } /** * Get the deploymentId property: Deployment ID. - * + * * @return the deploymentId value. */ public String deploymentId() { @@ -52,7 +56,7 @@ public String deploymentId() { /** * Set the deploymentId property: Deployment ID. - * + * * @param deploymentId the deploymentId value to set. * @return the DeploymentProperties object itself. */ @@ -63,7 +67,7 @@ public DeploymentProperties withDeploymentId(String deploymentId) { /** * Get the deployedImages property: Images deployed. - * + * * @return the deployedImages value. */ public List deployedImages() { @@ -72,7 +76,7 @@ public List deployedImages() { /** * Set the deployedImages property: Images deployed. - * + * * @param deployedImages the deployedImages value to set. * @return the DeploymentProperties object itself. */ @@ -83,7 +87,7 @@ public DeploymentProperties withDeployedImages(List deployedImages) /** * Get the deploymentDateUtc property: Deployment date UTC. - * + * * @return the deploymentDateUtc value. */ public OffsetDateTime deploymentDateUtc() { @@ -92,7 +96,7 @@ public OffsetDateTime deploymentDateUtc() { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -101,7 +105,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployments.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployments.java index 082f28f191fe7..71d8fff814d50 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployments.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Deployments.java @@ -8,12 +8,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Deployments. */ +/** + * Resource collection API of Deployments. + */ public interface Deployments { /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -23,13 +25,13 @@ public interface Deployments { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be * used for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -44,111 +46,85 @@ PagedIterable listByDeviceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByDeviceGroup( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deploymentName, Context context); /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 Deployment. */ - Deployment get( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + Deployment get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deploymentName); /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for - * the associated device group. + * the associated device group. * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deploymentName, - Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deploymentName, Context context); /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -160,7 +136,7 @@ void delete( /** * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device * group name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +149,7 @@ void delete( /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,7 +160,7 @@ void delete( /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,7 +171,7 @@ void delete( /** * Begins definition for a new Deployment resource. - * + * * @param name resource name. * @return the first stage of the new Deployment definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Device.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Device.java index 073290d5c9968..0228d79e48579 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Device.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Device.java @@ -4,204 +4,187 @@ package com.azure.resourcemanager.sphere.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeviceInner; -import java.time.OffsetDateTime; -/** An immutable client-side representation of Device. */ +/** + * An immutable client-side representation of Device. + */ public interface Device { /** * 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 deviceId property: Device ID. - * - * @return the deviceId value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String deviceId(); + DeviceProperties properties(); /** - * Gets the chipSku property: SKU of the chip. - * - * @return the chipSku value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - String chipSku(); - - /** - * Gets the lastAvailableOsVersion property: OS version available for installation when update requested. - * - * @return the lastAvailableOsVersion value. - */ - String lastAvailableOsVersion(); - - /** - * Gets the lastInstalledOsVersion property: OS version running on device when update requested. - * - * @return the lastInstalledOsVersion value. - */ - String lastInstalledOsVersion(); - - /** - * Gets the lastOsUpdateUtc property: Time when update requested and new OS version available. - * - * @return the lastOsUpdateUtc value. - */ - OffsetDateTime lastOsUpdateUtc(); - - /** - * Gets the lastUpdateRequestUtc property: Time when update was last requested. - * - * @return the lastUpdateRequestUtc value. - */ - OffsetDateTime lastUpdateRequestUtc(); - - /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.DeviceInner object. - * + * * @return the inner object. */ DeviceInner innerModel(); - /** The entirety of the Device definition. */ + /** + * The entirety of the Device definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Device definition stages. */ + /** + * The Device definition stages. + */ interface DefinitionStages { - /** The first stage of the Device definition. */ + /** + * The first stage of the Device definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Device definition allowing to specify parent resource. */ + /** + * The stage of the Device definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, catalogName, productName, deviceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. * @param deviceGroupName Name of device group. * @return the next definition stage. */ - WithCreate withExistingDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + WithCreate withExistingDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); } /** * The stage of the Device 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.WithDeviceId { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Device create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Device create(Context context); } - /** The stage of the Device definition allowing to specify deviceId. */ - interface WithDeviceId { + /** + * The stage of the Device definition allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the deviceId property: Device ID. - * - * @param deviceId Device ID. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withDeviceId(String deviceId); + WithCreate withProperties(DeviceProperties properties); } } /** * Begins update for the Device resource. - * + * * @return the stage of resource update. */ Device.Update update(); - /** The template for Device update. */ - interface Update extends UpdateStages.WithDeviceGroupId { + /** + * The template for Device update. + */ + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ Device apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Device apply(Context context); } - /** The Device update stages. */ + /** + * The Device update stages. + */ interface UpdateStages { - /** The stage of the Device update allowing to specify deviceGroupId. */ - interface WithDeviceGroupId { + /** + * The stage of the Device update allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the deviceGroupId property: Device group id. - * - * @param deviceGroupId Device group id. + * Specifies the properties property: The updatable properties of the Device.. + * + * @param properties The updatable properties of the Device. * @return the next definition stage. */ - Update withDeviceGroupId(String deviceGroupId); + Update withProperties(DeviceUpdateProperties properties); } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Device refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -210,20 +193,20 @@ interface WithDeviceGroupId { /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param generateDeviceCapabilityRequest Generate capability image request body. * @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 signed device capability image response. */ - SignedCapabilityImageResponse generateCapabilityImage( - GenerateCapabilityImageRequest generateDeviceCapabilityRequest); + SignedCapabilityImageResponse + generateCapabilityImage(GenerateCapabilityImageRequest generateDeviceCapabilityRequest); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param generateDeviceCapabilityRequest Generate capability image request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,6 +214,6 @@ SignedCapabilityImageResponse generateCapabilityImage( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return signed device capability image response. */ - SignedCapabilityImageResponse generateCapabilityImage( - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context); + SignedCapabilityImageResponse + generateCapabilityImage(GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroup.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroup.java index 19be2d25dcec9..e2ff939e839c9 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroup.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroup.java @@ -5,111 +5,87 @@ package com.azure.resourcemanager.sphere.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner; -/** An immutable client-side representation of DeviceGroup. */ +/** + * An immutable client-side representation of DeviceGroup. + */ public interface DeviceGroup { /** * 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 description property: Description of the device group. - * - * @return the description value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String description(); + DeviceGroupProperties properties(); /** - * Gets the osFeedType property: Operating system feed type of the device group. - * - * @return the osFeedType value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - OSFeedType osFeedType(); - - /** - * Gets the updatePolicy property: Update policy of the device group. - * - * @return the updatePolicy value. - */ - UpdatePolicy updatePolicy(); - - /** - * Gets the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * - * @return the allowCrashDumpsCollection value. - */ - AllowCrashDumpCollection allowCrashDumpsCollection(); - - /** - * Gets the regionalDataBoundary property: Regional data boundary for the device group. - * - * @return the regionalDataBoundary value. - */ - RegionalDataBoundary regionalDataBoundary(); - - /** - * Gets the hasDeployment property: Deployment status for the device group. - * - * @return the hasDeployment value. - */ - Boolean hasDeployment(); - - /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner object. - * + * * @return the inner object. */ DeviceGroupInner innerModel(); - /** The entirety of the DeviceGroup definition. */ + /** + * The entirety of the DeviceGroup definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The DeviceGroup definition stages. */ + /** + * The DeviceGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the DeviceGroup definition. */ + /** + * The first stage of the DeviceGroup definition. + */ interface Blank extends WithParentResource { } - /** The stage of the DeviceGroup definition allowing to specify parent resource. */ + /** + * The stage of the DeviceGroup definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, catalogName, productName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -122,184 +98,92 @@ interface WithParentResource { * The stage of the DeviceGroup 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.WithDescription, - DefinitionStages.WithOsFeedType, - DefinitionStages.WithUpdatePolicy, - DefinitionStages.WithAllowCrashDumpsCollection, - DefinitionStages.WithRegionalDataBoundary { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ DeviceGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DeviceGroup create(Context context); } - /** The stage of the DeviceGroup definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Description of the device group.. - * - * @param description Description of the device group. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the DeviceGroup definition allowing to specify osFeedType. */ - interface WithOsFeedType { - /** - * Specifies the osFeedType property: Operating system feed type of the device group.. - * - * @param osFeedType Operating system feed type of the device group. - * @return the next definition stage. - */ - WithCreate withOsFeedType(OSFeedType osFeedType); - } - - /** The stage of the DeviceGroup definition allowing to specify updatePolicy. */ - interface WithUpdatePolicy { - /** - * Specifies the updatePolicy property: Update policy of the device group.. - * - * @param updatePolicy Update policy of the device group. - * @return the next definition stage. - */ - WithCreate withUpdatePolicy(UpdatePolicy updatePolicy); - } - - /** The stage of the DeviceGroup definition allowing to specify allowCrashDumpsCollection. */ - interface WithAllowCrashDumpsCollection { - /** - * Specifies the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump - * collection.. - * - * @param allowCrashDumpsCollection Flag to define if the user allows for crash dump collection. - * @return the next definition stage. - */ - WithCreate withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection); - } - - /** The stage of the DeviceGroup definition allowing to specify regionalDataBoundary. */ - interface WithRegionalDataBoundary { + /** + * The stage of the DeviceGroup definition allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the regionalDataBoundary property: Regional data boundary for the device group.. - * - * @param regionalDataBoundary Regional data boundary for the device group. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary); + WithCreate withProperties(DeviceGroupProperties properties); } } /** * Begins update for the DeviceGroup resource. - * + * * @return the stage of resource update. */ DeviceGroup.Update update(); - /** The template for DeviceGroup update. */ - interface Update - extends UpdateStages.WithDescription, - UpdateStages.WithOsFeedType, - UpdateStages.WithUpdatePolicy, - UpdateStages.WithAllowCrashDumpsCollection, - UpdateStages.WithRegionalDataBoundary { + /** + * The template for DeviceGroup update. + */ + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ DeviceGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DeviceGroup apply(Context context); } - /** The DeviceGroup update stages. */ + /** + * The DeviceGroup update stages. + */ interface UpdateStages { - /** The stage of the DeviceGroup update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Description of the device group.. - * - * @param description Description of the device group. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the DeviceGroup update allowing to specify osFeedType. */ - interface WithOsFeedType { - /** - * Specifies the osFeedType property: Operating system feed type of the device group.. - * - * @param osFeedType Operating system feed type of the device group. - * @return the next definition stage. - */ - Update withOsFeedType(OSFeedType osFeedType); - } - - /** The stage of the DeviceGroup update allowing to specify updatePolicy. */ - interface WithUpdatePolicy { - /** - * Specifies the updatePolicy property: Update policy of the device group.. - * - * @param updatePolicy Update policy of the device group. - * @return the next definition stage. - */ - Update withUpdatePolicy(UpdatePolicy updatePolicy); - } - - /** The stage of the DeviceGroup update allowing to specify allowCrashDumpsCollection. */ - interface WithAllowCrashDumpsCollection { - /** - * Specifies the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump - * collection.. - * - * @param allowCrashDumpsCollection Flag to define if the user allows for crash dump collection. - * @return the next definition stage. - */ - Update withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection); - } - - /** The stage of the DeviceGroup update allowing to specify regionalDataBoundary. */ - interface WithRegionalDataBoundary { + /** + * The stage of the DeviceGroup update allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the regionalDataBoundary property: Regional data boundary for the device group.. - * - * @param regionalDataBoundary Regional data boundary for the device group. + * Specifies the properties property: The updatable properties of the DeviceGroup.. + * + * @param properties The updatable properties of the DeviceGroup. * @return the next definition stage. */ - Update withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary); + Update withProperties(DeviceGroupUpdateProperties properties); } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DeviceGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -308,7 +192,7 @@ interface WithRegionalDataBoundary { /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param claimDevicesRequest Bulk claim devices request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -319,7 +203,7 @@ interface WithRegionalDataBoundary { /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param claimDevicesRequest Bulk claim devices request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,7 +215,7 @@ interface WithRegionalDataBoundary { /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -343,7 +227,7 @@ interface WithRegionalDataBoundary { /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @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 response to the action call for count devices in a catalog. diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupListResult.java index 5010b57a9b072..26fec842712a2 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a DeviceGroup list operation. */ +/** + * The response of a DeviceGroup list operation. + */ @Fluent public final class DeviceGroupListResult { /* @@ -25,13 +27,15 @@ public final class DeviceGroupListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DeviceGroupListResult class. */ + /** + * Creates an instance of DeviceGroupListResult class. + */ public DeviceGroupListResult() { } /** * Get the value property: The DeviceGroup items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The DeviceGroup items on this page. - * + * * @param value the value value to set. * @return the DeviceGroupListResult object itself. */ @@ -51,7 +55,7 @@ public DeviceGroupListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the DeviceGroupListResult object itself. */ @@ -71,14 +75,13 @@ public DeviceGroupListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DeviceGroupListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DeviceGroupListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupProperties.java similarity index 90% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupProperties.java index dfab130e9fa89..007e5cbf4de8e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupProperties.java @@ -2,17 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of deviceGroup. */ +/** + * The properties of deviceGroup. + */ @Fluent public final class DeviceGroupProperties { /* @@ -57,13 +54,15 @@ public final class DeviceGroupProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of DeviceGroupProperties class. */ + /** + * Creates an instance of DeviceGroupProperties class. + */ public DeviceGroupProperties() { } /** * Get the description property: Description of the device group. - * + * * @return the description value. */ public String description() { @@ -72,7 +71,7 @@ public String description() { /** * Set the description property: Description of the device group. - * + * * @param description the description value to set. * @return the DeviceGroupProperties object itself. */ @@ -83,7 +82,7 @@ public DeviceGroupProperties withDescription(String description) { /** * Get the osFeedType property: Operating system feed type of the device group. - * + * * @return the osFeedType value. */ public OSFeedType osFeedType() { @@ -92,7 +91,7 @@ public OSFeedType osFeedType() { /** * Set the osFeedType property: Operating system feed type of the device group. - * + * * @param osFeedType the osFeedType value to set. * @return the DeviceGroupProperties object itself. */ @@ -103,7 +102,7 @@ public DeviceGroupProperties withOsFeedType(OSFeedType osFeedType) { /** * Get the updatePolicy property: Update policy of the device group. - * + * * @return the updatePolicy value. */ public UpdatePolicy updatePolicy() { @@ -112,7 +111,7 @@ public UpdatePolicy updatePolicy() { /** * Set the updatePolicy property: Update policy of the device group. - * + * * @param updatePolicy the updatePolicy value to set. * @return the DeviceGroupProperties object itself. */ @@ -123,7 +122,7 @@ public DeviceGroupProperties withUpdatePolicy(UpdatePolicy updatePolicy) { /** * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * + * * @return the allowCrashDumpsCollection value. */ public AllowCrashDumpCollection allowCrashDumpsCollection() { @@ -132,7 +131,7 @@ public AllowCrashDumpCollection allowCrashDumpsCollection() { /** * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * + * * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set. * @return the DeviceGroupProperties object itself. */ @@ -143,7 +142,7 @@ public DeviceGroupProperties withAllowCrashDumpsCollection(AllowCrashDumpCollect /** * Get the regionalDataBoundary property: Regional data boundary for the device group. - * + * * @return the regionalDataBoundary value. */ public RegionalDataBoundary regionalDataBoundary() { @@ -152,7 +151,7 @@ public RegionalDataBoundary regionalDataBoundary() { /** * Set the regionalDataBoundary property: Regional data boundary for the device group. - * + * * @param regionalDataBoundary the regionalDataBoundary value to set. * @return the DeviceGroupProperties object itself. */ @@ -163,7 +162,7 @@ public DeviceGroupProperties withRegionalDataBoundary(RegionalDataBoundary regio /** * Get the hasDeployment property: Deployment status for the device group. - * + * * @return the hasDeployment value. */ public Boolean hasDeployment() { @@ -172,7 +171,7 @@ public Boolean hasDeployment() { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -181,7 +180,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdate.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdate.java index b29005860436c..6b8a3dedd1714 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdate.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdate.java @@ -5,154 +5,53 @@ package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The type used for update operations of the DeviceGroup. */ +/** + * The type used for update operations of the DeviceGroup. + */ @Fluent public final class DeviceGroupUpdate { /* * The updatable properties of the DeviceGroup. */ @JsonProperty(value = "properties") - private DeviceGroupUpdateProperties innerProperties; - - /** Creates an instance of DeviceGroupUpdate class. */ - public DeviceGroupUpdate() { - } - - /** - * Get the innerProperties property: The updatable properties of the DeviceGroup. - * - * @return the innerProperties value. - */ - private DeviceGroupUpdateProperties innerProperties() { - return this.innerProperties; - } + private DeviceGroupUpdateProperties properties; /** - * Get the description property: Description of the device group. - * - * @return the description value. + * Creates an instance of DeviceGroupUpdate class. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Description of the device group. - * - * @param description the description value to set. - * @return the DeviceGroupUpdate object itself. - */ - public DeviceGroupUpdate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupUpdateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the osFeedType property: Operating system feed type of the device group. - * - * @return the osFeedType value. - */ - public OSFeedType osFeedType() { - return this.innerProperties() == null ? null : this.innerProperties().osFeedType(); - } - - /** - * Set the osFeedType property: Operating system feed type of the device group. - * - * @param osFeedType the osFeedType value to set. - * @return the DeviceGroupUpdate object itself. - */ - public DeviceGroupUpdate withOsFeedType(OSFeedType osFeedType) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupUpdateProperties(); - } - this.innerProperties().withOsFeedType(osFeedType); - return this; - } - - /** - * Get the updatePolicy property: Update policy of the device group. - * - * @return the updatePolicy value. - */ - public UpdatePolicy updatePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().updatePolicy(); - } - - /** - * Set the updatePolicy property: Update policy of the device group. - * - * @param updatePolicy the updatePolicy value to set. - * @return the DeviceGroupUpdate object itself. - */ - public DeviceGroupUpdate withUpdatePolicy(UpdatePolicy updatePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupUpdateProperties(); - } - this.innerProperties().withUpdatePolicy(updatePolicy); - return this; - } - - /** - * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * - * @return the allowCrashDumpsCollection value. - */ - public AllowCrashDumpCollection allowCrashDumpsCollection() { - return this.innerProperties() == null ? null : this.innerProperties().allowCrashDumpsCollection(); - } - - /** - * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * - * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set. - * @return the DeviceGroupUpdate object itself. - */ - public DeviceGroupUpdate withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupUpdateProperties(); - } - this.innerProperties().withAllowCrashDumpsCollection(allowCrashDumpsCollection); - return this; + public DeviceGroupUpdate() { } /** - * Get the regionalDataBoundary property: Regional data boundary for the device group. - * - * @return the regionalDataBoundary value. + * Get the properties property: The updatable properties of the DeviceGroup. + * + * @return the properties value. */ - public RegionalDataBoundary regionalDataBoundary() { - return this.innerProperties() == null ? null : this.innerProperties().regionalDataBoundary(); + public DeviceGroupUpdateProperties properties() { + return this.properties; } /** - * Set the regionalDataBoundary property: Regional data boundary for the device group. - * - * @param regionalDataBoundary the regionalDataBoundary value to set. + * Set the properties property: The updatable properties of the DeviceGroup. + * + * @param properties the properties value to set. * @return the DeviceGroupUpdate object itself. */ - public DeviceGroupUpdate withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceGroupUpdateProperties(); - } - this.innerProperties().withRegionalDataBoundary(regionalDataBoundary); + public DeviceGroupUpdate withProperties(DeviceGroupUpdateProperties properties) { + this.properties = properties; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdateProperties.java similarity index 87% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdateProperties.java index 055f245fd2369..0761b1534557d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroupUpdateProperties.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; import com.fasterxml.jackson.annotation.JsonProperty; -/** The updatable properties of the DeviceGroup. */ +/** + * The updatable properties of the DeviceGroup. + */ @Fluent public final class DeviceGroupUpdateProperties { /* @@ -44,13 +42,15 @@ public final class DeviceGroupUpdateProperties { @JsonProperty(value = "regionalDataBoundary") private RegionalDataBoundary regionalDataBoundary; - /** Creates an instance of DeviceGroupUpdateProperties class. */ + /** + * Creates an instance of DeviceGroupUpdateProperties class. + */ public DeviceGroupUpdateProperties() { } /** * Get the description property: Description of the device group. - * + * * @return the description value. */ public String description() { @@ -59,7 +59,7 @@ public String description() { /** * Set the description property: Description of the device group. - * + * * @param description the description value to set. * @return the DeviceGroupUpdateProperties object itself. */ @@ -70,7 +70,7 @@ public DeviceGroupUpdateProperties withDescription(String description) { /** * Get the osFeedType property: Operating system feed type of the device group. - * + * * @return the osFeedType value. */ public OSFeedType osFeedType() { @@ -79,7 +79,7 @@ public OSFeedType osFeedType() { /** * Set the osFeedType property: Operating system feed type of the device group. - * + * * @param osFeedType the osFeedType value to set. * @return the DeviceGroupUpdateProperties object itself. */ @@ -90,7 +90,7 @@ public DeviceGroupUpdateProperties withOsFeedType(OSFeedType osFeedType) { /** * Get the updatePolicy property: Update policy of the device group. - * + * * @return the updatePolicy value. */ public UpdatePolicy updatePolicy() { @@ -99,7 +99,7 @@ public UpdatePolicy updatePolicy() { /** * Set the updatePolicy property: Update policy of the device group. - * + * * @param updatePolicy the updatePolicy value to set. * @return the DeviceGroupUpdateProperties object itself. */ @@ -110,7 +110,7 @@ public DeviceGroupUpdateProperties withUpdatePolicy(UpdatePolicy updatePolicy) { /** * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * + * * @return the allowCrashDumpsCollection value. */ public AllowCrashDumpCollection allowCrashDumpsCollection() { @@ -119,19 +119,19 @@ public AllowCrashDumpCollection allowCrashDumpsCollection() { /** * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection. - * + * * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set. * @return the DeviceGroupUpdateProperties object itself. */ - public DeviceGroupUpdateProperties withAllowCrashDumpsCollection( - AllowCrashDumpCollection allowCrashDumpsCollection) { + public DeviceGroupUpdateProperties + withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) { this.allowCrashDumpsCollection = allowCrashDumpsCollection; return this; } /** * Get the regionalDataBoundary property: Regional data boundary for the device group. - * + * * @return the regionalDataBoundary value. */ public RegionalDataBoundary regionalDataBoundary() { @@ -140,7 +140,7 @@ public RegionalDataBoundary regionalDataBoundary() { /** * Set the regionalDataBoundary property: Regional data boundary for the device group. - * + * * @param regionalDataBoundary the regionalDataBoundary value to set. * @return the DeviceGroupUpdateProperties object itself. */ @@ -151,7 +151,7 @@ public DeviceGroupUpdateProperties withRegionalDataBoundary(RegionalDataBoundary /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroups.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroups.java index ece2c86ce5a7b..8e68d89de582f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroups.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceGroups.java @@ -8,12 +8,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of DeviceGroups. */ +/** + * Resource collection API of DeviceGroups. + */ public interface DeviceGroups { /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -27,7 +29,7 @@ public interface DeviceGroups { /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used * for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -41,20 +43,13 @@ public interface DeviceGroups { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByProduct( - String resourceGroupName, - String catalogName, - String productName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName, + String filter, Integer top, Integer skip, Integer maxpagesize, Context context); /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -65,13 +60,13 @@ PagedIterable listByProduct( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a DeviceGroup along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context); /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -86,7 +81,7 @@ Response getWithResponse( /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -100,7 +95,7 @@ Response getWithResponse( /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -110,13 +105,13 @@ Response getWithResponse( * @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 delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + Context context); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -126,17 +121,13 @@ void delete( * @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 claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, + void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, ClaimDevicesRequest claimDevicesRequest); /** * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk * claiming devices to a catalog only. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -147,18 +138,13 @@ void claimDevices( * @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 claimDevices( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - ClaimDevicesRequest claimDevicesRequest, - Context context); + void claimDevices(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + ClaimDevicesRequest claimDevicesRequest, Context context); /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -169,13 +155,13 @@ void claimDevices( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response to the action call for count devices in a catalog along with {@link Response}. */ - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, Context context); /** * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for * product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -185,13 +171,13 @@ Response countDevicesWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response to the action call for count devices in a catalog. */ - CountDeviceResponse countDevices( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + CountDeviceResponse countDevices(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -203,7 +189,7 @@ CountDeviceResponse countDevices( /** * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,7 +202,7 @@ CountDeviceResponse countDevices( /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,7 +213,7 @@ CountDeviceResponse countDevices( /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or * device group name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -238,7 +224,7 @@ CountDeviceResponse countDevices( /** * Begins definition for a new DeviceGroup resource. - * + * * @param name resource name. * @return the first stage of the new DeviceGroup definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceInsight.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceInsight.java index adf199386321d..1ddc5e3df51f6 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceInsight.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceInsight.java @@ -7,67 +7,69 @@ import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of DeviceInsight. */ +/** + * An immutable client-side representation of DeviceInsight. + */ public interface DeviceInsight { /** * Gets the deviceId property: Device ID. - * + * * @return the deviceId value. */ String deviceId(); /** * Gets the description property: Event description. - * + * * @return the description value. */ String description(); /** * Gets the startTimestampUtc property: Event start timestamp. - * + * * @return the startTimestampUtc value. */ OffsetDateTime startTimestampUtc(); /** * Gets the endTimestampUtc property: Event end timestamp. - * + * * @return the endTimestampUtc value. */ OffsetDateTime endTimestampUtc(); /** * Gets the eventCategory property: Event category. - * + * * @return the eventCategory value. */ String eventCategory(); /** * Gets the eventClass property: Event class. - * + * * @return the eventClass value. */ String eventClass(); /** * Gets the eventType property: Event type. - * + * * @return the eventType value. */ String eventType(); /** * Gets the eventCount property: Event count. - * + * * @return the eventCount value. */ int eventCount(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner object. - * + * * @return the inner object. */ DeviceInsightInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceListResult.java index 5f6ddd913eec1..5d95dfc3214a9 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Device list operation. */ +/** + * The response of a Device list operation. + */ @Fluent public final class DeviceListResult { /* @@ -25,13 +27,15 @@ public final class DeviceListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DeviceListResult class. */ + /** + * Creates an instance of DeviceListResult class. + */ public DeviceListResult() { } /** * Get the value property: The Device items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Device items on this page. - * + * * @param value the value value to set. * @return the DeviceListResult object itself. */ @@ -51,7 +55,7 @@ public DeviceListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the DeviceListResult object itself. */ @@ -71,14 +75,13 @@ public DeviceListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DeviceListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DeviceListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceProperties.java similarity index 93% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceProperties.java index 007b9a67c80d8..0367cccef4a0a 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceProperties.java @@ -2,14 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The properties of device. */ +/** + * The properties of device. + */ @Fluent public final class DeviceProperties { /* @@ -54,13 +55,15 @@ public final class DeviceProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of DeviceProperties class. */ + /** + * Creates an instance of DeviceProperties class. + */ public DeviceProperties() { } /** * Get the deviceId property: Device ID. - * + * * @return the deviceId value. */ public String deviceId() { @@ -69,7 +72,7 @@ public String deviceId() { /** * Set the deviceId property: Device ID. - * + * * @param deviceId the deviceId value to set. * @return the DeviceProperties object itself. */ @@ -80,7 +83,7 @@ public DeviceProperties withDeviceId(String deviceId) { /** * Get the chipSku property: SKU of the chip. - * + * * @return the chipSku value. */ public String chipSku() { @@ -89,7 +92,7 @@ public String chipSku() { /** * Get the lastAvailableOsVersion property: OS version available for installation when update requested. - * + * * @return the lastAvailableOsVersion value. */ public String lastAvailableOsVersion() { @@ -98,7 +101,7 @@ public String lastAvailableOsVersion() { /** * Get the lastInstalledOsVersion property: OS version running on device when update requested. - * + * * @return the lastInstalledOsVersion value. */ public String lastInstalledOsVersion() { @@ -107,7 +110,7 @@ public String lastInstalledOsVersion() { /** * Get the lastOsUpdateUtc property: Time when update requested and new OS version available. - * + * * @return the lastOsUpdateUtc value. */ public OffsetDateTime lastOsUpdateUtc() { @@ -116,7 +119,7 @@ public OffsetDateTime lastOsUpdateUtc() { /** * Get the lastUpdateRequestUtc property: Time when update was last requested. - * + * * @return the lastUpdateRequestUtc value. */ public OffsetDateTime lastUpdateRequestUtc() { @@ -125,7 +128,7 @@ public OffsetDateTime lastUpdateRequestUtc() { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -134,7 +137,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdate.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdate.java index 9217bec762a3a..513a2533d53e6 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdate.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdate.java @@ -5,62 +5,53 @@ package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.fluent.models.DeviceUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The type used for update operations of the Device. */ +/** + * The type used for update operations of the Device. + */ @Fluent public final class DeviceUpdate { /* * The updatable properties of the Device. */ @JsonProperty(value = "properties") - private DeviceUpdateProperties innerProperties; - - /** Creates an instance of DeviceUpdate class. */ - public DeviceUpdate() { - } + private DeviceUpdateProperties properties; /** - * Get the innerProperties property: The updatable properties of the Device. - * - * @return the innerProperties value. + * Creates an instance of DeviceUpdate class. */ - private DeviceUpdateProperties innerProperties() { - return this.innerProperties; + public DeviceUpdate() { } /** - * Get the deviceGroupId property: Device group id. - * - * @return the deviceGroupId value. + * Get the properties property: The updatable properties of the Device. + * + * @return the properties value. */ - public String deviceGroupId() { - return this.innerProperties() == null ? null : this.innerProperties().deviceGroupId(); + public DeviceUpdateProperties properties() { + return this.properties; } /** - * Set the deviceGroupId property: Device group id. - * - * @param deviceGroupId the deviceGroupId value to set. + * Set the properties property: The updatable properties of the Device. + * + * @param properties the properties value to set. * @return the DeviceUpdate object itself. */ - public DeviceUpdate withDeviceGroupId(String deviceGroupId) { - if (this.innerProperties() == null) { - this.innerProperties = new DeviceUpdateProperties(); - } - this.innerProperties().withDeviceGroupId(deviceGroupId); + public DeviceUpdate withProperties(DeviceUpdateProperties properties) { + this.properties = properties; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdateProperties.java similarity index 85% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdateProperties.java index d89b5654acf6a..9b6696d7d517d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/DeviceUpdateProperties.java @@ -2,12 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The updatable properties of the Device. */ +/** + * The updatable properties of the Device. + */ @Fluent public final class DeviceUpdateProperties { /* @@ -16,13 +18,15 @@ public final class DeviceUpdateProperties { @JsonProperty(value = "deviceGroupId") private String deviceGroupId; - /** Creates an instance of DeviceUpdateProperties class. */ + /** + * Creates an instance of DeviceUpdateProperties class. + */ public DeviceUpdateProperties() { } /** * Get the deviceGroupId property: Device group id. - * + * * @return the deviceGroupId value. */ public String deviceGroupId() { @@ -31,7 +35,7 @@ public String deviceGroupId() { /** * Set the deviceGroupId property: Device group id. - * + * * @param deviceGroupId the deviceGroupId value to set. * @return the DeviceUpdateProperties object itself. */ @@ -42,7 +46,7 @@ public DeviceUpdateProperties withDeviceGroupId(String deviceGroupId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Devices.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Devices.java index 120b73eaa9d46..ef2bd6c513eeb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Devices.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Devices.java @@ -8,12 +8,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Devices. */ +/** + * Resource collection API of Devices. + */ public interface Devices { /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -23,13 +25,13 @@ public interface Devices { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName); /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used * for product or device group name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -40,13 +42,13 @@ PagedIterable listByDeviceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Device list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByDeviceGroup( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context); + PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, Context context); /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -58,18 +60,13 @@ PagedIterable listByDeviceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Device along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + String deviceGroupName, String deviceName, Context context); /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -80,12 +77,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Device. */ - Device get( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName); + Device get(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -95,12 +92,12 @@ Device get( * @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 delete( - String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName); /** * Delete a Device. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -111,18 +108,13 @@ void delete( * @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 delete( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - Context context); + void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName, + String deviceName, Context context); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -134,18 +126,14 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return signed device capability image response. */ - SignedCapabilityImageResponse generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, + SignedCapabilityImageResponse generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, GenerateCapabilityImageRequest generateDeviceCapabilityRequest); /** * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product * names to generate the image for a device that does not belong to a specific device group and product. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -158,19 +146,14 @@ SignedCapabilityImageResponse generateCapabilityImage( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return signed device capability image response. */ - SignedCapabilityImageResponse generateCapabilityImage( - String resourceGroupName, - String catalogName, - String productName, - String deviceGroupName, - String deviceName, - GenerateCapabilityImageRequest generateDeviceCapabilityRequest, - Context context); + SignedCapabilityImageResponse generateCapabilityImage(String resourceGroupName, String catalogName, + String productName, String deviceGroupName, String deviceName, + GenerateCapabilityImageRequest generateDeviceCapabilityRequest, Context context); /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,7 +165,7 @@ SignedCapabilityImageResponse generateCapabilityImage( /** * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not * belong to a device group and product. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,7 +177,7 @@ SignedCapabilityImageResponse generateCapabilityImage( /** * Delete a Device. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -204,7 +187,7 @@ SignedCapabilityImageResponse generateCapabilityImage( /** * Delete a Device. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -215,7 +198,7 @@ SignedCapabilityImageResponse generateCapabilityImage( /** * Begins definition for a new Device resource. - * + * * @param name resource name. * @return the first stage of the new Device definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/GenerateCapabilityImageRequest.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/GenerateCapabilityImageRequest.java index e795eb1a071e1..149670e052b4d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/GenerateCapabilityImageRequest.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/GenerateCapabilityImageRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Request of the action to create a signed device capability image. */ +/** + * Request of the action to create a signed device capability image. + */ @Fluent public final class GenerateCapabilityImageRequest { /* @@ -18,13 +20,15 @@ public final class GenerateCapabilityImageRequest { @JsonProperty(value = "capabilities", required = true) private List capabilities; - /** Creates an instance of GenerateCapabilityImageRequest class. */ + /** + * Creates an instance of GenerateCapabilityImageRequest class. + */ public GenerateCapabilityImageRequest() { } /** * Get the capabilities property: List of capabilities to create. - * + * * @return the capabilities value. */ public List capabilities() { @@ -33,7 +37,7 @@ public List capabilities() { /** * Set the capabilities property: List of capabilities to create. - * + * * @param capabilities the capabilities value to set. * @return the GenerateCapabilityImageRequest object itself. */ @@ -44,15 +48,13 @@ public GenerateCapabilityImageRequest withCapabilities(List capa /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (capabilities() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property capabilities in model GenerateCapabilityImageRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property capabilities in model GenerateCapabilityImageRequest")); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Image.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Image.java index 03c294f282cfb..c9834ae799a37 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Image.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Image.java @@ -4,126 +4,87 @@ package com.azure.resourcemanager.sphere.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -/** An immutable client-side representation of Image. */ +/** + * An immutable client-side representation of Image. + */ public interface Image { /** * 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 image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image - * URI on image reads. - * - * @return the image value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String image(); + ImageProperties properties(); /** - * Gets the imageId property: Image ID. - * - * @return the imageId value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - String imageId(); - - /** - * Gets the imageName property: Image name. - * - * @return the imageName value. - */ - String imageName(); - - /** - * Gets the regionalDataBoundary property: Regional data boundary for an image. - * - * @return the regionalDataBoundary value. - */ - RegionalDataBoundary regionalDataBoundary(); - - /** - * Gets the uri property: Location the image. - * - * @return the uri value. - */ - String uri(); - - /** - * Gets the description property: The image description. - * - * @return the description value. - */ - String description(); - - /** - * Gets the componentId property: The image component id. - * - * @return the componentId value. - */ - String componentId(); - - /** - * Gets the imageType property: The image type. - * - * @return the imageType value. - */ - ImageType imageType(); - - /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.ImageInner object. - * + * * @return the inner object. */ ImageInner innerModel(); - /** The entirety of the Image definition. */ + /** + * The entirety of the Image definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Image definition stages. */ + /** + * The Image definition stages. + */ interface DefinitionStages { - /** The first stage of the Image definition. */ + /** + * The first stage of the Image definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Image definition allowing to specify parent resource. */ + /** + * The stage of the Image definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, catalogName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @return the next definition stage. @@ -135,101 +96,80 @@ interface WithParentResource { * The stage of the Image 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.WithImage, - DefinitionStages.WithImageId, - DefinitionStages.WithRegionalDataBoundary { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Image create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Image create(Context context); } - /** The stage of the Image definition allowing to specify image. */ - interface WithImage { - /** - * Specifies the image property: Image as a UTF-8 encoded base 64 string on image create. This field - * contains the image URI on image reads.. - * - * @param image Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI - * on image reads. - * @return the next definition stage. - */ - WithCreate withImage(String image); - } - - /** The stage of the Image definition allowing to specify imageId. */ - interface WithImageId { - /** - * Specifies the imageId property: Image ID. - * - * @param imageId Image ID. - * @return the next definition stage. - */ - WithCreate withImageId(String imageId); - } - - /** The stage of the Image definition allowing to specify regionalDataBoundary. */ - interface WithRegionalDataBoundary { + /** + * The stage of the Image definition allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the regionalDataBoundary property: Regional data boundary for an image. - * - * @param regionalDataBoundary Regional data boundary for an image. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary); + WithCreate withProperties(ImageProperties properties); } } /** * Begins update for the Image resource. - * + * * @return the stage of resource update. */ Image.Update update(); - /** The template for Image update. */ + /** + * The template for Image update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ Image apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Image apply(Context context); } - /** The Image update stages. */ + /** + * The Image update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Image refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageListResult.java index a6e018f8b2eec..fb819e0f0b4aa 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Image list operation. */ +/** + * The response of a Image list operation. + */ @Fluent public final class ImageListResult { /* @@ -25,13 +27,15 @@ public final class ImageListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ImageListResult class. */ + /** + * Creates an instance of ImageListResult class. + */ public ImageListResult() { } /** * Get the value property: The Image items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Image items on this page. - * + * * @param value the value value to set. * @return the ImageListResult object itself. */ @@ -51,7 +55,7 @@ public ImageListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the ImageListResult object itself. */ @@ -71,14 +75,13 @@ public ImageListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ImageListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ImageListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageProperties.java similarity index 91% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageProperties.java index 26464c8d0a60a..a2c63b632aa81 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageProperties.java @@ -2,15 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.models.ImageType; -import com.azure.resourcemanager.sphere.models.ProvisioningState; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of image. */ +/** + * The properties of image. + */ @Fluent public final class ImageProperties { /* @@ -67,14 +66,16 @@ public final class ImageProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of ImageProperties class. */ + /** + * Creates an instance of ImageProperties class. + */ public ImageProperties() { } /** * Get the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image * URI on image reads. - * + * * @return the image value. */ public String image() { @@ -84,7 +85,7 @@ public String image() { /** * Set the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image * URI on image reads. - * + * * @param image the image value to set. * @return the ImageProperties object itself. */ @@ -95,7 +96,7 @@ public ImageProperties withImage(String image) { /** * Get the imageId property: Image ID. - * + * * @return the imageId value. */ public String imageId() { @@ -104,7 +105,7 @@ public String imageId() { /** * Set the imageId property: Image ID. - * + * * @param imageId the imageId value to set. * @return the ImageProperties object itself. */ @@ -115,7 +116,7 @@ public ImageProperties withImageId(String imageId) { /** * Get the imageName property: Image name. - * + * * @return the imageName value. */ public String imageName() { @@ -124,7 +125,7 @@ public String imageName() { /** * Get the regionalDataBoundary property: Regional data boundary for an image. - * + * * @return the regionalDataBoundary value. */ public RegionalDataBoundary regionalDataBoundary() { @@ -133,7 +134,7 @@ public RegionalDataBoundary regionalDataBoundary() { /** * Set the regionalDataBoundary property: Regional data boundary for an image. - * + * * @param regionalDataBoundary the regionalDataBoundary value to set. * @return the ImageProperties object itself. */ @@ -144,7 +145,7 @@ public ImageProperties withRegionalDataBoundary(RegionalDataBoundary regionalDat /** * Get the uri property: Location the image. - * + * * @return the uri value. */ public String uri() { @@ -153,7 +154,7 @@ public String uri() { /** * Get the description property: The image description. - * + * * @return the description value. */ public String description() { @@ -162,7 +163,7 @@ public String description() { /** * Get the componentId property: The image component id. - * + * * @return the componentId value. */ public String componentId() { @@ -171,7 +172,7 @@ public String componentId() { /** * Get the imageType property: The image type. - * + * * @return the imageType value. */ public ImageType imageType() { @@ -180,7 +181,7 @@ public ImageType imageType() { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -189,7 +190,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageType.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageType.java index b12f2162886a8..6d4989951a21e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageType.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ImageType.java @@ -8,83 +8,133 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Image type values. */ +/** + * Image type values. + */ public final class ImageType extends ExpandableStringEnum { - /** Static value InvalidImageType for ImageType. */ + /** + * Static value InvalidImageType for ImageType. + */ public static final ImageType INVALID_IMAGE_TYPE = fromString("InvalidImageType"); - /** Static value OneBl for ImageType. */ + /** + * Static value OneBl for ImageType. + */ public static final ImageType ONE_BL = fromString("OneBl"); - /** Static value PlutonRuntime for ImageType. */ + /** + * Static value PlutonRuntime for ImageType. + */ public static final ImageType PLUTON_RUNTIME = fromString("PlutonRuntime"); - /** Static value WifiFirmware for ImageType. */ + /** + * Static value WifiFirmware for ImageType. + */ public static final ImageType WIFI_FIRMWARE = fromString("WifiFirmware"); - /** Static value SecurityMonitor for ImageType. */ + /** + * Static value SecurityMonitor for ImageType. + */ public static final ImageType SECURITY_MONITOR = fromString("SecurityMonitor"); - /** Static value NormalWorldLoader for ImageType. */ + /** + * Static value NormalWorldLoader for ImageType. + */ public static final ImageType NORMAL_WORLD_LOADER = fromString("NormalWorldLoader"); - /** Static value NormalWorldDtb for ImageType. */ + /** + * Static value NormalWorldDtb for ImageType. + */ public static final ImageType NORMAL_WORLD_DTB = fromString("NormalWorldDtb"); - /** Static value NormalWorldKernel for ImageType. */ + /** + * Static value NormalWorldKernel for ImageType. + */ public static final ImageType NORMAL_WORLD_KERNEL = fromString("NormalWorldKernel"); - /** Static value RootFs for ImageType. */ + /** + * Static value RootFs for ImageType. + */ public static final ImageType ROOT_FS = fromString("RootFs"); - /** Static value Services for ImageType. */ + /** + * Static value Services for ImageType. + */ public static final ImageType SERVICES = fromString("Services"); - /** Static value Applications for ImageType. */ + /** + * Static value Applications for ImageType. + */ public static final ImageType APPLICATIONS = fromString("Applications"); - /** Static value FwConfig for ImageType. */ + /** + * Static value FwConfig for ImageType. + */ public static final ImageType FW_CONFIG = fromString("FwConfig"); - /** Static value BootManifest for ImageType. */ + /** + * Static value BootManifest for ImageType. + */ public static final ImageType BOOT_MANIFEST = fromString("BootManifest"); - /** Static value Nwfs for ImageType. */ + /** + * Static value Nwfs for ImageType. + */ public static final ImageType NWFS = fromString("Nwfs"); - /** Static value TrustedKeystore for ImageType. */ + /** + * Static value TrustedKeystore for ImageType. + */ public static final ImageType TRUSTED_KEYSTORE = fromString("TrustedKeystore"); - /** Static value Policy for ImageType. */ + /** + * Static value Policy for ImageType. + */ public static final ImageType POLICY = fromString("Policy"); - /** Static value CustomerBoardConfig for ImageType. */ + /** + * Static value CustomerBoardConfig for ImageType. + */ public static final ImageType CUSTOMER_BOARD_CONFIG = fromString("CustomerBoardConfig"); - /** Static value UpdateCertStore for ImageType. */ + /** + * Static value UpdateCertStore for ImageType. + */ public static final ImageType UPDATE_CERT_STORE = fromString("UpdateCertStore"); - /** Static value BaseSystemUpdateManifest for ImageType. */ + /** + * Static value BaseSystemUpdateManifest for ImageType. + */ public static final ImageType BASE_SYSTEM_UPDATE_MANIFEST = fromString("BaseSystemUpdateManifest"); - /** Static value FirmwareUpdateManifest for ImageType. */ + /** + * Static value FirmwareUpdateManifest for ImageType. + */ public static final ImageType FIRMWARE_UPDATE_MANIFEST = fromString("FirmwareUpdateManifest"); - /** Static value CustomerUpdateManifest for ImageType. */ + /** + * Static value CustomerUpdateManifest for ImageType. + */ public static final ImageType CUSTOMER_UPDATE_MANIFEST = fromString("CustomerUpdateManifest"); - /** Static value RecoveryManifest for ImageType. */ + /** + * Static value RecoveryManifest for ImageType. + */ public static final ImageType RECOVERY_MANIFEST = fromString("RecoveryManifest"); - /** Static value ManifestSet for ImageType. */ + /** + * Static value ManifestSet for ImageType. + */ public static final ImageType MANIFEST_SET = fromString("ManifestSet"); - /** Static value Other for ImageType. */ + /** + * Static value Other for ImageType. + */ public static final ImageType OTHER = fromString("Other"); /** * Creates a new instance of ImageType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -93,7 +143,7 @@ public ImageType() { /** * Creates or finds a ImageType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ImageType. */ @@ -104,7 +154,7 @@ public static ImageType fromString(String name) { /** * Gets known ImageType values. - * + * * @return known ImageType values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Images.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Images.java index 482e9daa70998..166160ac99b77 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Images.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Images.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Images. */ +/** + * Resource collection API of Images. + */ public interface Images { /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Images { /** * List Image resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param filter Filter the result list using the given expression. @@ -37,18 +39,12 @@ public interface Images { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a Image list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByCatalog( - String resourceGroupName, - String catalogName, - String filter, - Integer top, - Integer skip, - Integer maxpagesize, - Context context); + PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter, Integer top, + Integer skip, Integer maxpagesize, Context context); /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -62,7 +58,7 @@ PagedIterable listByCatalog( /** * Get a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -75,7 +71,7 @@ PagedIterable listByCatalog( /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -87,7 +83,7 @@ PagedIterable listByCatalog( /** * Delete a Image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param imageName Image name. Use .default for image creation. @@ -100,7 +96,7 @@ PagedIterable listByCatalog( /** * Get a Image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,7 +107,7 @@ PagedIterable listByCatalog( /** * Get a Image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,7 +119,7 @@ PagedIterable listByCatalog( /** * Delete a Image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,7 +129,7 @@ PagedIterable listByCatalog( /** * Delete a Image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,7 +140,7 @@ PagedIterable listByCatalog( /** * Begins definition for a new Image resource. - * + * * @param name resource name. * @return the first stage of the new Image definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ListDeviceGroupsRequest.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ListDeviceGroupsRequest.java index aeac84fe7a660..577a0d17c6feb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ListDeviceGroupsRequest.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ListDeviceGroupsRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Request of the action to list device groups for a catalog. */ +/** + * Request of the action to list device groups for a catalog. + */ @Fluent public final class ListDeviceGroupsRequest { /* @@ -16,13 +18,15 @@ public final class ListDeviceGroupsRequest { @JsonProperty(value = "deviceGroupName") private String deviceGroupName; - /** Creates an instance of ListDeviceGroupsRequest class. */ + /** + * Creates an instance of ListDeviceGroupsRequest class. + */ public ListDeviceGroupsRequest() { } /** * Get the deviceGroupName property: Device Group name. - * + * * @return the deviceGroupName value. */ public String deviceGroupName() { @@ -31,7 +35,7 @@ public String deviceGroupName() { /** * Set the deviceGroupName property: Device Group name. - * + * * @param deviceGroupName the deviceGroupName value to set. * @return the ListDeviceGroupsRequest object itself. */ @@ -42,7 +46,7 @@ public ListDeviceGroupsRequest withDeviceGroupName(String deviceGroupName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OSFeedType.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OSFeedType.java index b22ba3545e505..df86906705bf7 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OSFeedType.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OSFeedType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** OS feed type values. */ +/** + * OS feed type values. + */ public final class OSFeedType extends ExpandableStringEnum { - /** Static value Retail for OSFeedType. */ + /** + * Static value Retail for OSFeedType. + */ public static final OSFeedType RETAIL = fromString("Retail"); - /** Static value RetailEval for OSFeedType. */ + /** + * Static value RetailEval for OSFeedType. + */ public static final OSFeedType RETAIL_EVAL = fromString("RetailEval"); /** * Creates a new instance of OSFeedType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OSFeedType() { /** * Creates or finds a OSFeedType from its string representation. - * + * * @param name a name to look for. * @return the corresponding OSFeedType. */ @@ -38,7 +44,7 @@ public static OSFeedType fromString(String name) { /** * Gets known OSFeedType values. - * + * * @return known OSFeedType values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operation.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operation.java index 7fd48e4bde394..f39a2845910dc 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operation.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.sphere.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationDisplay.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationDisplay.java index 562d7f5f396c8..176049cf9e0d7 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationDisplay.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* @@ -37,14 +39,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationListResult.java index e9291b9358f4f..01821c5564be6 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operations.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operations.java index 53ce30f3ca799..fad6812e8ca83 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operations.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * List the operations for the provider. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Origin.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Origin.java index a5871fb788c75..7b023584191ff 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Origin.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/PagedDeviceInsight.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/PagedDeviceInsight.java index 36810c2a7ab54..35d795d7dd58b 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/PagedDeviceInsight.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/PagedDeviceInsight.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Paged collection of DeviceInsight items. */ +/** + * Paged collection of DeviceInsight items. + */ @Fluent public final class PagedDeviceInsight { /* @@ -25,13 +27,15 @@ public final class PagedDeviceInsight { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of PagedDeviceInsight class. */ + /** + * Creates an instance of PagedDeviceInsight class. + */ public PagedDeviceInsight() { } /** * Get the value property: The DeviceInsight items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The DeviceInsight items on this page. - * + * * @param value the value value to set. * @return the PagedDeviceInsight object itself. */ @@ -51,7 +55,7 @@ public PagedDeviceInsight withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the PagedDeviceInsight object itself. */ @@ -71,14 +75,13 @@ public PagedDeviceInsight withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model PagedDeviceInsight")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PagedDeviceInsight")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Product.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Product.java index d88525e092fc0..81e7b17df00f5 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Product.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Product.java @@ -6,76 +6,87 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.sphere.fluent.models.ProductInner; -/** An immutable client-side representation of Product. */ +/** + * An immutable client-side representation of Product. + */ public interface Product { /** * 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 description property: Description of the product. - * - * @return the description value. + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. */ - String description(); + ProductProperties properties(); /** - * Gets the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.ProductInner object. - * + * * @return the inner object. */ ProductInner innerModel(); - /** The entirety of the Product definition. */ + /** + * The entirety of the Product definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Product definition stages. */ + /** + * The Product definition stages. + */ interface DefinitionStages { - /** The first stage of the Product definition. */ + /** + * The first stage of the Product definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Product definition allowing to specify parent resource. */ + /** + * The stage of the Product definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, catalogName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @return the next definition stage. @@ -87,84 +98,92 @@ interface WithParentResource { * The stage of the Product 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.WithDescription { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Product create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Product create(Context context); } - /** The stage of the Product definition allowing to specify description. */ - interface WithDescription { + /** + * The stage of the Product definition allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the description property: Description of the product. - * - * @param description Description of the product. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withDescription(String description); + WithCreate withProperties(ProductProperties properties); } } /** * Begins update for the Product resource. - * + * * @return the stage of resource update. */ Product.Update update(); - /** The template for Product update. */ - interface Update extends UpdateStages.WithDescription { + /** + * The template for Product update. + */ + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ Product apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Product apply(Context context); } - /** The Product update stages. */ + /** + * The Product update stages. + */ interface UpdateStages { - /** The stage of the Product update allowing to specify description. */ - interface WithDescription { + /** + * The stage of the Product update allowing to specify properties. + */ + interface WithProperties { /** - * Specifies the description property: Description of the product. - * - * @param description Description of the product. + * Specifies the properties property: The updatable properties of the Product.. + * + * @param properties The updatable properties of the Product. * @return the next definition stage. */ - Update withDescription(String description); + Update withProperties(ProductUpdateProperties properties); } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Product refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -173,7 +192,7 @@ interface WithDescription { /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -185,7 +204,7 @@ interface WithDescription { /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @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 response to the action call for count devices in a catalog. @@ -195,7 +214,7 @@ interface WithDescription { /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @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 response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. @@ -205,7 +224,7 @@ interface WithDescription { /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductListResult.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductListResult.java index 37e441bd57a68..d96b8a2f73751 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductListResult.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Product list operation. */ +/** + * The response of a Product list operation. + */ @Fluent public final class ProductListResult { /* @@ -25,13 +27,15 @@ public final class ProductListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ProductListResult class. */ + /** + * Creates an instance of ProductListResult class. + */ public ProductListResult() { } /** * Get the value property: The Product items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Product items on this page. - * + * * @param value the value value to set. * @return the ProductListResult object itself. */ @@ -51,7 +55,7 @@ public ProductListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the ProductListResult object itself. */ @@ -71,14 +75,13 @@ public ProductListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ProductListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ProductListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductProperties.java similarity index 80% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductProperties.java index c9e8cd2176f70..9e550a86dc46c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductProperties.java @@ -2,14 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.sphere.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of product. */ +/** + * The properties of product. + */ @Fluent public final class ProductProperties { /* @@ -24,13 +25,15 @@ public final class ProductProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of ProductProperties class. */ + /** + * Creates an instance of ProductProperties class. + */ public ProductProperties() { } /** * Get the description property: Description of the product. - * + * * @return the description value. */ public String description() { @@ -39,7 +42,7 @@ public String description() { /** * Set the description property: Description of the product. - * + * * @param description the description value to set. * @return the ProductProperties object itself. */ @@ -50,7 +53,7 @@ public ProductProperties withDescription(String description) { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -59,14 +62,13 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (description() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property description in model ProductProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property description in model ProductProperties")); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdate.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdate.java index 728b43305eb4a..344d810850829 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdate.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdate.java @@ -5,62 +5,53 @@ package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.sphere.fluent.models.ProductUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The type used for update operations of the Product. */ +/** + * The type used for update operations of the Product. + */ @Fluent public final class ProductUpdate { /* * The updatable properties of the Product. */ @JsonProperty(value = "properties") - private ProductUpdateProperties innerProperties; - - /** Creates an instance of ProductUpdate class. */ - public ProductUpdate() { - } + private ProductUpdateProperties properties; /** - * Get the innerProperties property: The updatable properties of the Product. - * - * @return the innerProperties value. + * Creates an instance of ProductUpdate class. */ - private ProductUpdateProperties innerProperties() { - return this.innerProperties; + public ProductUpdate() { } /** - * Get the description property: Description of the product. - * - * @return the description value. + * Get the properties property: The updatable properties of the Product. + * + * @return the properties value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public ProductUpdateProperties properties() { + return this.properties; } /** - * Set the description property: Description of the product. - * - * @param description the description value to set. + * Set the properties property: The updatable properties of the Product. + * + * @param properties the properties value to set. * @return the ProductUpdate object itself. */ - public ProductUpdate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ProductUpdateProperties(); - } - this.innerProperties().withDescription(description); + public ProductUpdate withProperties(ProductUpdateProperties properties) { + this.properties = properties; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java similarity index 85% rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java index 77e75f019861f..fd4cc19da2ffe 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java @@ -2,12 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sphere.fluent.models; +package com.azure.resourcemanager.sphere.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The updatable properties of the Product. */ +/** + * The updatable properties of the Product. + */ @Fluent public final class ProductUpdateProperties { /* @@ -16,13 +18,15 @@ public final class ProductUpdateProperties { @JsonProperty(value = "description") private String description; - /** Creates an instance of ProductUpdateProperties class. */ + /** + * Creates an instance of ProductUpdateProperties class. + */ public ProductUpdateProperties() { } /** * Get the description property: Description of the product. - * + * * @return the description value. */ public String description() { @@ -31,7 +35,7 @@ public String description() { /** * Set the description property: Description of the product. - * + * * @param description the description value to set. * @return the ProductUpdateProperties object itself. */ @@ -42,7 +46,7 @@ public ProductUpdateProperties withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Products.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Products.java index 2d19d86941ed4..83fd996e11f99 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Products.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/Products.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Products. */ +/** + * Resource collection API of Products. + */ public interface Products { /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Products { /** * List Product resources by Catalog. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface Products { /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -47,12 +49,12 @@ public interface Products { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Product along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String catalogName, String productName, Context context); + Response getWithResponse(String resourceGroupName, String catalogName, String productName, + Context context); /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -91,7 +93,7 @@ Response getWithResponse( /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -101,13 +103,13 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response to the action call for count devices in a catalog along with {@link Response}. */ - Response countDevicesWithResponse( - String resourceGroupName, String catalogName, String productName, Context context); + Response countDevicesWithResponse(String resourceGroupName, String catalogName, + String productName, Context context); /** * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product * name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -121,7 +123,7 @@ Response countDevicesWithResponse( /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -130,13 +132,13 @@ Response countDevicesWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName); + PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName); /** * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and * cannot be used for product name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param catalogName Name of catalog. * @param productName Name of product. @@ -146,12 +148,12 @@ PagedIterable generateDefaultDeviceGroups( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable generateDefaultDeviceGroups( - String resourceGroupName, String catalogName, String productName, Context context); + PagedIterable generateDefaultDeviceGroups(String resourceGroupName, String catalogName, + String productName, Context context); /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,7 +164,7 @@ PagedIterable generateDefaultDeviceGroups( /** * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +176,7 @@ PagedIterable generateDefaultDeviceGroups( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,7 +186,7 @@ PagedIterable generateDefaultDeviceGroups( /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,7 +197,7 @@ PagedIterable generateDefaultDeviceGroups( /** * Begins definition for a new Product resource. - * + * * @param name resource name. * @return the first stage of the new Product definition. */ diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceRequest.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceRequest.java index 259f942574dae..04c79b6216470 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceRequest.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceRequest.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Request for the proof of possession nonce. */ +/** + * Request for the proof of possession nonce. + */ @Fluent public final class ProofOfPossessionNonceRequest { /* @@ -17,13 +19,15 @@ public final class ProofOfPossessionNonceRequest { @JsonProperty(value = "proofOfPossessionNonce", required = true) private String proofOfPossessionNonce; - /** Creates an instance of ProofOfPossessionNonceRequest class. */ + /** + * Creates an instance of ProofOfPossessionNonceRequest class. + */ public ProofOfPossessionNonceRequest() { } /** * Get the proofOfPossessionNonce property: The proof of possession nonce. - * + * * @return the proofOfPossessionNonce value. */ public String proofOfPossessionNonce() { @@ -32,7 +36,7 @@ public String proofOfPossessionNonce() { /** * Set the proofOfPossessionNonce property: The proof of possession nonce. - * + * * @param proofOfPossessionNonce the proofOfPossessionNonce value to set. * @return the ProofOfPossessionNonceRequest object itself. */ @@ -43,15 +47,13 @@ public ProofOfPossessionNonceRequest withProofOfPossessionNonce(String proofOfPo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (proofOfPossessionNonce() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property proofOfPossessionNonce in model ProofOfPossessionNonceRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property proofOfPossessionNonce in model ProofOfPossessionNonceRequest")); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceResponse.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceResponse.java index 74245243ac808..3bcdf8d2100d1 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceResponse.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProofOfPossessionNonceResponse.java @@ -7,60 +7,62 @@ import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of ProofOfPossessionNonceResponse. */ +/** + * An immutable client-side representation of ProofOfPossessionNonceResponse. + */ public interface ProofOfPossessionNonceResponse { /** * Gets the certificate property: The certificate as a UTF-8 encoded base 64 string. - * + * * @return the certificate value. */ String certificate(); /** * Gets the status property: The certificate status. - * + * * @return the status value. */ CertificateStatus status(); /** * Gets the subject property: The certificate subject. - * + * * @return the subject value. */ String subject(); /** * Gets the thumbprint property: The certificate thumbprint. - * + * * @return the thumbprint value. */ String thumbprint(); /** * Gets the expiryUtc property: The certificate expiry date. - * + * * @return the expiryUtc value. */ OffsetDateTime expiryUtc(); /** * Gets the notBeforeUtc property: The certificate not before date. - * + * * @return the notBeforeUtc value. */ OffsetDateTime notBeforeUtc(); /** * Gets the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner object. - * + * * @return the inner object. */ ProofOfPossessionNonceResponseInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProvisioningState.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProvisioningState.java index 2b6e552a5b3e4..b5e4ed19ebb2d 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProvisioningState.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProvisioningState.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the resource. */ +/** + * Provisioning state of the resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Provisioning for ProvisioningState. */ + /** + * Static value Provisioning for ProvisioningState. + */ public static final ProvisioningState PROVISIONING = fromString("Provisioning"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Accepted for ProvisioningState. */ + /** + * Static value Accepted for ProvisioningState. + */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -53,7 +69,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/RegionalDataBoundary.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/RegionalDataBoundary.java index 37ff9a000820c..d91169299d5fc 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/RegionalDataBoundary.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/RegionalDataBoundary.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Regional data boundary values. */ +/** + * Regional data boundary values. + */ public final class RegionalDataBoundary extends ExpandableStringEnum { - /** Static value None for RegionalDataBoundary. */ + /** + * Static value None for RegionalDataBoundary. + */ public static final RegionalDataBoundary NONE = fromString("None"); - /** Static value EU for RegionalDataBoundary. */ + /** + * Static value EU for RegionalDataBoundary. + */ public static final RegionalDataBoundary EU = fromString("EU"); /** * Creates a new instance of RegionalDataBoundary value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public RegionalDataBoundary() { /** * Creates or finds a RegionalDataBoundary from its string representation. - * + * * @param name a name to look for. * @return the corresponding RegionalDataBoundary. */ @@ -38,7 +44,7 @@ public static RegionalDataBoundary fromString(String name) { /** * Gets known RegionalDataBoundary values. - * + * * @return known RegionalDataBoundary values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/SignedCapabilityImageResponse.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/SignedCapabilityImageResponse.java index 3e93a7ae3156b..d2477da612aeb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/SignedCapabilityImageResponse.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/SignedCapabilityImageResponse.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.sphere.fluent.models.SignedCapabilityImageResponseInner; -/** An immutable client-side representation of SignedCapabilityImageResponse. */ +/** + * An immutable client-side representation of SignedCapabilityImageResponse. + */ public interface SignedCapabilityImageResponse { /** * Gets the image property: The signed device capability image as a UTF-8 encoded base 64 string. - * + * * @return the image value. */ String image(); /** * Gets the inner com.azure.resourcemanager.sphere.fluent.models.SignedCapabilityImageResponseInner object. - * + * * @return the inner object. */ SignedCapabilityImageResponseInner innerModel(); diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/UpdatePolicy.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/UpdatePolicy.java index 3153c79aed9a0..dfcee7e165628 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/UpdatePolicy.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/UpdatePolicy.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Update policy values. */ +/** + * Update policy values. + */ public final class UpdatePolicy extends ExpandableStringEnum { - /** Static value UpdateAll for UpdatePolicy. */ + /** + * Static value UpdateAll for UpdatePolicy. + */ public static final UpdatePolicy UPDATE_ALL = fromString("UpdateAll"); - /** Static value No3rdPartyAppUpdates for UpdatePolicy. */ + /** + * Static value No3rdPartyAppUpdates for UpdatePolicy. + */ public static final UpdatePolicy NO3RD_PARTY_APP_UPDATES = fromString("No3rdPartyAppUpdates"); /** * Creates a new instance of UpdatePolicy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public UpdatePolicy() { /** * Creates or finds a UpdatePolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpdatePolicy. */ @@ -38,7 +44,7 @@ public static UpdatePolicy fromString(String name) { /** * Gets known UpdatePolicy values. - * + * * @return known UpdatePolicy values. */ public static Collection values() { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/package-info.java index 1434cd8dbacf7..376594e72664e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/package-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureSphereManagementClient. Azure Sphere resource management API. */ +/** + * Package containing the data models for AzureSphereManagementClient. + * Azure Sphere resource management API. + */ package com.azure.resourcemanager.sphere.models; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/package-info.java index 0b51b3be880aa..0c1568a7d252e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/package-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for AzureSphereManagementClient. Azure Sphere resource management API. */ +/** + * Package containing the classes for AzureSphereManagementClient. + * Azure Sphere resource management API. + */ package com.azure.resourcemanager.sphere; diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/module-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/module-info.java index bd2ed817d1ea2..43174b86146e3 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/module-info.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.sphere.fluent.models; exports com.azure.resourcemanager.sphere.models; - opens com.azure.resourcemanager.sphere.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.sphere.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.sphere.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.sphere.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/proxy-config.json b/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/proxy-config.json new file mode 100644 index 0000000000000..059551aba04b7 --- /dev/null +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.sphere.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.sphere.implementation.CatalogsClientImpl$CatalogsService" ], [ "com.azure.resourcemanager.sphere.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.sphere.implementation.ImagesClientImpl$ImagesService" ], [ "com.azure.resourcemanager.sphere.implementation.ProductsClientImpl$ProductsService" ], [ "com.azure.resourcemanager.sphere.implementation.DeviceGroupsClientImpl$DeviceGroupsService" ], [ "com.azure.resourcemanager.sphere.implementation.DeploymentsClientImpl$DeploymentsService" ], [ "com.azure.resourcemanager.sphere.implementation.DevicesClientImpl$DevicesService" ] ] \ No newline at end of file diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/reflect-config.json b/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/reflect-config.json new file mode 100644 index 0000000000000..4ad6cb99f8239 --- /dev/null +++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sphere/reflect-config.json @@ -0,0 +1,261 @@ +[ { + "name" : "com.azure.resourcemanager.sphere.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CatalogListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.CatalogInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CatalogProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CatalogUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CertificateListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.CertificateInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CertificateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CountElementsResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ImageListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.ImageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ImageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeploymentListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.DeploymentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeploymentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceGroupListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.PagedDeviceInsight", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.DeviceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProductListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.ProductInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProductProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProductUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProductUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceGroupUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceGroupUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ClaimDevicesRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.DeviceUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.fluent.models.SignedCapabilityImageResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CertificateStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.RegionalDataBoundary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.ImageType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.OSFeedType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.UpdatePolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.sphere.models.CapabilityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesSamples.java index a953f4a717844..a09fb978b1691 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs CountDevices. */ +/** + * Samples for Catalogs CountDevices. + */ public final class CatalogsCountDevicesSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostCountDevicesCatalog.json */ /** * Sample code: Catalogs_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateSamples.java index 66a5ddf183d95..2e689b0899052 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs CreateOrUpdate. */ +/** + * Samples for Catalogs CreateOrUpdate. + */ public final class CatalogsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutCatalog.json */ /** * Sample code: Catalogs_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .define("MyCatalog1") - .withRegion("global") - .withExistingResourceGroup("MyResourceGroup1") + manager.catalogs().define("MyCatalog1").withRegion("global").withExistingResourceGroup("MyResourceGroup1") .create(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteSamples.java index 4fbc13d2ade57..ea3d36b871d1f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs Delete. */ +/** + * Samples for Catalogs Delete. + */ public final class CatalogsDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteCatalog. + * json */ /** * Sample code: Catalogs_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupSamples.java index 009565ecd4de5..fe63436825625 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs GetByResourceGroup. */ +/** + * Samples for Catalogs GetByResourceGroup. + */ public final class CatalogsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalog.json */ /** * Sample code: Catalogs_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE); + manager.catalogs().getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupSamples.java index 9a546c715b609..c48fe278588a9 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs ListByResourceGroup. */ +/** + * Samples for Catalogs ListByResourceGroup. + */ public final class CatalogsListByResourceGroupSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsRG.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsRG. + * json */ /** * Sample code: Catalogs_ListByResourceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListByResourceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsSamples.java index bffa0c8b515d4..c3d08a6fe02db 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs ListDeployments. */ +/** + * Samples for Catalogs ListDeployments. + */ public final class CatalogsListDeploymentsSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeploymentsByCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostListDeploymentsByCatalog.json */ /** * Sample code: Catalogs_ListDeployments. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeployments(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeployments( - "MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDeployments("MyResourceGroup1", "MyCatalog1", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsSamples.java index 3876b11b2765c..f23ed9424398c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsSamples.java @@ -6,27 +6,23 @@ import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -/** Samples for Catalogs ListDeviceGroups. */ +/** + * Samples for Catalogs ListDeviceGroups. + */ public final class CatalogsListDeviceGroupsSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceGroupsCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostListDeviceGroupsCatalog.json */ /** * Sample code: Catalogs_ListDeviceGroups. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeviceGroups( - "MyResourceGroup1", - "MyCatalog1", - new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"), - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.catalogs().listDeviceGroups("MyResourceGroup1", "MyCatalog1", + new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"), null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsSamples.java index 79f061be11916..db53c4ee8f03e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs ListDeviceInsights. */ +/** + * Samples for Catalogs ListDeviceInsights. + */ public final class CatalogsListDeviceInsightsSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceInsightsCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostListDeviceInsightsCatalog.json */ /** * Sample code: Catalogs_ListDeviceInsights. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDeviceInsights(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDeviceInsights( - "MyResourceGroup1", "MyCatalog1", null, 10, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDeviceInsights("MyResourceGroup1", "MyCatalog1", null, 10, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesSamples.java index efacfe7b38595..97b9f8dc36a17 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs ListDevices. */ +/** + * Samples for Catalogs ListDevices. + */ public final class CatalogsListDevicesSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDevicesByCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostListDevicesByCatalog.json */ /** * Sample code: Catalogs_ListDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .catalogs() - .listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.catalogs().listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListSamples.java index cbca8f065c0ea..6894d9043f225 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Catalogs List. */ +/** + * Samples for Catalogs List. + */ public final class CatalogsListSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsSub.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsSub. + * json */ /** * Sample code: Catalogs_ListBySubscription. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsListBySubscription(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsUpdateSamples.java index b403f511181dc..61e8ba8349192 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CatalogsUpdateSamples.java @@ -6,22 +6,23 @@ import com.azure.resourcemanager.sphere.models.Catalog; -/** Samples for Catalogs Update. */ +/** + * Samples for Catalogs Update. + */ public final class CatalogsUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchCatalog.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchCatalog.json */ /** * Sample code: Catalogs_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void catalogsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Catalog resource = - manager - .catalogs() - .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE) - .getValue(); + Catalog resource = manager.catalogs() + .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesGetSamples.java index dd297530c5ce1..d6bbceb1d40af 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesGetSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Certificates Get. */ +/** + * Samples for Certificates Get. + */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificate.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificate. + * json */ /** * Sample code: Certificates_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "default", com.azure.core.util.Context.NONE); + manager.certificates().getWithResponse("MyResourceGroup1", "MyCatalog1", "default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogSamples.java index 5e3fb21f0a195..f78d3264e0810 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Certificates ListByCatalog. */ +/** + * Samples for Certificates ListByCatalog. + */ public final class CertificatesListByCatalogSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificates.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificates. + * json */ /** * Sample code: Certificates_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.certificates().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainSamples.java index a93dae6623043..7189a1481dc7c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Certificates RetrieveCertChain. */ +/** + * Samples for Certificates RetrieveCertChain. + */ public final class CertificatesRetrieveCertChainSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveCatalogCertChain.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostRetrieveCatalogCertChain.json */ /** * Sample code: Certificates_RetrieveCertChain. - * + * * @param manager Entry point to AzureSphereManager. */ public static void certificatesRetrieveCertChain(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .retrieveCertChainWithResponse( - "MyResourceGroup1", "MyCatalog1", "active", com.azure.core.util.Context.NONE); + manager.certificates().retrieveCertChainWithResponse("MyResourceGroup1", "MyCatalog1", "active", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceSamples.java index e0d1984755302..607be7726c0b6 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceSamples.java @@ -6,25 +6,24 @@ import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; -/** Samples for Certificates RetrieveProofOfPossessionNonce. */ +/** + * Samples for Certificates RetrieveProofOfPossessionNonce. + */ public final class CertificatesRetrieveProofOfPossessionNonceSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveProofOfPossessionNonce.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostRetrieveProofOfPossessionNonce.json */ /** * Sample code: Certificates_RetrieveProofOfPossessionNonce. - * + * * @param manager Entry point to AzureSphereManager. */ - public static void certificatesRetrieveProofOfPossessionNonce( - com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .certificates() - .retrieveProofOfPossessionNonceWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "active", - new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"), - com.azure.core.util.Context.NONE); + public static void + certificatesRetrieveProofOfPossessionNonce(com.azure.resourcemanager.sphere.AzureSphereManager manager) { + manager.certificates().retrieveProofOfPossessionNonceWithResponse("MyResourceGroup1", "MyCatalog1", "active", + new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateSamples.java index f7c1b3f6f9ba2..31925cc643479 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Deployments CreateOrUpdate. */ +/** + * Samples for Deployments CreateOrUpdate. + */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeployment.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeployment. + * json */ /** * Sample code: Deployments_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .define("MyDeployment1") - .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1") - .create(); + manager.deployments().define("MyDeployment1") + .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteSamples.java index 76bccb55eba05..c0ccf350f41f3 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteSamples.java @@ -4,25 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Deployments Delete. */ +/** + * Samples for Deployments Delete. + */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeployment.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeployment. + * json */ /** * Sample code: Deployments_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .delete( - "MyResourceGroup1", - "MyCatalog1", - "MyProductName1", - "DeviceGroupName1", - "MyDeploymentName1", - com.azure.core.util.Context.NONE); + manager.deployments().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", + "MyDeploymentName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetSamples.java index 275984e3dc927..a19a8885a7d3f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetSamples.java @@ -4,25 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Deployments Get. */ +/** + * Samples for Deployments Get. + */ public final class DeploymentsGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployment.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployment. + * json */ /** * Sample code: Deployments_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "MyDeployment1", - com.azure.core.util.Context.NONE); + manager.deployments().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", + "MyDeployment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupSamples.java index 609509e0cbb9b..ebcb50859e341 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupSamples.java @@ -4,28 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Deployments ListByDeviceGroup. */ +/** + * Samples for Deployments ListByDeviceGroup. + */ public final class DeploymentsListByDeviceGroupSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployments.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployments. + * json */ /** * Sample code: Deployments_ListByDeviceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deploymentsListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deployments() - .listByDeviceGroup( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.deployments().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", null, + null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsClaimDevicesSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsClaimDevicesSamples.java index 75face00b784e..0b68eb18a2467 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsClaimDevicesSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsClaimDevicesSamples.java @@ -7,29 +7,24 @@ import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest; import java.util.Arrays; -/** Samples for DeviceGroups ClaimDevices. */ +/** + * Samples for DeviceGroups ClaimDevices. + */ public final class DeviceGroupsClaimDevicesSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostClaimDevices.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostClaimDevices. + * json */ /** * Sample code: DeviceGroups_ClaimDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsClaimDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .claimDevices( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "MyDeviceGroup1", - new ClaimDevicesRequest() - .withDeviceIdentifiers( - Arrays - .asList( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")), - com.azure.core.util.Context.NONE); + manager.deviceGroups().claimDevices("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", + new ClaimDevicesRequest().withDeviceIdentifiers(Arrays.asList( + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesSamples.java index b8f9b52c5f86a..57666199bb5e8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for DeviceGroups CountDevices. */ +/** + * Samples for DeviceGroups CountDevices. + */ public final class DeviceGroupsCountDevicesSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesDeviceGroup.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostCountDevicesDeviceGroup.json */ /** * Sample code: DeviceGroups_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .countDevicesWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", + "MyDeviceGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateSamples.java index 7d080fbac1ffe..2c037f3aaae09 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateSamples.java @@ -4,27 +4,29 @@ package com.azure.resourcemanager.sphere.generated; +import com.azure.resourcemanager.sphere.models.DeviceGroupProperties; import com.azure.resourcemanager.sphere.models.OSFeedType; import com.azure.resourcemanager.sphere.models.UpdatePolicy; -/** Samples for DeviceGroups CreateOrUpdate. */ +/** + * Samples for DeviceGroups CreateOrUpdate. + */ public final class DeviceGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeviceGroup.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeviceGroup. + * json */ /** * Sample code: DeviceGroups_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .define("MyDeviceGroup1") + manager.deviceGroups().define("MyDeviceGroup1") .withExistingProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1") - .withDescription("Description for MyDeviceGroup1") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.UPDATE_ALL) + .withProperties(new DeviceGroupProperties().withDescription("Description for MyDeviceGroup1") + .withOsFeedType(OSFeedType.RETAIL).withUpdatePolicy(UpdatePolicy.UPDATE_ALL)) .create(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteSamples.java index 8bca32f3dd902..a2666f14e7b92 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for DeviceGroups Delete. */ +/** + * Samples for DeviceGroups Delete. + */ public final class DeviceGroupsDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeviceGroup.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeviceGroup + * .json */ /** * Sample code: DeviceGroups_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetSamples.java index f670f901cc1a4..5aa635d4e0d70 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for DeviceGroups Get. */ +/** + * Samples for DeviceGroups Get. + */ public final class DeviceGroupsGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroup.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroup. + * json */ /** * Sample code: DeviceGroups_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .getWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE); + manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductSamples.java index 58f6957cba471..ee937fe83691f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductSamples.java @@ -4,27 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for DeviceGroups ListByProduct. */ +/** + * Samples for DeviceGroups ListByProduct. + */ public final class DeviceGroupsListByProductSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroups.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroups. + * json */ /** * Sample code: DeviceGroups_ListByProduct. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsListByProduct(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .deviceGroups() - .listByProduct( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - null, - null, - null, - null, - com.azure.core.util.Context.NONE); + manager.deviceGroups().listByProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsUpdateSamples.java index de3020b0344c9..518a767c392d9 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsUpdateSamples.java @@ -6,23 +6,23 @@ import com.azure.resourcemanager.sphere.models.DeviceGroup; -/** Samples for DeviceGroups Update. */ +/** + * Samples for DeviceGroups Update. + */ public final class DeviceGroupsUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDeviceGroup.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDeviceGroup. + * json */ /** * Sample code: DeviceGroups_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void deviceGroupsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - DeviceGroup resource = - manager - .deviceGroups() - .getWithResponse( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE) - .getValue(); + DeviceGroup resource = manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", + "MyDeviceGroup1", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateSamples.java index fa3f3e079bf00..31f0c9e189e12 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateSamples.java @@ -4,22 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Devices CreateOrUpdate. */ +/** + * Samples for Devices CreateOrUpdate. + */ public final class DevicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDevice.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDevice.json */ /** * Sample code: Devices_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .define( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") - .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1") - .create(); + manager.devices().define( + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteSamples.java index 07cb659d05313..d2b4e2521ab54 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteSamples.java @@ -4,25 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Devices Delete. */ +/** + * Samples for Devices Delete. + */ public final class DevicesDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDevice.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDevice.json */ /** * Sample code: Devices_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .delete( - "MyResourceGroup1", - "MyCatalog1", - "MyProductName1", - "DeviceGroupName1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE); + manager.devices().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageSamples.java index f1cd433d951b2..3f3fd9a16060a 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageSamples.java @@ -8,27 +8,25 @@ import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; import java.util.Arrays; -/** Samples for Devices GenerateCapabilityImage. */ +/** + * Samples for Devices GenerateCapabilityImage. + */ public final class DevicesGenerateCapabilityImageSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDeviceCapabilityImage.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostGenerateDeviceCapabilityImage.json */ /** * Sample code: Devices_GenerateCapabilityImage. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesGenerateCapabilityImage(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .generateCapabilityImage( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - new GenerateCapabilityImageRequest() - .withCapabilities(Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)), - com.azure.core.util.Context.NONE); + manager.devices().generateCapabilityImage("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + new GenerateCapabilityImageRequest().withCapabilities( + Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGetSamples.java index 6e13f61296581..3a66ea3a5297f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesGetSamples.java @@ -4,25 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Devices Get. */ +/** + * Samples for Devices Get. + */ public final class DevicesGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevice.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevice.json */ /** * Sample code: Devices_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "myDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE); + manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupSamples.java index 0ebc32822d157..5ce0274e057c8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Devices ListByDeviceGroup. */ +/** + * Samples for Devices ListByDeviceGroup. + */ public final class DevicesListByDeviceGroupSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevices.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevices.json */ /** * Sample code: Devices_ListByDeviceGroup. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .devices() - .listByDeviceGroup( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", com.azure.core.util.Context.NONE); + manager.devices().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesUpdateSamples.java index fac4d4f386721..d0072dad168c4 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/DevicesUpdateSamples.java @@ -6,28 +6,24 @@ import com.azure.resourcemanager.sphere.models.Device; -/** Samples for Devices Update. */ +/** + * Samples for Devices Update. + */ public final class DevicesUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDevice.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDevice.json */ /** * Sample code: Devices_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void devicesUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Device resource = - manager - .devices() - .getWithResponse( - "MyResourceGroup1", - "MyCatalog1", - "MyProduct1", - "MyDeviceGroup1", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - com.azure.core.util.Context.NONE) - .getValue(); + Device resource = manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", + "MyDeviceGroup1", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateSamples.java index 439986767c4d7..02041527512ea 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateSamples.java @@ -4,22 +4,23 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Images CreateOrUpdate. */ +import com.azure.resourcemanager.sphere.models.ImageProperties; + +/** + * Samples for Images CreateOrUpdate. + */ public final class ImagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutImage.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutImage.json */ /** * Sample code: Image_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imageCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .define("default") - .withExistingCatalog("MyResourceGroup1", "MyCatalog1") - .withImage("bXliYXNlNjRzdHJpbmc=") - .create(); + manager.images().define("default").withExistingCatalog("MyResourceGroup1", "MyCatalog1") + .withProperties(new ImageProperties().withImage("bXliYXNlNjRzdHJpbmc=")).create(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteSamples.java index 2b145b19ae591..4f942090a0496 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Images Delete. */ +/** + * Samples for Images Delete. + */ public final class ImagesDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteImage.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteImage.json */ /** * Sample code: Images_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesGetSamples.java index 6834a1b62380c..655e2f0e9810f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Images Get. */ +/** + * Samples for Images Get. + */ public final class ImagesGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImage.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImage.json */ /** * Sample code: Images_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "myImageId", com.azure.core.util.Context.NONE); + manager.images().getWithResponse("MyResourceGroup1", "MyCatalog1", "myImageId", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogSamples.java index 3df520e62c0ae..1bab396e6756e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Images ListByCatalog. */ +/** + * Samples for Images ListByCatalog. + */ public final class ImagesListByCatalogSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImages.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImages.json */ /** * Sample code: Images_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void imagesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .images() - .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE); + manager.images().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/OperationsListSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/OperationsListSamples.java index 1644d16ecb87b..eda64a689697f 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/OperationsListSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/OperationsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetOperations.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetOperations. + * json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AzureSphereManager. */ public static void operationsList(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesSamples.java index c2fbb80de7d03..9027a822d879c 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products CountDevices. */ +/** + * Samples for Products CountDevices. + */ public final class ProductsCountDevicesSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesProduct.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostCountDevicesProduct.json */ /** * Sample code: Products_CountDevices. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + manager.products().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateSamples.java index f4b464e1d8b56..e93a5aaaf45eb 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products CreateOrUpdate. */ +/** + * Samples for Products CreateOrUpdate. + */ public final class ProductsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutProduct.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutProduct.json */ /** * Sample code: Products_CreateOrUpdate. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteSamples.java index bf1b143a5ec91..e92ad94ba96c8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products Delete. */ +/** + * Samples for Products Delete. + */ public final class ProductsDeleteSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteProduct.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteProduct. + * json */ /** * Sample code: Products_Delete. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsSamples.java index dea33d91b4257..ea3802ce988d8 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products GenerateDefaultDeviceGroups. */ +/** + * Samples for Products GenerateDefaultDeviceGroups. + */ public final class ProductsGenerateDefaultDeviceGroupsSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDefaultDeviceGroups.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/ + * PostGenerateDefaultDeviceGroups.json */ /** * Sample code: Products_GenerateDefaultDeviceGroups. - * + * * @param manager Entry point to AzureSphereManager. */ - public static void productsGenerateDefaultDeviceGroups( - com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .generateDefaultDeviceGroups( - "MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + public static void + productsGenerateDefaultDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) { + manager.products().generateDefaultDeviceGroups("MyResourceGroup1", "MyCatalog1", "MyProduct1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGetSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGetSamples.java index 0adf122c027f1..b79416d3f5167 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGetSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products Get. */ +/** + * Samples for Products Get. + */ public final class ProductsGetSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProduct.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProduct.json */ /** * Sample code: Products_Get. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - manager - .products() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE); + manager.products().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogSamples.java index 77d7f7e2b1062..548af7873c42e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.sphere.generated; -/** Samples for Products ListByCatalog. */ +/** + * Samples for Products ListByCatalog. + */ public final class ProductsListByCatalogSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProducts.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProducts.json */ /** * Sample code: Products_ListByCatalog. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) { diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsUpdateSamples.java b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsUpdateSamples.java index 96e2a0ca437ae..c584c7c70c86e 100644 --- a/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsUpdateSamples.java +++ b/sdk/sphere/azure-resourcemanager-sphere/src/samples/java/com/azure/resourcemanager/sphere/generated/ProductsUpdateSamples.java @@ -6,22 +6,23 @@ import com.azure.resourcemanager.sphere.models.Product; -/** Samples for Products Update. */ +/** + * Samples for Products Update. + */ public final class ProductsUpdateSamples { /* - * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchProduct.json + * x-ms-original-file: + * specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchProduct.json */ /** * Sample code: Products_Update. - * + * * @param manager Entry point to AzureSphereManager. */ public static void productsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) { - Product resource = - manager - .products() - .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE) - .getValue(); + Product resource = manager.products() + .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogInnerTests.java deleted file mode 100644 index 6962083bbbef2..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CatalogInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CatalogInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CatalogInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"lokjyemkk\",\"tags\":{\"ejspodmail\":\"pjoxzjnch\",\"yahux\":\"ydehoj\",\"vcputegj\":\"npmqnjaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\"},\"id\":\"odjpslwejd\",\"name\":\"vwryoqpso\",\"type\":\"cctazakljlahbc\"}") - .toObject(CatalogInner.class); - Assertions.assertEquals("lokjyemkk", model.location()); - Assertions.assertEquals("pjoxzjnch", model.tags().get("ejspodmail")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CatalogInner model = - new CatalogInner() - .withLocation("lokjyemkk") - .withTags( - mapOf( - "ejspodmail", - "pjoxzjnch", - "yahux", - "ydehoj", - "vcputegj", - "npmqnjaqwixjspro", - "uuvmkjozkrwfnd", - "wmfdatscmdvpjhul")); - model = BinaryData.fromObject(model).toObject(CatalogInner.class); - Assertions.assertEquals("lokjyemkk", model.location()); - Assertions.assertEquals("pjoxzjnch", model.tags().get("ejspodmail")); - } - - @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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogListResultTests.java deleted file mode 100644 index a8865709acb79..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogListResultTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CatalogInner; -import com.azure.resourcemanager.sphere.models.CatalogListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CatalogListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CatalogListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"location\":\"hxqh\",\"tags\":{\"scnpqxuhivy\":\"fpikxwczb\",\"wby\":\"n\",\"grtfwvu\":\"rkxvdum\"},\"id\":\"xgaudccs\",\"name\":\"h\",\"type\":\"jcny\"}],\"nextLink\":\"hkryhtn\"}") - .toObject(CatalogListResult.class); - Assertions.assertEquals("hxqh", model.value().get(0).location()); - Assertions.assertEquals("fpikxwczb", model.value().get(0).tags().get("scnpqxuhivy")); - Assertions.assertEquals("hkryhtn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CatalogListResult model = - new CatalogListResult() - .withValue( - Arrays - .asList( - new CatalogInner() - .withLocation("hxqh") - .withTags(mapOf("scnpqxuhivy", "fpikxwczb", "wby", "n", "grtfwvu", "rkxvdum")))) - .withNextLink("hkryhtn"); - model = BinaryData.fromObject(model).toObject(CatalogListResult.class); - Assertions.assertEquals("hxqh", model.value().get(0).location()); - Assertions.assertEquals("fpikxwczb", model.value().get(0).tags().get("scnpqxuhivy")); - Assertions.assertEquals("hkryhtn", model.nextLink()); - } - - @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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogPropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogPropertiesTests.java deleted file mode 100644 index 92506c4b6bb33..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogPropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CatalogProperties; - -public final class CatalogPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CatalogProperties model = - BinaryData.fromString("{\"provisioningState\":\"Provisioning\"}").toObject(CatalogProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CatalogProperties model = new CatalogProperties(); - model = BinaryData.fromObject(model).toObject(CatalogProperties.class); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogUpdateTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogUpdateTests.java deleted file mode 100644 index a1076b1954073..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogUpdateTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.CatalogUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CatalogUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CatalogUpdate model = - BinaryData - .fromString( - "{\"tags\":{\"xpaojakhmsbz\":\"fdosyg\",\"hlxaolthqtr\":\"hcrzevd\",\"gvfcj\":\"qjbpfzfsin\"}}") - .toObject(CatalogUpdate.class); - Assertions.assertEquals("fdosyg", model.tags().get("xpaojakhmsbz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CatalogUpdate model = - new CatalogUpdate() - .withTags(mapOf("xpaojakhmsbz", "fdosyg", "hlxaolthqtr", "hcrzevd", "gvfcj", "qjbpfzfsin")); - model = BinaryData.fromObject(model).toObject(CatalogUpdate.class); - Assertions.assertEquals("fdosyg", model.tags().get("xpaojakhmsbz")); - } - - @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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesWithResponseMockTests.java deleted file mode 100644 index b65131b0794fd..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCountDevicesWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.CountDeviceResponse; -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 CatalogsCountDevicesWithResponseMockTests { - @Test - public void testCountDevicesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":427278595}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CountDeviceResponse response = - manager.catalogs().countDevicesWithResponse("bkyvp", "ca", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(427278595, response.value()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateMockTests.java deleted file mode 100644 index 8b2d78d783367..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsCreateOrUpdateMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Catalog; -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 CatalogsCreateOrUpdateMockTests { - @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\"},\"location\":\"lmpewwwfbkr\",\"tags\":{\"rsbfovasrruvw\":\"svshqjohx\"},\"id\":\"hsqfsubcgjbirxbp\",\"name\":\"bsrfbj\",\"type\":\"dtws\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Catalog response = - manager - .catalogs() - .define("mjh") - .withRegion("gudivkrtswbxqz") - .withExistingResourceGroup("rmfqjhhkxbpvj") - .withTags(mapOf("e", "jfauvjfdxxi")) - .create(); - - Assertions.assertEquals("lmpewwwfbkr", response.location()); - Assertions.assertEquals("svshqjohx", response.tags().get("rsbfovasrruvw")); - } - - @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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsDeleteMockTests.java deleted file mode 100644 index a43539e369588..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/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.sphere.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.sphere.AzureSphereManager; -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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.catalogs().delete("hdzhlrqj", "hckfrlhrx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index be9d6977414b4..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsGetByResourceGroupWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Catalog; -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 CatalogsGetByResourceGroupWithResponseMockTests { - @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\":\"Accepted\"},\"location\":\"gxywpmue\",\"tags\":{\"bglaocqxtccm\":\"zwfqkqujidsuyon\"},\"id\":\"yudxytlmoy\",\"name\":\"xv\",\"type\":\"fudwpznt\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Catalog response = - manager.catalogs().getByResourceGroupWithResponse("ye", "sbj", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("gxywpmue", response.location()); - Assertions.assertEquals("zwfqkqujidsuyon", response.tags().get("bglaocqxtccm")); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupMockTests.java deleted file mode 100644 index 4c933ee635d93..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListByResourceGroupMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Catalog; -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 CatalogsListByResourceGroupMockTests { - @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\":\"Failed\"},\"location\":\"bkc\",\"tags\":{\"nv\":\"hbttkphyw\"},\"id\":\"t\",\"name\":\"qnermclfplphoxu\",\"type\":\"crpab\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.catalogs().listByResourceGroup("kvceoveilovnotyf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bkc", response.iterator().next().location()); - Assertions.assertEquals("hbttkphyw", response.iterator().next().tags().get("nv")); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsMockTests.java deleted file mode 100644 index cb6c4fbc61b39..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeploymentsMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Deployment; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 CatalogsListDeploymentsMockTests { - @Test - public void testListDeployments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"deploymentId\":\"v\",\"deployedImages\":[{\"properties\":{\"image\":\"slhs\",\"imageId\":\"deemao\",\"imageName\":\"xagkvtmelmqkrh\",\"regionalDataBoundary\":\"None\",\"uri\":\"juahaquhcdhmdual\",\"description\":\"xqpvfadmw\",\"componentId\":\"crgvxpvgom\",\"imageType\":\"WifiFirmware\",\"provisioningState\":\"Canceled\"},\"id\":\"sgwbnbbeld\",\"name\":\"wkz\",\"type\":\"ali\"},{\"properties\":{\"image\":\"qhakauhashsf\",\"imageId\":\"osow\",\"imageName\":\"cugicjoox\",\"regionalDataBoundary\":\"EU\",\"uri\":\"wpucwwfvovbv\",\"description\":\"uecivyhz\",\"componentId\":\"uojgj\",\"imageType\":\"SecurityMonitor\",\"provisioningState\":\"Succeeded\"},\"id\":\"iotwmcdytdxwit\",\"name\":\"nrjawgqwg\",\"type\":\"hniskxfbkpyc\"},{\"properties\":{\"image\":\"wndnhj\",\"imageId\":\"uwhvylwzbtdhxujz\",\"imageName\":\"mpowuwpr\",\"regionalDataBoundary\":\"None\",\"uri\":\"eualupjmkhf\",\"description\":\"bbcswsrtjri\",\"componentId\":\"rbpbewtghfgblcg\",\"imageType\":\"OneBl\",\"provisioningState\":\"Canceled\"},\"id\":\"v\",\"name\":\"hjkbegibtnmxieb\",\"type\":\"waloayqcgwr\"},{\"properties\":{\"image\":\"uzgwyzmhtx\",\"imageId\":\"gmtsavjcbpwxqpsr\",\"imageName\":\"ftguv\",\"regionalDataBoundary\":\"EU\",\"uri\":\"prwmdyvxqt\",\"description\":\"riwwroy\",\"componentId\":\"exrmcqibycnojvk\",\"imageType\":\"PlutonRuntime\",\"provisioningState\":\"Updating\"},\"id\":\"sgzvahapjyzhpv\",\"name\":\"qzcjrvxdj\",\"type\":\"lmwlxkvugfhzo\"}],\"deploymentDateUtc\":\"2021-09-30T03:16:16Z\",\"provisioningState\":\"Canceled\"},\"id\":\"zunlu\",\"name\":\"hnnpr\",\"type\":\"xipeilpjzuaejx\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .catalogs() - .listDeployments( - "z", "p", "kafkuwbcrnwbm", 1542253292, 1688496747, 1198251199, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("v", response.iterator().next().deploymentId()); - Assertions.assertEquals("slhs", response.iterator().next().deployedImages().get(0).image()); - Assertions.assertEquals("deemao", response.iterator().next().deployedImages().get(0).imageId()); - Assertions - .assertEquals( - RegionalDataBoundary.NONE, response.iterator().next().deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsMockTests.java deleted file mode 100644 index 5d57cacf9ab98..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceGroupsMockTests.java +++ /dev/null @@ -1,88 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroup; -import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -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 CatalogsListDeviceGroupsMockTests { - @Test - public void testListDeviceGroups() 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\":\"luu\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":false,\"provisioningState\":\"Updating\"},\"id\":\"v\",\"name\":\"elnsmvbxw\",\"type\":\"jsflhhcaalnjix\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .catalogs() - .listDeviceGroups( - "ultskzbbtdz", - "mv", - new ListDeviceGroupsRequest().withDeviceGroupName("kgpwoz"), - "hkfpbs", - 820009390, - 657936288, - 205303620, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("luu", response.iterator().next().description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, response.iterator().next().osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, response.iterator().next().updatePolicy()); - Assertions - .assertEquals(AllowCrashDumpCollection.ENABLED, response.iterator().next().allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, response.iterator().next().regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsMockTests.java deleted file mode 100644 index 924deb5c4dad5..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDeviceInsightsMockTests.java +++ /dev/null @@ -1,86 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.DeviceInsight; -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 CatalogsListDeviceInsightsMockTests { - @Test - public void testListDeviceInsights() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"deviceId\":\"ztfolhbnxk\",\"description\":\"alaulppggdtpnapn\",\"startTimestampUtc\":\"2021-01-27T00:10:34Z\",\"endTimestampUtc\":\"2021-04-06T21:45:28Z\",\"eventCategory\":\"opuhpig\",\"eventClass\":\"pgylg\",\"eventType\":\"git\",\"eventCount\":1973221194}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .catalogs() - .listDeviceInsights( - "sxyawjoyaqcs", - "yjpkiidzyexz", - "eli", - 1911330715, - 462425094, - 705550222, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ztfolhbnxk", response.iterator().next().deviceId()); - Assertions.assertEquals("alaulppggdtpnapn", response.iterator().next().description()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-01-27T00:10:34Z"), response.iterator().next().startTimestampUtc()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-06T21:45:28Z"), response.iterator().next().endTimestampUtc()); - Assertions.assertEquals("opuhpig", response.iterator().next().eventCategory()); - Assertions.assertEquals("pgylg", response.iterator().next().eventClass()); - Assertions.assertEquals("git", response.iterator().next().eventType()); - Assertions.assertEquals(1973221194, response.iterator().next().eventCount()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesMockTests.java deleted file mode 100644 index cbd33be295984..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListDevicesMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Device; -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 CatalogsListDevicesMockTests { - @Test - public void testListDevices() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"deviceId\":\"ellwptfdy\",\"chipSku\":\"fqbuaceopzf\",\"lastAvailableOsVersion\":\"hhuao\",\"lastInstalledOsVersion\":\"pcqeqx\",\"lastOsUpdateUtc\":\"2021-02-19T08:33:13Z\",\"lastUpdateRequestUtc\":\"2021-12-05T23:59:55Z\",\"provisioningState\":\"Failed\"},\"id\":\"xcto\",\"name\":\"gbkdmoizpos\",\"type\":\"mgrcfbu\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .catalogs() - .listDevices( - "edjvcslynqw", - "ncw", - "zhxgktrmgucn", - 1295716293, - 994320059, - 47772472, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ellwptfdy", response.iterator().next().deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListMockTests.java deleted file mode 100644 index ed17d3f62a22c..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CatalogsListMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Catalog; -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 CatalogsListMockTests { - @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\"},\"location\":\"kde\",\"tags\":{\"kdwzbaiuebbaumny\":\"vlopwiyighx\",\"txp\":\"upedeojnabckhs\",\"tfhvpesapskrdqmh\":\"ie\",\"tkncwsc\":\"jdhtldwkyzxu\"},\"id\":\"svlxotogtwrup\",\"name\":\"sx\",\"type\":\"nmic\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.catalogs().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kde", response.iterator().next().location()); - Assertions.assertEquals("vlopwiyighx", response.iterator().next().tags().get("kdwzbaiuebbaumny")); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateChainResponseInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateChainResponseInnerTests.java deleted file mode 100644 index 20eb83b8c343b..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateChainResponseInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner; - -public final class CertificateChainResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateChainResponseInner model = - BinaryData - .fromString("{\"certificateChain\":\"uskcqvkocrcj\"}") - .toObject(CertificateChainResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateChainResponseInner model = new CertificateChainResponseInner(); - model = BinaryData.fromObject(model).toObject(CertificateChainResponseInner.class); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateInnerTests.java deleted file mode 100644 index 6754027061f50..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CertificateInner; - -public final class CertificateInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateInner model = - BinaryData - .fromString( - "{\"properties\":{\"certificate\":\"eotusivyevc\",\"status\":\"Active\",\"subject\":\"hn\",\"thumbprint\":\"ngbwjz\",\"expiryUtc\":\"2020-12-28T13:19:57Z\",\"notBeforeUtc\":\"2021-11-04T09:44:48Z\",\"provisioningState\":\"Failed\"},\"id\":\"spemvtzfk\",\"name\":\"fublj\",\"type\":\"fxqeof\"}") - .toObject(CertificateInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateInner model = new CertificateInner(); - model = BinaryData.fromObject(model).toObject(CertificateInner.class); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateListResultTests.java deleted file mode 100644 index 7446a0f2cf621..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificateListResultTests.java +++ /dev/null @@ -1,31 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CertificateInner; -import com.azure.resourcemanager.sphere.models.CertificateListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CertificateListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"certificate\":\"xxjtfe\",\"status\":\"Expired\",\"subject\":\"fziton\",\"thumbprint\":\"qfpjk\",\"expiryUtc\":\"2021-05-09T13:58:23Z\",\"notBeforeUtc\":\"2021-11-24T18:52:18Z\",\"provisioningState\":\"Failed\"},\"id\":\"hpf\",\"name\":\"xypininmayhuybbk\",\"type\":\"odepoogin\"}],\"nextLink\":\"amiheognarxz\"}") - .toObject(CertificateListResult.class); - Assertions.assertEquals("amiheognarxz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateListResult model = - new CertificateListResult().withValue(Arrays.asList(new CertificateInner())).withNextLink("amiheognarxz"); - model = BinaryData.fromObject(model).toObject(CertificateListResult.class); - Assertions.assertEquals("amiheognarxz", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatePropertiesTests.java deleted file mode 100644 index 466e9b7ffa5b1..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatePropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CertificateProperties; - -public final class CertificatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateProperties model = - BinaryData - .fromString( - "{\"certificate\":\"e\",\"status\":\"Expired\",\"subject\":\"jbasvmsmjqulngs\",\"thumbprint\":\"nbybkzgcwrwcl\",\"expiryUtc\":\"2021-06-21T13:48:53Z\",\"notBeforeUtc\":\"2021-01-30T10:40:21Z\",\"provisioningState\":\"Canceled\"}") - .toObject(CertificateProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateProperties model = new CertificateProperties(); - model = BinaryData.fromObject(model).toObject(CertificateProperties.class); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesGetWithResponseMockTests.java deleted file mode 100644 index c4b74f5c71434..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesGetWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Certificate; -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 CertificatesGetWithResponseMockTests { - @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\":{\"certificate\":\"d\",\"status\":\"Inactive\",\"subject\":\"hzdxssadbzm\",\"thumbprint\":\"dfznudaodv\",\"expiryUtc\":\"2021-05-29T13:49:41Z\",\"notBeforeUtc\":\"2021-08-27T15:54:03Z\",\"provisioningState\":\"Provisioning\"},\"id\":\"lpstdbhhxsrzdz\",\"name\":\"cers\",\"type\":\"dntnevf\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Certificate response = - manager - .certificates() - .getWithResponse("aolps", "lqlfm", "dnbbglzps", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogMockTests.java deleted file mode 100644 index 046b9f5afd56d..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesListByCatalogMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Certificate; -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 CertificatesListByCatalogMockTests { - @Test - public void testListByCatalog() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"certificate\":\"n\",\"status\":\"Expired\",\"subject\":\"gdrjervnaenqpe\",\"thumbprint\":\"ndoygmifthnzdnd\",\"expiryUtc\":\"2021-07-04T07:51:31Z\",\"notBeforeUtc\":\"2021-07-27T07:40:17Z\",\"provisioningState\":\"Canceled\"},\"id\":\"gynduha\",\"name\":\"hqlkthumaqo\",\"type\":\"bgycduiertgccym\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .certificates() - .listByCatalog( - "otftpvjzbexilz", - "nfqqnvwp", - "qtaruoujmkcjhwq", - 1209878928, - 1656357002, - 75465955, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainWithResponseMockTests.java deleted file mode 100644 index 29c0fee1fc770..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveCertChainWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.CertificateChainResponse; -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 CertificatesRetrieveCertChainWithResponseMockTests { - @Test - public void testRetrieveCertChainWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"certificateChain\":\"mweriofzpy\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CertificateChainResponse response = - manager - .certificates() - .retrieveCertChainWithResponse("wjmy", "tdss", "s", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceWithResponseMockTests.java deleted file mode 100644 index 012c89bb50ee5..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CertificatesRetrieveProofOfPossessionNonceWithResponseMockTests.java +++ /dev/null @@ -1,73 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; -import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceResponse; -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 CertificatesRetrieveProofOfPossessionNonceWithResponseMockTests { - @Test - public void testRetrieveProofOfPossessionNonceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"certificate\":\"k\",\"status\":\"Inactive\",\"subject\":\"pjflcxogao\",\"thumbprint\":\"nzmnsikvm\",\"expiryUtc\":\"2021-05-13T18:51:38Z\",\"notBeforeUtc\":\"2021-02-18T23:34:18Z\",\"provisioningState\":\"Failed\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProofOfPossessionNonceResponse response = - manager - .certificates() - .retrieveProofOfPossessionNonceWithResponse( - "semwabnet", - "hhszh", - "d", - new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("lvwiwubmwmbesl"), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ClaimDevicesRequestTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ClaimDevicesRequestTests.java deleted file mode 100644 index 987e77431a939..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ClaimDevicesRequestTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClaimDevicesRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClaimDevicesRequest model = - BinaryData - .fromString("{\"deviceIdentifiers\":[\"ckzywbiexzfeyue\",\"xibxujwbhqwalm\",\"zyoxaepdkzjan\"]}") - .toObject(ClaimDevicesRequest.class); - Assertions.assertEquals("ckzywbiexzfeyue", model.deviceIdentifiers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClaimDevicesRequest model = - new ClaimDevicesRequest() - .withDeviceIdentifiers(Arrays.asList("ckzywbiexzfeyue", "xibxujwbhqwalm", "zyoxaepdkzjan")); - model = BinaryData.fromObject(model).toObject(ClaimDevicesRequest.class); - Assertions.assertEquals("ckzywbiexzfeyue", model.deviceIdentifiers().get(0)); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountDeviceResponseInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountDeviceResponseInnerTests.java deleted file mode 100644 index 2ffe088cd6d62..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountDeviceResponseInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class CountDeviceResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CountDeviceResponseInner model = - BinaryData.fromString("{\"value\":1762114496}").toObject(CountDeviceResponseInner.class); - Assertions.assertEquals(1762114496, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CountDeviceResponseInner model = new CountDeviceResponseInner().withValue(1762114496); - model = BinaryData.fromObject(model).toObject(CountDeviceResponseInner.class); - Assertions.assertEquals(1762114496, model.value()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountElementsResponseTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountElementsResponseTests.java deleted file mode 100644 index 41e3672f50df1..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/CountElementsResponseTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.CountElementsResponse; -import org.junit.jupiter.api.Assertions; - -public final class CountElementsResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CountElementsResponse model = - BinaryData.fromString("{\"value\":1742159588}").toObject(CountElementsResponse.class); - Assertions.assertEquals(1742159588, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CountElementsResponse model = new CountElementsResponse().withValue(1742159588); - model = BinaryData.fromObject(model).toObject(CountElementsResponse.class); - Assertions.assertEquals(1742159588, model.value()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentInnerTests.java deleted file mode 100644 index 08bb9bfd280b6..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentInnerTests.java +++ /dev/null @@ -1,58 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentInner model = - BinaryData - .fromString( - "{\"properties\":{\"deploymentId\":\"jrmvdjwzrlo\",\"deployedImages\":[{\"properties\":{\"image\":\"hijco\",\"imageId\":\"ctbzaq\",\"imageName\":\"sycbkbfk\",\"regionalDataBoundary\":\"None\",\"uri\":\"kexxppof\",\"description\":\"axcfjpgddtocjjx\",\"componentId\":\"pmouexhdz\",\"imageType\":\"InvalidImageType\",\"provisioningState\":\"Accepted\"},\"id\":\"ojnxqbzvdd\",\"name\":\"t\",\"type\":\"ndei\"},{\"properties\":{\"image\":\"w\",\"imageId\":\"zao\",\"imageName\":\"uhrhcffcyddgl\",\"regionalDataBoundary\":\"None\",\"uri\":\"jqkwpyeicx\",\"description\":\"ciwqvhk\",\"componentId\":\"xuigdtopbobj\",\"imageType\":\"ManifestSet\",\"provisioningState\":\"Deleting\"},\"id\":\"w\",\"name\":\"a\",\"type\":\"a\"},{\"properties\":{\"image\":\"z\",\"imageId\":\"vvtpgvdfgio\",\"imageName\":\"ftutqxlngxlefgu\",\"regionalDataBoundary\":\"None\",\"uri\":\"rxdq\",\"description\":\"dt\",\"componentId\":\"zrvqdr\",\"imageType\":\"NormalWorldKernel\",\"provisioningState\":\"Provisioning\"},\"id\":\"big\",\"name\":\"h\",\"type\":\"qfbow\"},{\"properties\":{\"image\":\"nyktzlcuiy\",\"imageId\":\"qyw\",\"imageName\":\"drvyn\",\"regionalDataBoundary\":\"EU\",\"uri\":\"phrcgyncoc\",\"description\":\"cfvmmco\",\"componentId\":\"sxlzevgbmqj\",\"imageType\":\"PlutonRuntime\",\"provisioningState\":\"Deleting\"},\"id\":\"pmivkwlzu\",\"name\":\"ccfwnfnbacfion\",\"type\":\"ebxetqgtzxdp\"}],\"deploymentDateUtc\":\"2021-04-08T18:16:48Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"wxrjfeallnwsub\",\"name\":\"snjampmng\",\"type\":\"zscxaqwo\"}") - .toObject(DeploymentInner.class); - Assertions.assertEquals("jrmvdjwzrlo", model.deploymentId()); - Assertions.assertEquals("hijco", model.deployedImages().get(0).image()); - Assertions.assertEquals("ctbzaq", model.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.deployedImages().get(0).regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentInner model = - new DeploymentInner() - .withDeploymentId("jrmvdjwzrlo") - .withDeployedImages( - Arrays - .asList( - new ImageInner() - .withImage("hijco") - .withImageId("ctbzaq") - .withRegionalDataBoundary(RegionalDataBoundary.NONE), - new ImageInner() - .withImage("w") - .withImageId("zao") - .withRegionalDataBoundary(RegionalDataBoundary.NONE), - new ImageInner() - .withImage("z") - .withImageId("vvtpgvdfgio") - .withRegionalDataBoundary(RegionalDataBoundary.NONE), - new ImageInner() - .withImage("nyktzlcuiy") - .withImageId("qyw") - .withRegionalDataBoundary(RegionalDataBoundary.EU))); - model = BinaryData.fromObject(model).toObject(DeploymentInner.class); - Assertions.assertEquals("jrmvdjwzrlo", model.deploymentId()); - Assertions.assertEquals("hijco", model.deployedImages().get(0).image()); - Assertions.assertEquals("ctbzaq", model.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentListResultTests.java deleted file mode 100644 index 6fee8c609012e..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentListResultTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.DeploymentListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"deploymentId\":\"idnsezcxtb\",\"deployedImages\":[{\"properties\":{},\"id\":\"yc\",\"name\":\"sne\",\"type\":\"mdwzjeiachboo\"},{\"properties\":{},\"id\":\"lnrosfqp\",\"name\":\"eeh\",\"type\":\"zvypyqrimzinp\"}],\"deploymentDateUtc\":\"2021-01-25T11:13:44Z\",\"provisioningState\":\"Deleting\"},\"id\":\"kirsoodqxhc\",\"name\":\"mnoh\",\"type\":\"t\"},{\"properties\":{\"deploymentId\":\"h\",\"deployedImages\":[{\"properties\":{},\"id\":\"fiyipjxsqwpgrj\",\"name\":\"znorcj\",\"type\":\"vsnb\"},{\"properties\":{},\"id\":\"qabnmoc\",\"name\":\"cyshurzafbljjgp\",\"type\":\"toqcjmklja\"},{\"properties\":{},\"id\":\"qidtqajzyu\",\"name\":\"pku\",\"type\":\"jkrlkhbzhfepg\"},{\"properties\":{},\"id\":\"qex\",\"name\":\"locx\",\"type\":\"c\"}],\"deploymentDateUtc\":\"2021-01-04T21:09:36Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"hhbcsglummajtjao\",\"name\":\"xobnbdxkqpxok\",\"type\":\"jionpimexgstxgc\"}],\"nextLink\":\"dg\"}") - .toObject(DeploymentListResult.class); - Assertions.assertEquals("idnsezcxtb", model.value().get(0).deploymentId()); - Assertions.assertEquals("dg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentListResult model = - new DeploymentListResult() - .withValue( - Arrays - .asList( - new DeploymentInner() - .withDeploymentId("idnsezcxtb") - .withDeployedImages(Arrays.asList(new ImageInner(), new ImageInner())), - new DeploymentInner() - .withDeploymentId("h") - .withDeployedImages( - Arrays - .asList( - new ImageInner(), new ImageInner(), new ImageInner(), new ImageInner())))) - .withNextLink("dg"); - model = BinaryData.fromObject(model).toObject(DeploymentListResult.class); - Assertions.assertEquals("idnsezcxtb", model.value().get(0).deploymentId()); - Assertions.assertEquals("dg", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentPropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentPropertiesTests.java deleted file mode 100644 index 7073c470e6569..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentPropertiesTests.java +++ /dev/null @@ -1,50 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeploymentProperties; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentProperties model = - BinaryData - .fromString( - "{\"deploymentId\":\"hcbonqvpkvlr\",\"deployedImages\":[{\"properties\":{\"image\":\"seiphe\",\"imageId\":\"lokeyy\",\"imageName\":\"nj\",\"regionalDataBoundary\":\"EU\",\"uri\":\"tgrhpdjpjumas\",\"description\":\"zj\",\"componentId\":\"yegu\",\"imageType\":\"FirmwareUpdateManifest\",\"provisioningState\":\"Provisioning\"},\"id\":\"xhejjzzvdud\",\"name\":\"wdslfhotwmcy\",\"type\":\"pwlbjnpg\"},{\"properties\":{\"image\":\"tadehxnltyfsopp\",\"imageId\":\"uesnzwdejbavo\",\"imageName\":\"zdmohctbqvu\",\"regionalDataBoundary\":\"None\",\"uri\":\"ndnvo\",\"description\":\"ujjugwdkcglh\",\"componentId\":\"azjdyggd\",\"imageType\":\"WifiFirmware\",\"provisioningState\":\"Provisioning\"},\"id\":\"b\",\"name\":\"uofqwe\",\"type\":\"kh\"}],\"deploymentDateUtc\":\"2021-06-19T17:30:56Z\",\"provisioningState\":\"Succeeded\"}") - .toObject(DeploymentProperties.class); - Assertions.assertEquals("hcbonqvpkvlr", model.deploymentId()); - Assertions.assertEquals("seiphe", model.deployedImages().get(0).image()); - Assertions.assertEquals("lokeyy", model.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.deployedImages().get(0).regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentProperties model = - new DeploymentProperties() - .withDeploymentId("hcbonqvpkvlr") - .withDeployedImages( - Arrays - .asList( - new ImageInner() - .withImage("seiphe") - .withImageId("lokeyy") - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new ImageInner() - .withImage("tadehxnltyfsopp") - .withImageId("uesnzwdejbavo") - .withRegionalDataBoundary(RegionalDataBoundary.NONE))); - model = BinaryData.fromObject(model).toObject(DeploymentProperties.class); - Assertions.assertEquals("hcbonqvpkvlr", model.deploymentId()); - Assertions.assertEquals("seiphe", model.deployedImages().get(0).image()); - Assertions.assertEquals("lokeyy", model.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateMockTests.java deleted file mode 100644 index 3341621f04508..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,89 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.Deployment; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -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 DeploymentsCreateOrUpdateMockTests { - @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\":{\"deploymentId\":\"dsrezpdrhneuyow\",\"deployedImages\":[{\"properties\":{\"image\":\"t\",\"imageId\":\"ib\",\"imageName\":\"cgpik\",\"regionalDataBoundary\":\"None\",\"uri\":\"ejzanlfz\",\"description\":\"av\",\"componentId\":\"bzonok\",\"imageType\":\"FirmwareUpdateManifest\",\"provisioningState\":\"Deleting\"},\"id\":\"cirgzp\",\"name\":\"rlazszrnw\",\"type\":\"iin\"}],\"deploymentDateUtc\":\"2021-01-06T22:30:17Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"jylwbtlhflsj\",\"name\":\"dhszfjv\",\"type\":\"bgofeljag\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Deployment response = - manager - .deployments() - .define("nmdyodnwzxl") - .withExistingDeviceGroup("dl", "h", "hfwpracstwit", "khevxccedc") - .withDeploymentId("vnhltiugcx") - .withDeployedImages( - Arrays - .asList( - new ImageInner() - .withImage("xqi") - .withImageId("qunyowxwlmdjr") - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new ImageInner() - .withImage("jivfxzsjabib") - .withImageId("stawfsdjpvkv") - .withRegionalDataBoundary(RegionalDataBoundary.NONE))) - .create(); - - Assertions.assertEquals("dsrezpdrhneuyow", response.deploymentId()); - Assertions.assertEquals("t", response.deployedImages().get(0).image()); - Assertions.assertEquals("ib", response.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteMockTests.java deleted file mode 100644 index 4ce227f68739a..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsDeleteMockTests.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.sphere.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.sphere.AzureSphereManager; -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 DeploymentsDeleteMockTests { - @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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.deployments().delete("lolp", "vk", "r", "qvujzraehtwdwrf", "swibyr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetWithResponseMockTests.java deleted file mode 100644 index 068679d45e304..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsGetWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Deployment; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 DeploymentsGetWithResponseMockTests { - @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\":{\"deploymentId\":\"doamciodhkha\",\"deployedImages\":[{\"properties\":{\"image\":\"zbonlwnt\",\"imageId\":\"gokdwbwhks\",\"imageName\":\"cmrvexzt\",\"regionalDataBoundary\":\"None\",\"uri\":\"gsfraoyzkoow\",\"description\":\"mnguxawqaldsyu\",\"componentId\":\"imerqfobwyznk\",\"imageType\":\"InvalidImageType\",\"provisioningState\":\"Updating\"},\"id\":\"wpfhpagmhrskd\",\"name\":\"nfd\",\"type\":\"doakgtdlmkkzevdl\"},{\"properties\":{\"image\":\"pusdstt\",\"imageId\":\"ogvbbejdcngq\",\"imageName\":\"oakufgm\",\"regionalDataBoundary\":\"None\",\"uri\":\"rdgrtw\",\"description\":\"nuuzkopbm\",\"componentId\":\"rfdwoyu\",\"imageType\":\"Nwfs\",\"provisioningState\":\"Failed\"},\"id\":\"iefozbhdmsml\",\"name\":\"zqhof\",\"type\":\"rmaequ\"},{\"properties\":{\"image\":\"xicslfao\",\"imageId\":\"piyylhalnswhccsp\",\"imageName\":\"aivwitqscywu\",\"regionalDataBoundary\":\"EU\",\"uri\":\"luhczbw\",\"description\":\"hairsbrgzdwms\",\"componentId\":\"ypqwdxggiccc\",\"imageType\":\"RecoveryManifest\",\"provisioningState\":\"Succeeded\"},\"id\":\"exmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"}],\"deploymentDateUtc\":\"2021-07-01T02:09:13Z\",\"provisioningState\":\"Deleting\"},\"id\":\"ypbsfgytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Deployment response = - manager - .deployments() - .getWithResponse( - "bjcntujitc", "ed", "twwaezkojvdcpzf", "qouicybxarzgsz", "foxciq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("doamciodhkha", response.deploymentId()); - Assertions.assertEquals("zbonlwnt", response.deployedImages().get(0).image()); - Assertions.assertEquals("gokdwbwhks", response.deployedImages().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupMockTests.java deleted file mode 100644 index 861f00dbdfdfa..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeploymentsListByDeviceGroupMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Deployment; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 DeploymentsListByDeviceGroupMockTests { - @Test - public void testListByDeviceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"deploymentId\":\"rx\",\"deployedImages\":[{\"properties\":{\"image\":\"vaytdwkqbrq\",\"imageId\":\"paxh\",\"imageName\":\"iilivpdtiirqtd\",\"regionalDataBoundary\":\"EU\",\"uri\":\"oruzfgsquyfxrxx\",\"description\":\"ptramxj\",\"componentId\":\"wlwnwxuqlcv\",\"imageType\":\"UpdateCertStore\",\"provisioningState\":\"Failed\"},\"id\":\"tdooaoj\",\"name\":\"niodkooeb\",\"type\":\"nuj\"},{\"properties\":{\"image\":\"msbvdkcrodtjinf\",\"imageId\":\"lfltka\",\"imageName\":\"vefkdlfoakggk\",\"regionalDataBoundary\":\"EU\",\"uri\":\"ao\",\"description\":\"ulpqblylsyxkqjn\",\"componentId\":\"ervtiagxs\",\"imageType\":\"SecurityMonitor\",\"provisioningState\":\"Accepted\"},\"id\":\"mpsbzkfzbeyv\",\"name\":\"nqicvinvkjjxdxrb\",\"type\":\"ukzclewyhmlwpaz\"},{\"properties\":{\"image\":\"ofncckwyfzqwhxxb\",\"imageId\":\"qa\",\"imageName\":\"feqztppriol\",\"regionalDataBoundary\":\"EU\",\"uri\":\"altol\",\"description\":\"cwsobqwcs\",\"componentId\":\"nwdcfhu\",\"imageType\":\"PlutonRuntime\",\"provisioningState\":\"Updating\"},\"id\":\"uvglsbjjcanvx\",\"name\":\"vtvudutncormr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"image\":\"vkg\",\"imageId\":\"bgdknnqv\",\"imageName\":\"znqntoru\",\"regionalDataBoundary\":\"EU\",\"uri\":\"a\",\"description\":\"kycgrauwj\",\"componentId\":\"taeburuvdm\",\"imageType\":\"NormalWorldKernel\",\"provisioningState\":\"Provisioning\"},\"id\":\"l\",\"name\":\"wabm\",\"type\":\"oefki\"}],\"deploymentDateUtc\":\"2021-07-14T12:33:43Z\",\"provisioningState\":\"Canceled\"},\"id\":\"u\",\"name\":\"ujmqlgkfbtndoa\",\"type\":\"n\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .deployments() - .listByDeviceGroup( - "nbyxbaaabjyv", - "yffimrzrtuzqogs", - "xnevfdnwn", - "mewzsyyc", - "uzsoi", - 2025880638, - 414197490, - 2135802257, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rx", response.iterator().next().deploymentId()); - Assertions.assertEquals("vaytdwkqbrq", response.iterator().next().deployedImages().get(0).image()); - Assertions.assertEquals("paxh", response.iterator().next().deployedImages().get(0).imageId()); - Assertions - .assertEquals( - RegionalDataBoundary.EU, response.iterator().next().deployedImages().get(0).regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupInnerTests.java deleted file mode 100644 index 3c7b0effbe192..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupInnerTests.java +++ /dev/null @@ -1,46 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -import org.junit.jupiter.api.Assertions; - -public final class DeviceGroupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceGroupInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"hqyudxorrqnbpoc\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":true,\"provisioningState\":\"Succeeded\"},\"id\":\"llr\",\"name\":\"vvdfwatkpnpul\",\"type\":\"xxbczwtr\"}") - .toObject(DeviceGroupInner.class); - Assertions.assertEquals("hqyudxorrqnbpoc", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceGroupInner model = - new DeviceGroupInner() - .withDescription("hqyudxorrqnbpoc") - .withOsFeedType(OSFeedType.RETAIL_EVAL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.NONE); - model = BinaryData.fromObject(model).toObject(DeviceGroupInner.class); - Assertions.assertEquals("hqyudxorrqnbpoc", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupListResultTests.java deleted file mode 100644 index 3f11315981974..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupListResultTests.java +++ /dev/null @@ -1,73 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroupListResult; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeviceGroupListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceGroupListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"bvyvdcsity\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":true,\"provisioningState\":\"Provisioning\"},\"id\":\"qsc\",\"name\":\"eypvhezrkg\",\"type\":\"hcjrefovgmk\"},{\"properties\":{\"description\":\"eyyvxyqjpkcat\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":true,\"provisioningState\":\"Succeeded\"},\"id\":\"jh\",\"name\":\"mdajv\",\"type\":\"ysou\"},{\"properties\":{\"description\":\"canoaeupf\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":true,\"provisioningState\":\"Updating\"},\"id\":\"matuok\",\"name\":\"hfuiuaodsfc\",\"type\":\"kvxod\"},{\"properties\":{\"description\":\"zmyzydagf\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":true,\"provisioningState\":\"Deleting\"},\"id\":\"whrdxwzywqsmbsu\",\"name\":\"exim\",\"type\":\"ryocfsfksymdd\"}],\"nextLink\":\"tki\"}") - .toObject(DeviceGroupListResult.class); - Assertions.assertEquals("bvyvdcsity", model.value().get(0).description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.value().get(0).osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.value().get(0).updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, model.value().get(0).allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.value().get(0).regionalDataBoundary()); - Assertions.assertEquals("tki", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceGroupListResult model = - new DeviceGroupListResult() - .withValue( - Arrays - .asList( - new DeviceGroupInner() - .withDescription("bvyvdcsity") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.ENABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new DeviceGroupInner() - .withDescription("eyyvxyqjpkcat") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new DeviceGroupInner() - .withDescription("canoaeupf") - .withOsFeedType(OSFeedType.RETAIL_EVAL) - .withUpdatePolicy(UpdatePolicy.UPDATE_ALL) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.ENABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new DeviceGroupInner() - .withDescription("zmyzydagf") - .withOsFeedType(OSFeedType.RETAIL_EVAL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU))) - .withNextLink("tki"); - model = BinaryData.fromObject(model).toObject(DeviceGroupListResult.class); - Assertions.assertEquals("bvyvdcsity", model.value().get(0).description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.value().get(0).osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.value().get(0).updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, model.value().get(0).allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.value().get(0).regionalDataBoundary()); - Assertions.assertEquals("tki", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupPropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupPropertiesTests.java deleted file mode 100644 index 445027d88fdb7..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupPropertiesTests.java +++ /dev/null @@ -1,46 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupProperties; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -import org.junit.jupiter.api.Assertions; - -public final class DeviceGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceGroupProperties model = - BinaryData - .fromString( - "{\"description\":\"iqzbq\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":true,\"provisioningState\":\"Deleting\"}") - .toObject(DeviceGroupProperties.class); - Assertions.assertEquals("iqzbq", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceGroupProperties model = - new DeviceGroupProperties() - .withDescription("iqzbq") - .withOsFeedType(OSFeedType.RETAIL_EVAL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.NONE); - model = BinaryData.fromObject(model).toObject(DeviceGroupProperties.class); - Assertions.assertEquals("iqzbq", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdatePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdatePropertiesTests.java deleted file mode 100644 index b0e15ed3d3827..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdatePropertiesTests.java +++ /dev/null @@ -1,46 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupUpdateProperties; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -import org.junit.jupiter.api.Assertions; - -public final class DeviceGroupUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceGroupUpdateProperties model = - BinaryData - .fromString( - "{\"description\":\"cocmnyyaztt\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"EU\"}") - .toObject(DeviceGroupUpdateProperties.class); - Assertions.assertEquals("cocmnyyaztt", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.UPDATE_ALL, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceGroupUpdateProperties model = - new DeviceGroupUpdateProperties() - .withDescription("cocmnyyaztt") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.UPDATE_ALL) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU); - model = BinaryData.fromObject(model).toObject(DeviceGroupUpdateProperties.class); - Assertions.assertEquals("cocmnyyaztt", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.UPDATE_ALL, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.DISABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdateTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdateTests.java deleted file mode 100644 index 2fef5ffd910aa..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupUpdateTests.java +++ /dev/null @@ -1,46 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroupUpdate; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -import org.junit.jupiter.api.Assertions; - -public final class DeviceGroupUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceGroupUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"xdbabphlwr\",\"osFeedType\":\"Retail\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"EU\"}}") - .toObject(DeviceGroupUpdate.class); - Assertions.assertEquals("xdbabphlwr", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceGroupUpdate model = - new DeviceGroupUpdate() - .withDescription("xdbabphlwr") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.NO3RD_PARTY_APP_UPDATES) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.ENABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU); - model = BinaryData.fromObject(model).toObject(DeviceGroupUpdate.class); - Assertions.assertEquals("xdbabphlwr", model.description()); - Assertions.assertEquals(OSFeedType.RETAIL, model.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, model.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, model.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesWithResponseMockTests.java deleted file mode 100644 index cf62cf1fa5eb8..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCountDevicesWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.CountDeviceResponse; -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 DeviceGroupsCountDevicesWithResponseMockTests { - @Test - public void testCountDevicesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":802895356}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CountDeviceResponse response = - manager - .deviceGroups() - .countDevicesWithResponse("sphyoulpjrvxa", "l", "vimjwos", "tx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(802895356, response.value()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateMockTests.java deleted file mode 100644 index cb460507b2e43..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsCreateOrUpdateMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroup; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -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 DeviceGroupsCreateOrUpdateMockTests { - @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\":{\"description\":\"oduhp\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"EU\",\"hasDeployment\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"xqugjhkycubedd\",\"name\":\"ssofwqmzqa\",\"type\":\"krmnjijpxacqqud\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeviceGroup response = - manager - .deviceGroups() - .define("dunyg") - .withExistingProduct("cskfcktqumiekk", "zzikhlyfjhdg", "gge") - .withDescription("idb") - .withOsFeedType(OSFeedType.RETAIL) - .withUpdatePolicy(UpdatePolicy.UPDATE_ALL) - .withAllowCrashDumpsCollection(AllowCrashDumpCollection.DISABLED) - .withRegionalDataBoundary(RegionalDataBoundary.EU) - .create(); - - Assertions.assertEquals("oduhp", response.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, response.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, response.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, response.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.EU, response.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteMockTests.java deleted file mode 100644 index ad74f2a3ce680..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsDeleteMockTests.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.sphere.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.sphere.AzureSphereManager; -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 DeviceGroupsDeleteMockTests { - @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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .deviceGroups() - .delete("wczelpci", "elsfeaen", "abfatkl", "dxbjhwuaanozj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetWithResponseMockTests.java deleted file mode 100644 index c15479bbbd942..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsGetWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroup; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -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 DeviceGroupsGetWithResponseMockTests { - @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\":\"npkukghimdblx\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Accepted\"},\"id\":\"szkkfoqre\",\"name\":\"fkzikfj\",\"type\":\"wneaiv\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeviceGroup response = - manager - .deviceGroups() - .getWithResponse("mtdaa", "gdv", "vgpiohgwxrt", "udxepxgyqagv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("npkukghimdblx", response.description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, response.osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, response.updatePolicy()); - Assertions.assertEquals(AllowCrashDumpCollection.ENABLED, response.allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductMockTests.java deleted file mode 100644 index a5388dfb9b504..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceGroupsListByProductMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroup; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -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 DeviceGroupsListByProductMockTests { - @Test - public void testListByProduct() 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\":\"ggxkallatmelwuip\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"No3rdPartyAppUpdates\",\"allowCrashDumpsCollection\":\"Enabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":false,\"provisioningState\":\"Accepted\"},\"id\":\"nayrhyrnxxmueedn\",\"name\":\"rdvstkwqqtch\",\"type\":\"alm\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .deviceGroups() - .listByProduct( - "tdtbnnhadooc", - "kvci", - "hnvpamqgxq", - "u", - 1862318440, - 443622503, - 1817330156, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ggxkallatmelwuip", response.iterator().next().description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, response.iterator().next().osFeedType()); - Assertions.assertEquals(UpdatePolicy.NO3RD_PARTY_APP_UPDATES, response.iterator().next().updatePolicy()); - Assertions - .assertEquals(AllowCrashDumpCollection.ENABLED, response.iterator().next().allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.iterator().next().regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInnerTests.java deleted file mode 100644 index e7cd923a440ba..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceInner; -import org.junit.jupiter.api.Assertions; - -public final class DeviceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceInner model = - BinaryData - .fromString( - "{\"properties\":{\"deviceId\":\"wutttxfvjrbi\",\"chipSku\":\"hxepcyvahfnlj\",\"lastAvailableOsVersion\":\"qxj\",\"lastInstalledOsVersion\":\"ujqgidok\",\"lastOsUpdateUtc\":\"2021-09-28T11:40:31Z\",\"lastUpdateRequestUtc\":\"2021-11-13T00:56:49Z\",\"provisioningState\":\"Accepted\"},\"id\":\"gvcl\",\"name\":\"bgsncghkjeszzhb\",\"type\":\"jhtxfvgxbfsmxne\"}") - .toObject(DeviceInner.class); - Assertions.assertEquals("wutttxfvjrbi", model.deviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceInner model = new DeviceInner().withDeviceId("wutttxfvjrbi"); - model = BinaryData.fromObject(model).toObject(DeviceInner.class); - Assertions.assertEquals("wutttxfvjrbi", model.deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInsightInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInsightInnerTests.java deleted file mode 100644 index 3241802fb0647..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceInsightInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class DeviceInsightInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceInsightInner model = - BinaryData - .fromString( - "{\"deviceId\":\"eggzfb\",\"description\":\"hfmvfaxkffe\",\"startTimestampUtc\":\"2021-04-21T05:15:54Z\",\"endTimestampUtc\":\"2021-05-15T04:16:32Z\",\"eventCategory\":\"hl\",\"eventClass\":\"m\",\"eventType\":\"zy\",\"eventCount\":2122365511}") - .toObject(DeviceInsightInner.class); - Assertions.assertEquals("eggzfb", model.deviceId()); - Assertions.assertEquals("hfmvfaxkffe", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T05:15:54Z"), model.startTimestampUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T04:16:32Z"), model.endTimestampUtc()); - Assertions.assertEquals("hl", model.eventCategory()); - Assertions.assertEquals("m", model.eventClass()); - Assertions.assertEquals("zy", model.eventType()); - Assertions.assertEquals(2122365511, model.eventCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceInsightInner model = - new DeviceInsightInner() - .withDeviceId("eggzfb") - .withDescription("hfmvfaxkffe") - .withStartTimestampUtc(OffsetDateTime.parse("2021-04-21T05:15:54Z")) - .withEndTimestampUtc(OffsetDateTime.parse("2021-05-15T04:16:32Z")) - .withEventCategory("hl") - .withEventClass("m") - .withEventType("zy") - .withEventCount(2122365511); - model = BinaryData.fromObject(model).toObject(DeviceInsightInner.class); - Assertions.assertEquals("eggzfb", model.deviceId()); - Assertions.assertEquals("hfmvfaxkffe", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T05:15:54Z"), model.startTimestampUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T04:16:32Z"), model.endTimestampUtc()); - Assertions.assertEquals("hl", model.eventCategory()); - Assertions.assertEquals("m", model.eventClass()); - Assertions.assertEquals("zy", model.eventType()); - Assertions.assertEquals(2122365511, model.eventCount()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceListResultTests.java deleted file mode 100644 index 0fb84591ce8b2..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceListResultTests.java +++ /dev/null @@ -1,41 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceInner; -import com.azure.resourcemanager.sphere.models.DeviceListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeviceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"deviceId\":\"zsbbzoggigrxwb\",\"chipSku\":\"vjxxjnsp\",\"lastAvailableOsVersion\":\"ptkoenkoukn\",\"lastInstalledOsVersion\":\"dwtiukbldngkp\",\"lastOsUpdateUtc\":\"2021-05-04T07:17:38Z\",\"lastUpdateRequestUtc\":\"2021-05-19T00:57:25Z\",\"provisioningState\":\"Canceled\"},\"id\":\"xoegukgjnpiucgy\",\"name\":\"evqzntypmrbp\",\"type\":\"zcdrqjsdpydnfyhx\"},{\"properties\":{\"deviceId\":\"ejzicwifsjtt\",\"chipSku\":\"fbishcbkha\",\"lastAvailableOsVersion\":\"eyeam\",\"lastInstalledOsVersion\":\"hagalpbuxwgipwh\",\"lastOsUpdateUtc\":\"2021-04-24T13:32:45Z\",\"lastUpdateRequestUtc\":\"2021-08-18T16:08:42Z\",\"provisioningState\":\"Deleting\"},\"id\":\"hwankixzbinjepu\",\"name\":\"tmryw\",\"type\":\"uzoqft\"},{\"properties\":{\"deviceId\":\"zrnkcqvyxlwh\",\"chipSku\":\"sicohoqqnwvlry\",\"lastAvailableOsVersion\":\"w\",\"lastInstalledOsVersion\":\"eun\",\"lastOsUpdateUtc\":\"2021-02-20T01:45:10Z\",\"lastUpdateRequestUtc\":\"2021-10-16T07:10:15Z\",\"provisioningState\":\"Canceled\"},\"id\":\"zko\",\"name\":\"ocukoklyax\",\"type\":\"conuqszfkbeype\"},{\"properties\":{\"deviceId\":\"jmwvvj\",\"chipSku\":\"tcxsenhwlrs\",\"lastAvailableOsVersion\":\"rzpwvlqdqgbiq\",\"lastInstalledOsVersion\":\"ihkaetcktvfc\",\"lastOsUpdateUtc\":\"2021-07-13T01:18:13Z\",\"lastUpdateRequestUtc\":\"2021-09-20T06:05:50Z\",\"provisioningState\":\"Provisioning\"},\"id\":\"m\",\"name\":\"ctq\",\"type\":\"jf\"}],\"nextLink\":\"brjcxe\"}") - .toObject(DeviceListResult.class); - Assertions.assertEquals("zsbbzoggigrxwb", model.value().get(0).deviceId()); - Assertions.assertEquals("brjcxe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceListResult model = - new DeviceListResult() - .withValue( - Arrays - .asList( - new DeviceInner().withDeviceId("zsbbzoggigrxwb"), - new DeviceInner().withDeviceId("ejzicwifsjtt"), - new DeviceInner().withDeviceId("zrnkcqvyxlwh"), - new DeviceInner().withDeviceId("jmwvvj"))) - .withNextLink("brjcxe"); - model = BinaryData.fromObject(model).toObject(DeviceListResult.class); - Assertions.assertEquals("zsbbzoggigrxwb", model.value().get(0).deviceId()); - Assertions.assertEquals("brjcxe", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicePropertiesTests.java deleted file mode 100644 index 20be7d4c930e1..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicePropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceProperties; -import org.junit.jupiter.api.Assertions; - -public final class DevicePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceProperties model = - BinaryData - .fromString( - "{\"deviceId\":\"pvecxgodeb\",\"chipSku\":\"kk\",\"lastAvailableOsVersion\":\"mpukgriw\",\"lastInstalledOsVersion\":\"zlfbxzpuzycispnq\",\"lastOsUpdateUtc\":\"2021-11-25T03:44:38Z\",\"lastUpdateRequestUtc\":\"2021-01-22T12:22:34Z\",\"provisioningState\":\"Succeeded\"}") - .toObject(DeviceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.deviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceProperties model = new DeviceProperties().withDeviceId("pvecxgodeb"); - model = BinaryData.fromObject(model).toObject(DeviceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdatePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdatePropertiesTests.java deleted file mode 100644 index 3422ec72cc78d..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdatePropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class DeviceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceUpdateProperties model = - BinaryData.fromString("{\"deviceGroupId\":\"swzts\"}").toObject(DeviceUpdateProperties.class); - Assertions.assertEquals("swzts", model.deviceGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceUpdateProperties model = new DeviceUpdateProperties().withDeviceGroupId("swzts"); - model = BinaryData.fromObject(model).toObject(DeviceUpdateProperties.class); - Assertions.assertEquals("swzts", model.deviceGroupId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdateTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdateTests.java deleted file mode 100644 index c79fa66c09ae7..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DeviceUpdateTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.DeviceUpdate; -import org.junit.jupiter.api.Assertions; - -public final class DeviceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceUpdate model = - BinaryData.fromString("{\"properties\":{\"deviceGroupId\":\"rhdwbavxbniw\"}}").toObject(DeviceUpdate.class); - Assertions.assertEquals("rhdwbavxbniw", model.deviceGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceUpdate model = new DeviceUpdate().withDeviceGroupId("rhdwbavxbniw"); - model = BinaryData.fromObject(model).toObject(DeviceUpdate.class); - Assertions.assertEquals("rhdwbavxbniw", model.deviceGroupId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateMockTests.java deleted file mode 100644 index 520346241d37c..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesCreateOrUpdateMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Device; -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 DevicesCreateOrUpdateMockTests { - @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\":{\"deviceId\":\"wijnh\",\"chipSku\":\"svfycxzbfv\",\"lastAvailableOsVersion\":\"wvrvmtg\",\"lastInstalledOsVersion\":\"ppyostronzmyhgf\",\"lastOsUpdateUtc\":\"2021-12-09T16:00:11Z\",\"lastUpdateRequestUtc\":\"2021-05-13T00:47:52Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"cwaekrrjre\",\"name\":\"fxtsgum\",\"type\":\"jglikkxwslolb\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Device response = - manager - .devices() - .define("vblm") - .withExistingDeviceGroup("mfiibfggj", "ool", "rwxkvtkkgl", "qwjygvja") - .withDeviceId("zuhbxvvyhgsopb") - .create(); - - Assertions.assertEquals("wijnh", response.deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteMockTests.java deleted file mode 100644 index b8d82fa33e5b1..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesDeleteMockTests.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.sphere.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.sphere.AzureSphereManager; -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 DevicesDeleteMockTests { - @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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .devices() - .delete("ob", "pg", "edkowepbqpcrfk", "wccsnjvcdwxlpqek", "tn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageMockTests.java deleted file mode 100644 index a860a2190fcb6..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGenerateCapabilityImageMockTests.java +++ /dev/null @@ -1,81 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.CapabilityType; -import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; -import com.azure.resourcemanager.sphere.models.SignedCapabilityImageResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -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 DevicesGenerateCapabilityImageMockTests { - @Test - public void testGenerateCapabilityImage() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"image\":\"qqaatjinrvgou\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SignedCapabilityImageResponse response = - manager - .devices() - .generateCapabilityImage( - "htjsying", - "fq", - "tmtdhtmdvypgik", - "gszywk", - "irryuzhlh", - new GenerateCapabilityImageRequest() - .withCapabilities( - Arrays - .asList( - CapabilityType.FIELD_SERVICING, - CapabilityType.APPLICATION_DEVELOPMENT, - CapabilityType.APPLICATION_DEVELOPMENT)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGetWithResponseMockTests.java deleted file mode 100644 index bbe62979f7baf..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesGetWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Device; -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 DevicesGetWithResponseMockTests { - @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\":{\"deviceId\":\"ygz\",\"chipSku\":\"dnkfx\",\"lastAvailableOsVersion\":\"emdwzrmuhapfc\",\"lastInstalledOsVersion\":\"psqxq\",\"lastOsUpdateUtc\":\"2021-08-14T15:35:59Z\",\"lastUpdateRequestUtc\":\"2021-05-20T12:44:27Z\",\"provisioningState\":\"Canceled\"},\"id\":\"mgccelvezrypq\",\"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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Device response = - manager - .devices() - .getWithResponse( - "amvdkfwynwcvtbv", - "ayhmtnvyqiatkz", - "pcnp", - "zcjaesgvvsccy", - "jguq", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ygz", response.deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupMockTests.java deleted file mode 100644 index 4d4bb7c5ec89d..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/DevicesListByDeviceGroupMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Device; -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 DevicesListByDeviceGroupMockTests { - @Test - public void testListByDeviceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"deviceId\":\"spughftqsxhq\",\"chipSku\":\"j\",\"lastAvailableOsVersion\":\"kndxdigrjgu\",\"lastInstalledOsVersion\":\"zdmsyqtfi\",\"lastOsUpdateUtc\":\"2020-12-25T23:20:44Z\",\"lastUpdateRequestUtc\":\"2021-09-23T10:33:57Z\",\"provisioningState\":\"Updating\"},\"id\":\"ingamvp\",\"name\":\"ho\",\"type\":\"zqzudph\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .devices() - .listByDeviceGroup( - "qmqhldvriii", "jnalghf", "vtvsexsowueluq", "hahhxvrhmzkwpj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("spughftqsxhq", response.iterator().next().deviceId()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/GenerateCapabilityImageRequestTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/GenerateCapabilityImageRequestTests.java deleted file mode 100644 index 94189e9c6adc7..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/GenerateCapabilityImageRequestTests.java +++ /dev/null @@ -1,31 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.CapabilityType; -import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GenerateCapabilityImageRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GenerateCapabilityImageRequest model = - BinaryData - .fromString("{\"capabilities\":[\"ApplicationDevelopment\"]}") - .toObject(GenerateCapabilityImageRequest.class); - Assertions.assertEquals(CapabilityType.APPLICATION_DEVELOPMENT, model.capabilities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GenerateCapabilityImageRequest model = - new GenerateCapabilityImageRequest() - .withCapabilities(Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)); - model = BinaryData.fromObject(model).toObject(GenerateCapabilityImageRequest.class); - Assertions.assertEquals(CapabilityType.APPLICATION_DEVELOPMENT, model.capabilities().get(0)); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageInnerTests.java deleted file mode 100644 index f234938a021bc..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageInnerTests.java +++ /dev/null @@ -1,37 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import org.junit.jupiter.api.Assertions; - -public final class ImageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageInner model = - BinaryData - .fromString( - "{\"properties\":{\"image\":\"mbe\",\"imageId\":\"pbhtqqrolfpfpsa\",\"imageName\":\"bquxigjy\",\"regionalDataBoundary\":\"EU\",\"uri\":\"aoyfhrtxilnerkuj\",\"description\":\"vlejuvfqa\",\"componentId\":\"lyxwjkcprbnwbx\",\"imageType\":\"OneBl\",\"provisioningState\":\"Provisioning\"},\"id\":\"vpys\",\"name\":\"zdn\",\"type\":\"uj\"}") - .toObject(ImageInner.class); - Assertions.assertEquals("mbe", model.image()); - Assertions.assertEquals("pbhtqqrolfpfpsa", model.imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInner model = - new ImageInner() - .withImage("mbe") - .withImageId("pbhtqqrolfpfpsa") - .withRegionalDataBoundary(RegionalDataBoundary.EU); - model = BinaryData.fromObject(model).toObject(ImageInner.class); - Assertions.assertEquals("mbe", model.image()); - Assertions.assertEquals("pbhtqqrolfpfpsa", model.imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageListResultTests.java deleted file mode 100644 index 1178f1b98e760..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImageListResultTests.java +++ /dev/null @@ -1,54 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ImageInner; -import com.azure.resourcemanager.sphere.models.ImageListResult; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"image\":\"duuji\",\"imageId\":\"jczdzevndh\",\"imageName\":\"wpdappdsbdkv\",\"regionalDataBoundary\":\"EU\",\"uri\":\"feusnhut\",\"description\":\"ltmrldh\",\"componentId\":\"jzzd\",\"imageType\":\"Services\",\"provisioningState\":\"Provisioning\"},\"id\":\"oc\",\"name\":\"geablgphuticndvk\",\"type\":\"ozwyiftyhxhuro\"},{\"properties\":{\"image\":\"yxolniwp\",\"imageId\":\"ukjfkgiawxklr\",\"imageName\":\"lwckbasyypnddhs\",\"regionalDataBoundary\":\"EU\",\"uri\":\"cph\",\"description\":\"koty\",\"componentId\":\"gou\",\"imageType\":\"UpdateCertStore\",\"provisioningState\":\"Accepted\"},\"id\":\"i\",\"name\":\"wyqkgfgibm\",\"type\":\"dgak\"},{\"properties\":{\"image\":\"rxybz\",\"imageId\":\"e\",\"imageName\":\"ytb\",\"regionalDataBoundary\":\"None\",\"uri\":\"ouf\",\"description\":\"mnkzsmod\",\"componentId\":\"lougpbkw\",\"imageType\":\"ManifestSet\",\"provisioningState\":\"Failed\"},\"id\":\"uqktap\",\"name\":\"pwgcuertu\",\"type\":\"kdosvqw\"}],\"nextLink\":\"mdgbbjfdd\"}") - .toObject(ImageListResult.class); - Assertions.assertEquals("duuji", model.value().get(0).image()); - Assertions.assertEquals("jczdzevndh", model.value().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.value().get(0).regionalDataBoundary()); - Assertions.assertEquals("mdgbbjfdd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageListResult model = - new ImageListResult() - .withValue( - Arrays - .asList( - new ImageInner() - .withImage("duuji") - .withImageId("jczdzevndh") - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new ImageInner() - .withImage("yxolniwp") - .withImageId("ukjfkgiawxklr") - .withRegionalDataBoundary(RegionalDataBoundary.EU), - new ImageInner() - .withImage("rxybz") - .withImageId("e") - .withRegionalDataBoundary(RegionalDataBoundary.NONE))) - .withNextLink("mdgbbjfdd"); - model = BinaryData.fromObject(model).toObject(ImageListResult.class); - Assertions.assertEquals("duuji", model.value().get(0).image()); - Assertions.assertEquals("jczdzevndh", model.value().get(0).imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, model.value().get(0).regionalDataBoundary()); - Assertions.assertEquals("mdgbbjfdd", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagePropertiesTests.java deleted file mode 100644 index 2ccbbac3225ad..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagePropertiesTests.java +++ /dev/null @@ -1,37 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ImageProperties; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import org.junit.jupiter.api.Assertions; - -public final class ImagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageProperties model = - BinaryData - .fromString( - "{\"image\":\"uhmuouqfprwzwbn\",\"imageId\":\"itnwuizgazxufi\",\"imageName\":\"ckyfih\",\"regionalDataBoundary\":\"None\",\"uri\":\"fvzwdzuhty\",\"description\":\"isdkfthwxmnteiw\",\"componentId\":\"pvkmijcmmxdcuf\",\"imageType\":\"FwConfig\",\"provisioningState\":\"Accepted\"}") - .toObject(ImageProperties.class); - Assertions.assertEquals("uhmuouqfprwzwbn", model.image()); - Assertions.assertEquals("itnwuizgazxufi", model.imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageProperties model = - new ImageProperties() - .withImage("uhmuouqfprwzwbn") - .withImageId("itnwuizgazxufi") - .withRegionalDataBoundary(RegionalDataBoundary.NONE); - model = BinaryData.fromObject(model).toObject(ImageProperties.class); - Assertions.assertEquals("uhmuouqfprwzwbn", model.image()); - Assertions.assertEquals("itnwuizgazxufi", model.imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, model.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateMockTests.java deleted file mode 100644 index f4ae052642594..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesCreateOrUpdateMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Image; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 ImagesCreateOrUpdateMockTests { - @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\":{\"image\":\"smond\",\"imageId\":\"quxvypomgkop\",\"imageName\":\"hojvpajqgxysmocm\",\"regionalDataBoundary\":\"None\",\"uri\":\"vmkcx\",\"description\":\"apvhelxprgly\",\"componentId\":\"dd\",\"imageType\":\"InvalidImageType\",\"provisioningState\":\"Succeeded\"},\"id\":\"uejrjxgc\",\"name\":\"qibrhosxsdqrhzoy\",\"type\":\"i\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Image response = - manager - .images() - .define("ld") - .withExistingCatalog("sotbob", "dopcjwvnh") - .withImage("xcxrsl") - .withImageId("utwu") - .withRegionalDataBoundary(RegionalDataBoundary.NONE) - .create(); - - Assertions.assertEquals("smond", response.image()); - Assertions.assertEquals("quxvypomgkop", response.imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteMockTests.java deleted file mode 100644 index f240ed4fe1e8c..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesDeleteMockTests.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.sphere.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.sphere.AzureSphereManager; -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 ImagesDeleteMockTests { - @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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.images().delete("apnedgfbcvkc", "q", "pkeqdcvdrhvoo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesGetWithResponseMockTests.java deleted file mode 100644 index 42ed4f7bc3cee..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Image; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 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\":{\"image\":\"clvit\",\"imageId\":\"qzonosggbhcohf\",\"imageName\":\"sjnkal\",\"regionalDataBoundary\":\"EU\",\"uri\":\"iswac\",\"description\":\"gdkz\",\"componentId\":\"wkfvhqcrailvp\",\"imageType\":\"UpdateCertStore\",\"provisioningState\":\"Succeeded\"},\"id\":\"flrwd\",\"name\":\"hdlxyjrxsagafcn\",\"type\":\"hgw\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Image response = - manager - .images() - .getWithResponse("fgohdneuelfphs", "yhtozfikdowwqu", "v", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("clvit", response.image()); - Assertions.assertEquals("qzonosggbhcohf", response.imageId()); - Assertions.assertEquals(RegionalDataBoundary.EU, response.regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogMockTests.java deleted file mode 100644 index 7ca2213eed516..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ImagesListByCatalogMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Image; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -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 ImagesListByCatalogMockTests { - @Test - public void testListByCatalog() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"image\":\"xbxwa\",\"imageId\":\"ogqxndlkzgxhuri\",\"imageName\":\"bpodxunkbebxm\",\"regionalDataBoundary\":\"None\",\"uri\":\"ntwlrbqtkoie\",\"description\":\"eotg\",\"componentId\":\"l\",\"imageType\":\"RecoveryManifest\",\"provisioningState\":\"Canceled\"},\"id\":\"lauwzizxbmpgcjef\",\"name\":\"zmuvpbttdumorppx\",\"type\":\"bmnzbtbhjpgl\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .images() - .listByCatalog( - "dltfz", - "mhhv", - "gureodkwobdag", - 933543231, - 1861593827, - 1583051460, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xbxwa", response.iterator().next().image()); - Assertions.assertEquals("ogqxndlkzgxhuri", response.iterator().next().imageId()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.iterator().next().regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ListDeviceGroupsRequestTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ListDeviceGroupsRequestTests.java deleted file mode 100644 index 388386523a1c7..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ListDeviceGroupsRequestTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest; -import org.junit.jupiter.api.Assertions; - -public final class ListDeviceGroupsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListDeviceGroupsRequest model = - BinaryData.fromString("{\"deviceGroupName\":\"yexfwh\"}").toObject(ListDeviceGroupsRequest.class); - Assertions.assertEquals("yexfwh", model.deviceGroupName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListDeviceGroupsRequest model = new ListDeviceGroupsRequest().withDeviceGroupName("yexfwh"); - model = BinaryData.fromObject(model).toObject(ListDeviceGroupsRequest.class); - Assertions.assertEquals("yexfwh", model.deviceGroupName()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationDisplayTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationDisplayTests.java deleted file mode 100644 index 7b49a47063ce6..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationInnerTests.java deleted file mode 100644 index 2440972f8cc6f..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.OperationInner; -import com.azure.resourcemanager.sphere.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationListResultTests.java deleted file mode 100644 index 1e4a38ab5f2e8..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationsListMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/OperationsListMockTests.java deleted file mode 100644 index b2433e37aaf2f..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.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\":\"xbzpfzab\",\"isDataAction\":false,\"display\":{\"provider\":\"xwtctyqiklbbovpl\",\"resource\":\"bhvgy\",\"operation\":\"uosvmkfssxqukk\",\"description\":\"l\"},\"origin\":\"user,system\",\"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); - })); - - AzureSphereManager manager = - AzureSphereManager - .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/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/PagedDeviceInsightTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/PagedDeviceInsightTests.java deleted file mode 100644 index dbef79838d8f0..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/PagedDeviceInsightTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner; -import com.azure.resourcemanager.sphere.models.PagedDeviceInsight; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PagedDeviceInsightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PagedDeviceInsight model = - BinaryData - .fromString( - "{\"value\":[{\"deviceId\":\"w\",\"description\":\"hzdobpxjmflbvvnc\",\"startTimestampUtc\":\"2021-11-01T14:14:41Z\",\"endTimestampUtc\":\"2021-05-23T11:48:05Z\",\"eventCategory\":\"cciw\",\"eventClass\":\"zjuqkhrsaj\",\"eventType\":\"wkuofoskghsauu\",\"eventCount\":2118838793},{\"deviceId\":\"jmvxie\",\"description\":\"uugidyjrrfby\",\"startTimestampUtc\":\"2021-09-15T05:38:02Z\",\"endTimestampUtc\":\"2021-05-02T14:53:40Z\",\"eventCategory\":\"v\",\"eventClass\":\"xc\",\"eventType\":\"onpc\",\"eventCount\":316608134}],\"nextLink\":\"cohslkev\"}") - .toObject(PagedDeviceInsight.class); - Assertions.assertEquals("w", model.value().get(0).deviceId()); - Assertions.assertEquals("hzdobpxjmflbvvnc", model.value().get(0).description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T14:14:41Z"), model.value().get(0).startTimestampUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T11:48:05Z"), model.value().get(0).endTimestampUtc()); - Assertions.assertEquals("cciw", model.value().get(0).eventCategory()); - Assertions.assertEquals("zjuqkhrsaj", model.value().get(0).eventClass()); - Assertions.assertEquals("wkuofoskghsauu", model.value().get(0).eventType()); - Assertions.assertEquals(2118838793, model.value().get(0).eventCount()); - Assertions.assertEquals("cohslkev", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PagedDeviceInsight model = - new PagedDeviceInsight() - .withValue( - Arrays - .asList( - new DeviceInsightInner() - .withDeviceId("w") - .withDescription("hzdobpxjmflbvvnc") - .withStartTimestampUtc(OffsetDateTime.parse("2021-11-01T14:14:41Z")) - .withEndTimestampUtc(OffsetDateTime.parse("2021-05-23T11:48:05Z")) - .withEventCategory("cciw") - .withEventClass("zjuqkhrsaj") - .withEventType("wkuofoskghsauu") - .withEventCount(2118838793), - new DeviceInsightInner() - .withDeviceId("jmvxie") - .withDescription("uugidyjrrfby") - .withStartTimestampUtc(OffsetDateTime.parse("2021-09-15T05:38:02Z")) - .withEndTimestampUtc(OffsetDateTime.parse("2021-05-02T14:53:40Z")) - .withEventCategory("v") - .withEventClass("xc") - .withEventType("onpc") - .withEventCount(316608134))) - .withNextLink("cohslkev"); - model = BinaryData.fromObject(model).toObject(PagedDeviceInsight.class); - Assertions.assertEquals("w", model.value().get(0).deviceId()); - Assertions.assertEquals("hzdobpxjmflbvvnc", model.value().get(0).description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T14:14:41Z"), model.value().get(0).startTimestampUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T11:48:05Z"), model.value().get(0).endTimestampUtc()); - Assertions.assertEquals("cciw", model.value().get(0).eventCategory()); - Assertions.assertEquals("zjuqkhrsaj", model.value().get(0).eventClass()); - Assertions.assertEquals("wkuofoskghsauu", model.value().get(0).eventType()); - Assertions.assertEquals(2118838793, model.value().get(0).eventCount()); - Assertions.assertEquals("cohslkev", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductInnerTests.java deleted file mode 100644 index 7080cd4500841..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ProductInner; -import org.junit.jupiter.api.Assertions; - -public final class ProductInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"pnazzm\",\"provisioningState\":\"Updating\"},\"id\":\"unmpxttd\",\"name\":\"hrbnlankxmyskpbh\",\"type\":\"nbtkcxywnytnr\"}") - .toObject(ProductInner.class); - Assertions.assertEquals("pnazzm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductInner model = new ProductInner().withDescription("pnazzm"); - model = BinaryData.fromObject(model).toObject(ProductInner.class); - Assertions.assertEquals("pnazzm", model.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductListResultTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductListResultTests.java deleted file mode 100644 index d3e581055b777..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductListResultTests.java +++ /dev/null @@ -1,35 +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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ProductInner; -import com.azure.resourcemanager.sphere.models.ProductListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProductListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"yydhibnuqqk\",\"provisioningState\":\"Accepted\"},\"id\":\"a\",\"name\":\"rgvtqag\",\"type\":\"buynhijggm\"}],\"nextLink\":\"fsiarbutr\"}") - .toObject(ProductListResult.class); - Assertions.assertEquals("yydhibnuqqk", model.value().get(0).description()); - Assertions.assertEquals("fsiarbutr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductListResult model = - new ProductListResult() - .withValue(Arrays.asList(new ProductInner().withDescription("yydhibnuqqk"))) - .withNextLink("fsiarbutr"); - model = BinaryData.fromObject(model).toObject(ProductListResult.class); - Assertions.assertEquals("yydhibnuqqk", model.value().get(0).description()); - Assertions.assertEquals("fsiarbutr", model.nextLink()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductPropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductPropertiesTests.java deleted file mode 100644 index f87b202e7bc39..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductPropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ProductProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProductPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductProperties model = - BinaryData - .fromString("{\"description\":\"yn\",\"provisioningState\":\"Provisioning\"}") - .toObject(ProductProperties.class); - Assertions.assertEquals("yn", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductProperties model = new ProductProperties().withDescription("yn"); - model = BinaryData.fromObject(model).toObject(ProductProperties.class); - Assertions.assertEquals("yn", model.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdatePropertiesTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdatePropertiesTests.java deleted file mode 100644 index 5343929ecb72f..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdatePropertiesTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ProductUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProductUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductUpdateProperties model = - BinaryData.fromString("{\"description\":\"zfcl\"}").toObject(ProductUpdateProperties.class); - Assertions.assertEquals("zfcl", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductUpdateProperties model = new ProductUpdateProperties().withDescription("zfcl"); - model = BinaryData.fromObject(model).toObject(ProductUpdateProperties.class); - Assertions.assertEquals("zfcl", model.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdateTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdateTests.java deleted file mode 100644 index 0334345eb6613..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductUpdateTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.ProductUpdate; -import org.junit.jupiter.api.Assertions; - -public final class ProductUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductUpdate model = - BinaryData.fromString("{\"properties\":{\"description\":\"by\"}}").toObject(ProductUpdate.class); - Assertions.assertEquals("by", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductUpdate model = new ProductUpdate().withDescription("by"); - model = BinaryData.fromObject(model).toObject(ProductUpdate.class); - Assertions.assertEquals("by", model.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesWithResponseMockTests.java deleted file mode 100644 index cd4aee8357873..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCountDevicesWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.CountDeviceResponse; -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 ProductsCountDevicesWithResponseMockTests { - @Test - public void testCountDevicesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":1309534736}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CountDeviceResponse response = - manager - .products() - .countDevicesWithResponse("syrsndsytgadgvra", "aeneqnzarrwl", "uu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(1309534736, response.value()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateMockTests.java deleted file mode 100644 index a8a1ec3e7089c..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsCreateOrUpdateMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Product; -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 ProductsCreateOrUpdateMockTests { - @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\":{\"description\":\"orgjhxbldt\",\"provisioningState\":\"Succeeded\"},\"id\":\"rlkdmtncvokotl\",\"name\":\"xdy\",\"type\":\"gsyocogj\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Product response = - manager - .products() - .define("ox") - .withExistingCatalog("swsrms", "yzrpzbchckqqzq") - .withDescription("suiizynkedyat") - .create(); - - Assertions.assertEquals("orgjhxbldt", response.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteMockTests.java deleted file mode 100644 index 4348987e39942..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsDeleteMockTests.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.sphere.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.sphere.AzureSphereManager; -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 ProductsDeleteMockTests { - @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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.products().delete("dlpichkoymkcdyhb", "kkpwdreqnovvq", "ovljxywsu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsMockTests.java deleted file mode 100644 index 837c76e3e7b04..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGenerateDefaultDeviceGroupsMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection; -import com.azure.resourcemanager.sphere.models.DeviceGroup; -import com.azure.resourcemanager.sphere.models.OSFeedType; -import com.azure.resourcemanager.sphere.models.RegionalDataBoundary; -import com.azure.resourcemanager.sphere.models.UpdatePolicy; -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 ProductsGenerateDefaultDeviceGroupsMockTests { - @Test - public void testGenerateDefaultDeviceGroups() 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\":\"wifto\",\"osFeedType\":\"RetailEval\",\"updatePolicy\":\"UpdateAll\",\"allowCrashDumpsCollection\":\"Disabled\",\"regionalDataBoundary\":\"None\",\"hasDeployment\":true,\"provisioningState\":\"Failed\"},\"id\":\"aknynfsynljphuop\",\"name\":\"odlqiyntor\",\"type\":\"ihleos\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.products().generateDefaultDeviceGroups("fqka", "e", "iipfpubj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wifto", response.iterator().next().description()); - Assertions.assertEquals(OSFeedType.RETAIL_EVAL, response.iterator().next().osFeedType()); - Assertions.assertEquals(UpdatePolicy.UPDATE_ALL, response.iterator().next().updatePolicy()); - Assertions - .assertEquals(AllowCrashDumpCollection.DISABLED, response.iterator().next().allowCrashDumpsCollection()); - Assertions.assertEquals(RegionalDataBoundary.NONE, response.iterator().next().regionalDataBoundary()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGetWithResponseMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGetWithResponseMockTests.java deleted file mode 100644 index f8137c9e85dca..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsGetWithResponseMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Product; -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 ProductsGetWithResponseMockTests { - @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\":\"asipqiio\",\"provisioningState\":\"Accepted\"},\"id\":\"qerpqlpqwcc\",\"name\":\"uqgbdbutauvfbt\",\"type\":\"uwhhmhykojoxafn\"}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Product response = - manager - .products() - .getWithResponse("nwashrtd", "kcnqxwbpo", "ulpiuj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("asipqiio", response.description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogMockTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogMockTests.java deleted file mode 100644 index 7484fb588ac43..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProductsListByCatalogMockTests.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.sphere.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.sphere.AzureSphereManager; -import com.azure.resourcemanager.sphere.models.Product; -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 ProductsListByCatalogMockTests { - @Test - public void testListByCatalog() 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\":\"wfluszdt\",\"provisioningState\":\"Succeeded\"},\"id\":\"kwofyyvoq\",\"name\":\"cpi\",\"type\":\"xpbtgiwbwo\"}]}"; - - 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); - })); - - AzureSphereManager manager = - AzureSphereManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.products().listByCatalog("m", "qyib", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wfluszdt", response.iterator().next().description()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceRequestTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceRequestTests.java deleted file mode 100644 index 6858ae6e401c7..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceRequestTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest; -import org.junit.jupiter.api.Assertions; - -public final class ProofOfPossessionNonceRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProofOfPossessionNonceRequest model = - BinaryData.fromString("{\"proofOfPossessionNonce\":\"kwt\"}").toObject(ProofOfPossessionNonceRequest.class); - Assertions.assertEquals("kwt", model.proofOfPossessionNonce()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProofOfPossessionNonceRequest model = new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("kwt"); - model = BinaryData.fromObject(model).toObject(ProofOfPossessionNonceRequest.class); - Assertions.assertEquals("kwt", model.proofOfPossessionNonce()); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceResponseInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceResponseInnerTests.java deleted file mode 100644 index 4295b284bcd1d..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/ProofOfPossessionNonceResponseInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner; - -public final class ProofOfPossessionNonceResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProofOfPossessionNonceResponseInner model = - BinaryData - .fromString( - "{\"certificate\":\"xbnjbiksq\",\"status\":\"Inactive\",\"subject\":\"sainqpjwnzl\",\"thumbprint\":\"fmppe\",\"expiryUtc\":\"2021-03-28T22:28:31Z\",\"notBeforeUtc\":\"2021-11-23T16:03:48Z\",\"provisioningState\":\"Provisioning\"}") - .toObject(ProofOfPossessionNonceResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProofOfPossessionNonceResponseInner model = new ProofOfPossessionNonceResponseInner(); - model = BinaryData.fromObject(model).toObject(ProofOfPossessionNonceResponseInner.class); - } -} diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/SignedCapabilityImageResponseInnerTests.java b/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/SignedCapabilityImageResponseInnerTests.java deleted file mode 100644 index 54c09a9375131..0000000000000 --- a/sdk/sphere/azure-resourcemanager-sphere/src/test/java/com/azure/resourcemanager/sphere/generated/SignedCapabilityImageResponseInnerTests.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.sphere.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.sphere.fluent.models.SignedCapabilityImageResponseInner; - -public final class SignedCapabilityImageResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SignedCapabilityImageResponseInner model = - BinaryData.fromString("{\"image\":\"nxytxh\"}").toObject(SignedCapabilityImageResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignedCapabilityImageResponseInner model = new SignedCapabilityImageResponseInner(); - model = BinaryData.fromObject(model).toObject(SignedCapabilityImageResponseInner.class); - } -}