diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 64e4bb508a77..4996a867a1dd 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -452,7 +452,7 @@ com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.1.0;1.2.0
com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;2.0.0;2.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-chaos;1.3.0;1.4.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-sphere;1.1.0;1.2.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-sphere;1.1.0;1.2.0
com.azure.resourcemanager:azure-resourcemanager-defendereasm;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-apicenter;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.1.0;1.2.0-beta.2
diff --git a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
index af53206dfbb3..1a8e6faae31d 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
@@ -1,14 +1,169 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.2.0 (2026-06-04)
-### Features Added
+- Azure Resource Manager Azure Sphere client library for Java. This package contains Microsoft Azure SDK for Azure Sphere Management SDK. Azure Sphere resource management API. Package api-version 2024-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.CountDeviceResponse` was removed
+
+#### `models.ImageListResult` was removed
+
+#### `models.PagedDeviceInsight` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.DeviceGroupListResult` was removed
+
+#### `models.DeploymentListResult` was removed
+
+#### `models.ProductListResult` was removed
+
+#### `models.CatalogListResult` was removed
+
+#### `models.DeviceListResult` was removed
+
+#### `models.DeviceUpdateProperties` was removed
+
+#### `models.DeviceGroupUpdateProperties` was removed
+
+#### `models.ProductUpdateProperties` was removed
+
+#### `models.CertificateListResult` was removed
+
+#### `models.DeviceGroupProperties` was modified
+
+* `validate()` was removed
+
+#### `AzureSphereManager` was modified
+
+* `fluent.AzureSphereMgmtClient serviceClient()` -> `fluent.AzureSphereManagementClient serviceClient()`
+
+#### `models.CatalogUpdate` was modified
+
+* `validate()` was removed
+
+#### `models.DeviceGroup$Update` was modified
+
+* `withProperties(models.DeviceGroupUpdateProperties)` was removed
+
+#### `models.ProofOfPossessionNonceRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DeviceProperties` was modified
+
+* `validate()` was removed
+
+#### `models.CertificateProperties` was modified
+
+* `validate()` was removed
+
+#### `models.Product$Update` was modified
+
+* `withProperties(models.ProductUpdateProperties)` was removed
+
+#### `models.DeviceUpdate` was modified
+
+* `properties()` was removed
+* `withProperties(models.DeviceUpdateProperties)` was removed
+* `validate()` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `validate()` was removed
+
+#### `models.DeploymentProperties` was modified
+
+* `validate()` was removed
+
+#### `models.ListDeviceGroupsRequest` was modified
+
+* `validate()` was removed
+
+#### `models.Device$Update` was modified
+
+* `withProperties(models.DeviceUpdateProperties)` was removed
+
+#### `models.CountElementsResponse` was modified
+
+* `models.CountElementsResponse withValue(int)` -> `models.CountElementsResponse withValue(int)`
+* `validate()` was removed
+
+#### `models.GenerateCapabilityImageRequest` was modified
+
+* `validate()` was removed
+
+#### `models.CatalogProperties` was modified
+
+* `validate()` was removed
+
+#### `models.ProductUpdate` was modified
+
+* `withProperties(models.ProductUpdateProperties)` was removed
+* `validate()` was removed
+* `properties()` was removed
+
+#### `models.ClaimDevicesRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DeviceGroupUpdate` was modified
+
+* `withProperties(models.DeviceGroupUpdateProperties)` was removed
+* `validate()` was removed
+* `properties()` was removed
+
+#### `models.ImageProperties` was modified
+
+* `validate()` was removed
+
+#### `models.ProductProperties` was modified
+
+* `validate()` was removed
+
+### Features Added
+
+#### `models.DeviceGroup$Update` was modified
+
+* `withUpdatePolicy(models.UpdatePolicy)` was added
+* `withAllowCrashDumpsCollection(models.AllowCrashDumpCollection)` was added
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was added
+* `withDescription(java.lang.String)` was added
+* `withOsFeedType(models.OSFeedType)` was added
+
+#### `models.Product$Update` was modified
+
+* `withDescription(java.lang.String)` was added
+
+#### `models.DeviceUpdate` was modified
+
+* `withDeviceGroupId(java.lang.String)` was added
+* `deviceGroupId()` was added
+
+#### `models.Device$Update` was modified
+
+* `withDeviceGroupId(java.lang.String)` was added
+
+#### `models.ProductUpdate` was modified
+
+* `description()` was added
+* `withDescription(java.lang.String)` was added
+
+#### `models.DeviceGroupUpdate` was modified
-### Other Changes
+* `allowCrashDumpsCollection()` was added
+* `withUpdatePolicy(models.UpdatePolicy)` was added
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was added
+* `withOsFeedType(models.OSFeedType)` was added
+* `withAllowCrashDumpsCollection(models.AllowCrashDumpCollection)` was added
+* `withDescription(java.lang.String)` was added
+* `osFeedType()` was added
+* `updatePolicy()` was added
+* `description()` was added
+* `regionalDataBoundary()` was added
## 1.1.0 (2024-12-19)
diff --git a/sdk/sphere/azure-resourcemanager-sphere/README.md b/sdk/sphere/azure-resourcemanager-sphere/README.md
index c83cb85ce457..47bc91d2b735 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/README.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/README.md
@@ -1,8 +1,8 @@
-# Azure Resource Manager AzureSphere client library for Java
+# Azure Resource Manager Azure Sphere client library for Java
-Azure Resource Manager AzureSphere client library for Java.
+Azure Resource Manager Azure Sphere client library for Java.
-This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2024-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Azure Sphere Management SDK. Azure Sphere resource management API. Package api-version 2024-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-sphere
- 1.2.0-beta.1
+ 1.2.0
```
[//]: # ({x-version-update-end})
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ AzureSphereManager manager = AzureSphereManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -107,5 +107,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
index 7327f883c415..ca7f428e62d3 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
@@ -77,9 +77,7 @@
*/
public final class CatalogsCountDevicesSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesCatalog.
- * json
+ * x-ms-original-file: 2024-04-01/PostCountDevicesCatalog.json
*/
/**
* Sample code: Catalogs_CountDevices.
@@ -100,8 +98,7 @@ public final class CatalogsCountDevicesSamples {
*/
public final class CatalogsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutCatalog.json
+ * x-ms-original-file: 2024-04-01/PutCatalog.json
*/
/**
* Sample code: Catalogs_CreateOrUpdate.
@@ -126,8 +123,7 @@ public final class CatalogsCreateOrUpdateSamples {
*/
public final class CatalogsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteCatalog.json
+ * x-ms-original-file: 2024-04-01/DeleteCatalog.json
*/
/**
* Sample code: Catalogs_Delete.
@@ -148,8 +144,7 @@ public final class CatalogsDeleteSamples {
*/
public final class CatalogsGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalog.json
+ * x-ms-original-file: 2024-04-01/GetCatalog.json
*/
/**
* Sample code: Catalogs_Get.
@@ -171,8 +166,7 @@ public final class CatalogsGetByResourceGroupSamples {
*/
public final class CatalogsListSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsSub.json
+ * x-ms-original-file: 2024-04-01/GetCatalogsSub.json
*/
/**
* Sample code: Catalogs_ListBySubscription.
@@ -193,8 +187,7 @@ public final class CatalogsListSamples {
*/
public final class CatalogsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsRG.json
+ * x-ms-original-file: 2024-04-01/GetCatalogsRG.json
*/
/**
* Sample code: Catalogs_ListByResourceGroup.
@@ -215,8 +208,7 @@ public final class CatalogsListByResourceGroupSamples {
*/
public final class CatalogsListDeploymentsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostListDeploymentsByCatalog.json
+ * x-ms-original-file: 2024-04-01/PostListDeploymentsByCatalog.json
*/
/**
* Sample code: Catalogs_ListDeployments.
@@ -241,8 +233,7 @@ import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
*/
public final class CatalogsListDeviceGroupsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostListDeviceGroupsCatalog.json
+ * x-ms-original-file: 2024-04-01/PostListDeviceGroupsCatalog.json
*/
/**
* Sample code: Catalogs_ListDeviceGroups.
@@ -266,8 +257,7 @@ public final class CatalogsListDeviceGroupsSamples {
*/
public final class CatalogsListDeviceInsightsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostListDeviceInsightsCatalog.json
+ * x-ms-original-file: 2024-04-01/PostListDeviceInsightsCatalog.json
*/
/**
* Sample code: Catalogs_ListDeviceInsights.
@@ -290,9 +280,7 @@ public final class CatalogsListDeviceInsightsSamples {
*/
public final class CatalogsListDevicesSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDevicesByCatalog.
- * json
+ * x-ms-original-file: 2024-04-01/PostListDevicesByCatalog.json
*/
/**
* Sample code: Catalogs_ListDevices.
@@ -316,8 +304,7 @@ import com.azure.resourcemanager.sphere.models.Catalog;
*/
public final class CatalogsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchCatalog.json
+ * x-ms-original-file: 2024-04-01/PatchCatalog.json
*/
/**
* Sample code: Catalogs_Update.
@@ -344,9 +331,7 @@ import com.azure.resourcemanager.sphere.models.ImageProperties;
*/
public final class CatalogsUploadImageSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostUploadImageCatalog.
- * json
+ * x-ms-original-file: 2024-04-01/PostUploadImageCatalog.json
*/
/**
* Sample code: Catalogs_UploadImage.
@@ -370,8 +355,7 @@ public final class CatalogsUploadImageSamples {
*/
public final class CertificatesGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificate.json
+ * x-ms-original-file: 2024-04-01/GetCertificate.json
*/
/**
* Sample code: Certificates_Get.
@@ -393,8 +377,7 @@ public final class CertificatesGetSamples {
*/
public final class CertificatesListByCatalogSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificates.json
+ * x-ms-original-file: 2024-04-01/GetCertificates.json
*/
/**
* Sample code: Certificates_ListByCatalog.
@@ -416,8 +399,7 @@ public final class CertificatesListByCatalogSamples {
*/
public final class CertificatesRetrieveCertChainSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostRetrieveCatalogCertChain.json
+ * x-ms-original-file: 2024-04-01/PostRetrieveCatalogCertChain.json
*/
/**
* Sample code: Certificates_RetrieveCertChain.
@@ -442,8 +424,7 @@ import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest;
*/
public final class CertificatesRetrieveProofOfPossessionNonceSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostRetrieveProofOfPossessionNonce.json
+ * x-ms-original-file: 2024-04-01/PostRetrieveProofOfPossessionNonce.json
*/
/**
* Sample code: Certificates_RetrieveProofOfPossessionNonce.
@@ -468,8 +449,7 @@ public final class CertificatesRetrieveProofOfPossessionNonceSamples {
*/
public final class DeploymentsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeployment.json
+ * x-ms-original-file: 2024-04-01/PutDeployment.json
*/
/**
* Sample code: Deployments_CreateOrUpdate.
@@ -493,8 +473,7 @@ public final class DeploymentsCreateOrUpdateSamples {
*/
public final class DeploymentsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeployment.json
+ * x-ms-original-file: 2024-04-01/DeleteDeployment.json
*/
/**
* Sample code: Deployments_Delete.
@@ -517,8 +496,7 @@ public final class DeploymentsDeleteSamples {
*/
public final class DeploymentsGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployment.json
+ * x-ms-original-file: 2024-04-01/GetDeployment.json
*/
/**
* Sample code: Deployments_Get.
@@ -541,8 +519,7 @@ public final class DeploymentsGetSamples {
*/
public final class DeploymentsListByDeviceGroupSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployments.json
+ * x-ms-original-file: 2024-04-01/GetDeployments.json
*/
/**
* Sample code: Deployments_ListByDeviceGroup.
@@ -568,8 +545,7 @@ import java.util.Arrays;
*/
public final class DeviceGroupsClaimDevicesSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostClaimDevices.json
+ * x-ms-original-file: 2024-04-01/PostClaimDevices.json
*/
/**
* Sample code: DeviceGroups_ClaimDevices.
@@ -594,8 +570,7 @@ public final class DeviceGroupsClaimDevicesSamples {
*/
public final class DeviceGroupsCountDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostCountDevicesDeviceGroup.json
+ * x-ms-original-file: 2024-04-01/PostCountDevicesDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_CountDevices.
@@ -622,8 +597,7 @@ import com.azure.resourcemanager.sphere.models.UpdatePolicy;
*/
public final class DeviceGroupsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeviceGroup.json
+ * x-ms-original-file: 2024-04-01/PutDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_CreateOrUpdate.
@@ -650,8 +624,7 @@ public final class DeviceGroupsCreateOrUpdateSamples {
*/
public final class DeviceGroupsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeviceGroup.json
+ * x-ms-original-file: 2024-04-01/DeleteDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Delete.
@@ -673,8 +646,7 @@ public final class DeviceGroupsDeleteSamples {
*/
public final class DeviceGroupsGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroup.json
+ * x-ms-original-file: 2024-04-01/GetDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Get.
@@ -697,8 +669,7 @@ public final class DeviceGroupsGetSamples {
*/
public final class DeviceGroupsListByProductSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroups.json
+ * x-ms-original-file: 2024-04-01/GetDeviceGroups.json
*/
/**
* Sample code: DeviceGroups_ListByProduct.
@@ -723,8 +694,7 @@ import com.azure.resourcemanager.sphere.models.DeviceGroup;
*/
public final class DeviceGroupsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDeviceGroup.json
+ * x-ms-original-file: 2024-04-01/PatchDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Update.
@@ -749,8 +719,7 @@ public final class DeviceGroupsUpdateSamples {
*/
public final class DevicesCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDevice.json
+ * x-ms-original-file: 2024-04-01/PutDevice.json
*/
/**
* Sample code: Devices_CreateOrUpdate.
@@ -775,8 +744,7 @@ public final class DevicesCreateOrUpdateSamples {
*/
public final class DevicesDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDevice.json
+ * x-ms-original-file: 2024-04-01/DeleteDevice.json
*/
/**
* Sample code: Devices_Delete.
@@ -804,8 +772,7 @@ import java.util.Arrays;
*/
public final class DevicesGenerateCapabilityImageSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostGenerateDeviceCapabilityImage.json
+ * x-ms-original-file: 2024-04-01/PostGenerateDeviceCapabilityImage.json
*/
/**
* Sample code: Devices_GenerateCapabilityImage.
@@ -831,8 +798,7 @@ public final class DevicesGenerateCapabilityImageSamples {
*/
public final class DevicesGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevice.json
+ * x-ms-original-file: 2024-04-01/GetDevice.json
*/
/**
* Sample code: Devices_Get.
@@ -856,8 +822,7 @@ public final class DevicesGetSamples {
*/
public final class DevicesListByDeviceGroupSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevices.json
+ * x-ms-original-file: 2024-04-01/GetDevices.json
*/
/**
* Sample code: Devices_ListByDeviceGroup.
@@ -882,8 +847,7 @@ import com.azure.resourcemanager.sphere.models.Device;
*/
public final class DevicesUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDevice.json
+ * x-ms-original-file: 2024-04-01/PatchDevice.json
*/
/**
* Sample code: Devices_Update.
@@ -911,8 +875,7 @@ import com.azure.resourcemanager.sphere.models.ImageProperties;
*/
public final class ImagesCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutImage.json
+ * x-ms-original-file: 2024-04-01/PutImage.json
*/
/**
* Sample code: Image_CreateOrUpdate.
@@ -937,8 +900,7 @@ public final class ImagesCreateOrUpdateSamples {
*/
public final class ImagesDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteImage.json
+ * x-ms-original-file: 2024-04-01/DeleteImage.json
*/
/**
* Sample code: Images_Delete.
@@ -961,8 +923,7 @@ public final class ImagesDeleteSamples {
*/
public final class ImagesGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImage.json
+ * x-ms-original-file: 2024-04-01/GetImage.json
*/
/**
* Sample code: Images_Get.
@@ -985,8 +946,7 @@ public final class ImagesGetSamples {
*/
public final class ImagesListByCatalogSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImages.json
+ * x-ms-original-file: 2024-04-01/GetImages.json
*/
/**
* Sample code: Images_ListByCatalog.
@@ -1008,8 +968,7 @@ public final class ImagesListByCatalogSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetOperations.json
+ * x-ms-original-file: 2024-04-01/GetOperations.json
*/
/**
* Sample code: Operations_List.
@@ -1030,9 +989,7 @@ public final class OperationsListSamples {
*/
public final class ProductsCountDevicesSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesProduct.
- * json
+ * x-ms-original-file: 2024-04-01/PostCountDevicesProduct.json
*/
/**
* Sample code: Products_CountDevices.
@@ -1054,8 +1011,7 @@ public final class ProductsCountDevicesSamples {
*/
public final class ProductsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutProduct.json
+ * x-ms-original-file: 2024-04-01/PutProduct.json
*/
/**
* Sample code: Products_CreateOrUpdate.
@@ -1076,8 +1032,7 @@ public final class ProductsCreateOrUpdateSamples {
*/
public final class ProductsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteProduct.json
+ * x-ms-original-file: 2024-04-01/DeleteProduct.json
*/
/**
* Sample code: Products_Delete.
@@ -1098,8 +1053,7 @@ public final class ProductsDeleteSamples {
*/
public final class ProductsGenerateDefaultDeviceGroupsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
- * PostGenerateDefaultDeviceGroups.json
+ * x-ms-original-file: 2024-04-01/PostGenerateDefaultDeviceGroups.json
*/
/**
* Sample code: Products_GenerateDefaultDeviceGroups.
@@ -1123,8 +1077,7 @@ public final class ProductsGenerateDefaultDeviceGroupsSamples {
*/
public final class ProductsGetSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProduct.json
+ * x-ms-original-file: 2024-04-01/GetProduct.json
*/
/**
* Sample code: Products_Get.
@@ -1146,8 +1099,7 @@ public final class ProductsGetSamples {
*/
public final class ProductsListByCatalogSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProducts.json
+ * x-ms-original-file: 2024-04-01/GetProducts.json
*/
/**
* Sample code: Products_ListByCatalog.
@@ -1170,8 +1122,7 @@ import com.azure.resourcemanager.sphere.models.Product;
*/
public final class ProductsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchProduct.json
+ * x-ms-original-file: 2024-04-01/PatchProduct.json
*/
/**
* Sample code: Products_Update.
diff --git a/sdk/sphere/azure-resourcemanager-sphere/pom.xml b/sdk/sphere/azure-resourcemanager-sphere/pom.xml
index a154480c3b03..a06b23ac001b 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/pom.xml
+++ b/sdk/sphere/azure-resourcemanager-sphere/pom.xml
@@ -1,9 +1,9 @@
-
+
4.0.0
com.azure
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-sphere
- 1.2.0-beta.1
+ 1.2.0
jar
- Microsoft Azure SDK for AzureSphere Management
- This package contains Microsoft Azure SDK for AzureSphere Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Sphere resource management API. Package tag package-2024-04-01.
+ Microsoft Azure SDK for Azure Sphere Management
+ This package contains Microsoft Azure SDK for Azure Sphere Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Sphere resource management API. Package api-version 2024-04-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,7 @@
UTF-8
0
0
- false
+ false
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 63706a02bbb7..25dfe2ecd15e 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere;
@@ -22,9 +22,10 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.sphere.fluent.AzureSphereMgmtClient;
-import com.azure.resourcemanager.sphere.implementation.AzureSphereMgmtClientBuilder;
+import com.azure.resourcemanager.sphere.fluent.AzureSphereManagementClient;
+import com.azure.resourcemanager.sphere.implementation.AzureSphereManagementClientBuilder;
import com.azure.resourcemanager.sphere.implementation.CatalogsImpl;
import com.azure.resourcemanager.sphere.implementation.CertificatesImpl;
import com.azure.resourcemanager.sphere.implementation.DeploymentsImpl;
@@ -45,6 +46,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -69,12 +71,12 @@ public final class AzureSphereManager {
private Devices devices;
- private final AzureSphereMgmtClient clientObject;
+ private final AzureSphereManagementClient clientObject;
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 AzureSphereMgmtClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new AzureSphereManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -82,11 +84,11 @@ private AzureSphereManager(HttpPipeline httpPipeline, AzureProfile profile, Dura
}
/**
- * Creates an instance of AzureSphere service API entry point.
+ * Creates an instance of Azure Sphere service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the AzureSphere service API instance.
+ * @return the Azure Sphere service API instance.
*/
public static AzureSphereManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -95,11 +97,11 @@ public static AzureSphereManager authenticate(TokenCredential credential, AzureP
}
/**
- * Creates an instance of AzureSphere service API entry point.
+ * Creates an instance of Azure Sphere 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.
+ * @return the Azure Sphere service API instance.
*/
public static AzureSphereManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
@@ -121,6 +123,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-sphere.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -218,22 +223,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}
/**
- * Creates an instance of AzureSphere service API entry point.
+ * Creates an instance of Azure Sphere service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the AzureSphere service API instance.
+ * @return the Azure Sphere service API instance.
*/
public AzureSphereManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.sphere")
.append("/")
- .append("1.1.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -376,12 +383,12 @@ public Devices devices() {
}
/**
- * Gets wrapped service client AzureSphereMgmtClient 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 AzureSphereMgmtClient.
+ * @return Wrapped service client AzureSphereManagementClient.
*/
- public AzureSphereMgmtClient serviceClient() {
+ public AzureSphereManagementClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
similarity index 88%
rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java
rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
index 5a4f1d01f66c..e2540ef76e3f 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -8,30 +8,30 @@
import java.time.Duration;
/**
- * The interface for AzureSphereMgmtClient class.
+ * The interface for AzureSphereManagementClient class.
*/
-public interface AzureSphereMgmtClient {
+public interface AzureSphereManagementClient {
/**
- * Gets The ID of the target subscription.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
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 d66f6cffc0bc..3591dbed9e4a 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -25,53 +25,6 @@
* 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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- 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 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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- 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 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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- 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.
- * @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}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
-
/**
* Get a Catalog.
*
@@ -242,6 +195,53 @@ Response updateWithResponse(String resourceGroupName, String catal
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String catalogName, 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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 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}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
/**
* Counts devices in catalog.
*
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 b76a551fcd5e..3c160c9e3069 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -19,66 +19,66 @@
*/
public interface CertificatesClient {
/**
- * List Certificate resources by 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.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
+ * @return a Certificate along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber,
+ Context context);
/**
- * List Certificate resources by Catalog.
+ * Get a Certificate.
*
* @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.
- * @param top The number of result items to return.
- * @param skip The number of result items to skip.
- * @param maxpagesize The maximum number of result items per page.
- * @param context The context to associate with this operation.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
* @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 response of a Certificate list operation as paginated response with {@link PagedIterable}.
+ * @return a Certificate.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter,
- Integer top, Integer skip, Integer maxpagesize, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateInner get(String resourceGroupName, String catalogName, String serialNumber);
/**
- * Get a Certificate.
+ * List Certificate resources by Catalog.
*
* @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.
- * @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 Certificate along with {@link Response}.
+ * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
/**
- * Get a Certificate.
+ * List Certificate resources by Catalog.
*
* @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.
+ * @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.
+ * @param maxpagesize The maximum number of result items per page.
+ * @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 Certificate.
+ * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- CertificateInner get(String resourceGroupName, String catalogName, String serialNumber);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter,
+ Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* Retrieves cert chain.
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 c02caa703a71..93961276fcd6 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -17,45 +17,6 @@
* 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.
- * @param deviceGroupName Name of 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 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);
-
- /**
- * 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.
- * @param deviceGroupName Name of device group.
- * @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.
- * @param maxpagesize The maximum number of result items per page.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the 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);
-
/**
* Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
* group name.
@@ -254,4 +215,43 @@ void delete(String resourceGroupName, String catalogName, String productName, St
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
String deploymentName, 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.
+ * @param deviceGroupName Name of 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 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);
+
+ /**
+ * 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.
+ * @param deviceGroupName Name of device group.
+ * @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.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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);
}
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 5de380b9aaf7..68ea84578b5a 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -20,42 +20,6 @@
* 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.
- * @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 response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName);
-
- /**
- * 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.
- * @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.
- * @param maxpagesize The maximum number of result items per page.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the 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);
-
/**
* Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
@@ -305,6 +269,42 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
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.
+ * @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 response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * 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.
+ * @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.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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);
+
/**
* Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk
* claiming devices to a catalog only.
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 9e6322247bf4..cb2c9131dfd5 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -20,41 +20,6 @@
* 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.
- * @param deviceGroupName Name of 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 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);
-
- /**
- * 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.
- * @param deviceGroupName Name of 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 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);
-
/**
* 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.
@@ -316,6 +281,41 @@ void delete(String resourceGroupName, String catalogName, String productName, St
void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
String deviceName, 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.
+ * @param deviceGroupName Name of 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 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);
+
+ /**
+ * 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.
+ * @param deviceGroupName Name of 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 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);
+
/**
* 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.
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 de16245b13d1..d20a734c54b2 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -17,38 +17,6 @@
* 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.
- * @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 Image list operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(String resourceGroupName, String catalogName);
-
- /**
- * 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.
- * @param top The number of result items to return.
- * @param skip The number of result items to skip.
- * @param maxpagesize The maximum number of result items per page.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the 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);
-
/**
* Get a Image.
*
@@ -200,4 +168,36 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String catalogName, String imageName, 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.
+ * @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 response of a Image list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+
+ /**
+ * 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.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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);
}
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 fa904d197269..34eb24eb061a 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
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 684c9df9b38b..259fdf97bf3e 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent;
@@ -20,33 +20,6 @@
* 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.
- * @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 Product list operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(String resourceGroupName, String catalogName);
-
- /**
- * 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.
- * @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 response of a Product list operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(String resourceGroupName, String catalogName, Context context);
-
/**
* Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
*
@@ -265,6 +238,33 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String catalogName, String productName, 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 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 Product list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+
+ /**
+ * 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.
+ * @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 response of a Product list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName, Context context);
+
/**
* Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product
* name.
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 298890c77e25..e30bf5729eed 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent.models;
@@ -127,17 +127,6 @@ public CatalogInner withTags(Map tags) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
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 8926263a4005..84e5cdb2702e 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent.models;
@@ -24,7 +24,7 @@ public final class CertificateChainResponseInner implements JsonSerializable {
/*
* Device ID
@@ -63,7 +62,7 @@ public final class DeviceInsightInner implements JsonSerializable {
/*
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
@@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable {
private String name;
/*
- * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
- * ARM/control-plane operations.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
*/
private Boolean isDataAction;
@@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable {
private Origin origin;
/*
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
private ActionType actionType;
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -67,7 +67,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.
+ * operations and "false" for Azure Resource Manager/control-plane operations.
*
* @return the isDataAction value.
*/
@@ -84,17 +84,6 @@ public OperationDisplay display() {
return this.display;
}
- /**
- * Set the display property: Localized display information for this particular operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
/**
* 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".
@@ -106,8 +95,8 @@ public Origin origin() {
}
/**
- * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
*
* @return the actionType value.
*/
@@ -115,17 +104,6 @@ public ActionType actionType() {
return this.actionType;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
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 67ceee12ae2c..5dca61cff0c4 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent.models;
@@ -108,17 +108,6 @@ public String id() {
return this.id;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java
similarity index 90%
rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java
rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java
index a17451099416..fa432fc6d857 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/models/ProductUpdateProperties.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.sphere.models;
+package com.azure.resourcemanager.sphere.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
@@ -47,14 +47,6 @@ public ProductUpdateProperties withDescription(String description) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
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 c995d548b5fa..f376df3307ba 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent.models;
@@ -58,7 +58,7 @@ public final class ProofOfPossessionNonceResponseInner extends CertificateProper
/**
* Creates an instance of ProofOfPossessionNonceResponseInner class.
*/
- public ProofOfPossessionNonceResponseInner() {
+ private ProofOfPossessionNonceResponseInner() {
}
/**
@@ -131,15 +131,6 @@ public String certificate() {
return this.certificate;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
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 5820b3f23246..39b7b24b0e6b 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.fluent.models;
@@ -24,7 +24,7 @@ public final class SignedCapabilityImageResponseInner implements JsonSerializabl
/**
* Creates an instance of SignedCapabilityImageResponseInner class.
*/
- public SignedCapabilityImageResponseInner() {
+ private SignedCapabilityImageResponseInner() {
}
/**
@@ -36,14 +36,6 @@ public String image() {
return this.image;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
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 44b34f3f416c..e38ee68971d4 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
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for AzureSphereMgmtClient.
+ * Package containing the inner data models for AzureSphere.
* 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 725f0e0fae44..60e9d763eaa8 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
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for AzureSphereMgmtClient.
+ * Package containing the service clients for AzureSphere.
* 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/AzureSphereMgmtClientBuilder.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java
similarity index 63%
rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereMgmtClientBuilder.java
rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java
index 6ea35a81ce8e..0876f371a71f 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereMgmtClientBuilder.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.implementation;
@@ -15,39 +15,39 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the AzureSphereMgmtClientImpl type.
+ * A builder for creating a new instance of the AzureSphereManagementClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { AzureSphereMgmtClientImpl.class })
-public final class AzureSphereMgmtClientBuilder {
+@ServiceClientBuilder(serviceClients = { AzureSphereManagementClientImpl.class })
+public final class AzureSphereManagementClientBuilder {
/*
- * The ID of the target subscription.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets The ID of the target subscription.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @param endpoint the endpoint value.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public AzureSphereManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @param subscriptionId the subscriptionId value.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public AzureSphereManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public AzureSphereMgmtClientBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder environment(AzureEnvironment environment) {
+ public AzureSphereManagementClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public AzureSphereMgmtClientBuilder environment(AzureEnvironment environment) {
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder pipeline(HttpPipeline pipeline) {
+ public AzureSphereManagementClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public AzureSphereMgmtClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public AzureSphereManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public AzureSphereMgmtClientBuilder defaultPollInterval(Duration defaultPollInte
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the AzureSphereMgmtClientBuilder.
+ * @return the AzureSphereManagementClientBuilder.
*/
- public AzureSphereMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public AzureSphereManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of AzureSphereMgmtClientImpl with the provided parameters.
+ * Builds an instance of AzureSphereManagementClientImpl with the provided parameters.
*
- * @return an instance of AzureSphereMgmtClientImpl.
+ * @return an instance of AzureSphereManagementClientImpl.
*/
- public AzureSphereMgmtClientImpl buildClient() {
+ public AzureSphereManagementClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,8 +131,8 @@ public AzureSphereMgmtClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- AzureSphereMgmtClientImpl client = new AzureSphereMgmtClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ AzureSphereManagementClientImpl client = new AzureSphereManagementClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereMgmtClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java
similarity index 86%
rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereMgmtClientImpl.java
rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java
index 51d87189e728..44e87c0aa407 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereMgmtClientImpl.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.implementation;
@@ -15,15 +15,18 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.sphere.fluent.AzureSphereMgmtClient;
+import com.azure.resourcemanager.sphere.fluent.AzureSphereManagementClient;
import com.azure.resourcemanager.sphere.fluent.CatalogsClient;
import com.azure.resourcemanager.sphere.fluent.CertificatesClient;
import com.azure.resourcemanager.sphere.fluent.DeploymentsClient;
@@ -42,31 +45,17 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the AzureSphereMgmtClientImpl type.
+ * Initializes a new instance of the AzureSphereManagementClientImpl type.
*/
-@ServiceClient(builder = AzureSphereMgmtClientBuilder.class)
-public final class AzureSphereMgmtClientImpl implements AzureSphereMgmtClient {
+@ServiceClient(builder = AzureSphereManagementClientBuilder.class)
+public final class AzureSphereManagementClientImpl implements AzureSphereManagementClient {
/**
- * 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.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -75,12 +64,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -88,6 +77,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -243,22 +246,22 @@ public DevicesClient getDevices() {
}
/**
- * Initializes an instance of AzureSphereMgmtClient client.
+ * 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.
* @param environment The Azure environment.
- * @param subscriptionId The ID of the target subscription.
- * @param endpoint server parameter.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
- AzureSphereMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
- Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ AzureSphereManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
this.apiVersion = "2024-04-01";
this.operations = new OperationsClientImpl(this);
this.catalogs = new CatalogsClientImpl(this);
@@ -307,6 +310,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
@@ -396,5 +416,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(AzureSphereMgmtClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AzureSphereManagementClientImpl.class);
}
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 7087cf6a5339..15dc77d0182c 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.implementation;
@@ -239,6 +239,6 @@ public CatalogImpl withProperties(CatalogProperties properties) {
}
private boolean isInCreateMode() {
- return this.innerModel().id() == null;
+ return this.innerModel() == null || 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 b6dd7624202a..9e8dda773eb0 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.sphere.implementation;
@@ -29,6 +29,7 @@
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.PollerFlux;
@@ -41,13 +42,13 @@
import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner;
import com.azure.resourcemanager.sphere.fluent.models.ImageInner;
-import com.azure.resourcemanager.sphere.models.CatalogListResult;
+import com.azure.resourcemanager.sphere.implementation.models.CatalogListResult;
+import com.azure.resourcemanager.sphere.implementation.models.DeploymentListResult;
+import com.azure.resourcemanager.sphere.implementation.models.DeviceGroupListResult;
+import com.azure.resourcemanager.sphere.implementation.models.DeviceListResult;
+import com.azure.resourcemanager.sphere.implementation.models.PagedDeviceInsight;
import com.azure.resourcemanager.sphere.models.CatalogUpdate;
-import com.azure.resourcemanager.sphere.models.DeploymentListResult;
-import com.azure.resourcemanager.sphere.models.DeviceGroupListResult;
-import com.azure.resourcemanager.sphere.models.DeviceListResult;
import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
-import com.azure.resourcemanager.sphere.models.PagedDeviceInsight;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -64,76 +65,136 @@ public final class CatalogsClientImpl implements CatalogsClient {
/**
* The service client containing this operation class.
*/
- private final AzureSphereMgmtClientImpl client;
+ private final AzureSphereManagementClientImpl client;
/**
* Initializes an instance of CatalogsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- CatalogsClientImpl(AzureSphereMgmtClientImpl client) {
+ CatalogsClientImpl(AzureSphereManagementClientImpl client) {
this.service = RestProxy.create(CatalogsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for AzureSphereMgmtClientCatalogs to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for AzureSphereManagementClientCatalogs to be used by the proxy service
+ * to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "AzureSphereMgmtClien")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "AzureSphereManagementClientCatalogs")
public interface CatalogsService {
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> getByResourceGroup(@HostParam("endpoint") 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")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @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}")
- @ExpectedResponses({ 200 })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ Mono>> createOrUpdate(@HostParam("endpoint") 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);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") CatalogInner resource, 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,
+ Response createOrUpdateSync(@HostParam("endpoint") 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);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") CatalogInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") CatalogUpdate properties, Context context);
- @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,
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") CatalogUpdate properties, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") 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" })
+ @Headers({ "Accept: application/json;q=0.9", "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,
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") 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")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("endpoint") 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}/providers/Microsoft.AzureSphere/catalogs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") 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}/providers/Microsoft.AzureSphere/catalogs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @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("endpoint") 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);
@@ -142,7 +203,7 @@ Mono>> delete(@HostParam("$host") String endpoint,
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> countDevices(@HostParam("$host") String endpoint,
+ Response countDevicesSync(@HostParam("endpoint") 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);
@@ -151,7 +212,18 @@ Mono> countDevices(@HostParam("$host") Strin
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listDeployments(@HostParam("$host") String endpoint,
+ Mono> listDeployments(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize, @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)
+ Response listDeploymentsSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
@QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
@@ -162,19 +234,42 @@ Mono> listDeployments(@HostParam("$host") String
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listDeviceGroups(@HostParam("$host") String endpoint,
+ Mono> listDeviceGroups(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ListDeviceGroupsRequest listDeviceGroupsRequest, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listDeviceGroupsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ListDeviceGroupsRequest listDeviceGroupsRequest, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDeviceInsights(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
@QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
@QueryParam("$maxpagesize") Integer maxpagesize, @PathParam("catalogName") String catalogName,
- @BodyParam("application/json") ListDeviceGroupsRequest listDeviceGroupsRequest,
@HeaderParam("Accept") String accept, Context context);
@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,
+ Response listDeviceInsightsSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
@QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
@@ -185,7 +280,7 @@ Mono> listDeviceInsights(@HostParam("$host") String
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listDevices(@HostParam("$host") String endpoint,
+ Mono> listDevices(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
@QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
@@ -193,29 +288,66 @@ Mono> listDevices(@HostParam("$host") String endpoint
@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)
+ Response listDevicesSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/uploadImage")
@ExpectedResponses({ 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> uploadImage(@HostParam("$host") String endpoint,
+ Mono>> uploadImage(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName,
- @BodyParam("application/json") ImageInner uploadImageRequest, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") ImageInner uploadImageRequest, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/uploadImage")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response uploadImageSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("catalogName") String catalogName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") ImageInner uploadImageRequest, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -223,7 +355,15 @@ Mono> listByResourceGroupNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listDeploymentsNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listDeploymentsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -231,7 +371,15 @@ Mono> listDeploymentsNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listDeviceGroupsNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listDeviceGroupsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -239,7 +387,15 @@ Mono> listDeviceGroupsNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listDeviceInsightsNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listDeviceInsightsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -247,925 +403,678 @@ Mono> listDeviceInsightsNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listDevicesNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listDevicesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
- * List Catalog resources by subscription ID.
+ * 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.
* @throws 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}.
+ * @return a Catalog along with {@link Response} on 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String catalogName) {
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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List Catalog resources by subscription ID.
+ * Get a Catalog.
*
- * @param context The context to associate with this operation.
+ * @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 Catalog list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return a Catalog on 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."));
- }
- if (this.client.getSubscriptionId() == 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,
- context)
- .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));
+ private Mono getByResourceGroupAsync(String resourceGroupName, String catalogName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * List Catalog resources by subscription ID.
+ * 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.
* @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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context 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}.
+ * @return a Catalog along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context);
}
/**
- * List Catalog resources by subscription ID.
+ * Get a Catalog.
*
- * @param context The context to associate with this operation.
+ * @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 Catalog list operation as paginated response with {@link PagedIterable}.
+ * @return a Catalog.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner getByResourceGroup(String resourceGroupName, String catalogName) {
+ return getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE).getValue();
}
/**
- * List Catalog resources by resource group.
+ * 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.
* @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}.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String catalogName, CatalogInner resource) {
+ final String contentType = "application/json";
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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, contentType, accept, resource,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List Catalog resources by resource group.
+ * Create a Catalog.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param context The context to associate with this operation.
+ * @param catalogName Name of catalog.
+ * @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 the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return an Azure Sphere catalog along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
+ private Response createOrUpdateWithResponse(String resourceGroupName, String catalogName,
+ CatalogInner resource) {
+ final String contentType = "application/json";
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));
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, contentType, accept, resource,
+ Context.NONE);
}
/**
- * 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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * List Catalog resources by resource group.
+ * 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.
* @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 as paginated response with {@link PagedFlux}.
+ * @return an Azure Sphere catalog along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String catalogName,
+ CatalogInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, contentType, accept, resource, context);
}
/**
- * List Catalog resources by resource group.
+ * 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.
* @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 as paginated response with {@link PagedIterable}.
+ * @return the {@link PollerFlux} for polling of an Azure Sphere catalog.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ @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());
}
/**
- * List Catalog resources by resource group.
+ * Create a Catalog.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param context The context to associate with this operation.
+ * @param catalogName Name of catalog.
+ * @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 the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, CatalogInner resource) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, catalogName, resource);
+ return this.client.getLroResult(response, CatalogInner.class, CatalogInner.class,
+ Context.NONE);
}
/**
- * Get a Catalog.
+ * 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.
+ * @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 Catalog along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, CatalogInner resource, Context context) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, catalogName, resource, context);
+ return this.client.getLroResult(response, CatalogInner.class, CatalogInner.class,
+ context);
}
/**
- * Get a Catalog.
+ * Create 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.
+ * @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 a Catalog along with {@link Response} on successful completion of {@link Mono}.
+ * @return an Azure Sphere catalog on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context);
+ private Mono createOrUpdateAsync(String resourceGroupName, String catalogName,
+ CatalogInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Get a Catalog.
+ * 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.
* @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 Catalog on successful completion of {@link Mono}.
+ * @return an Azure Sphere catalog.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String catalogName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource) {
+ return beginCreateOrUpdate(resourceGroupName, catalogName, resource).getFinalResult();
}
/**
- * Get a Catalog.
+ * 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.
* @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 Catalog along with {@link Response}.
+ * @return an Azure Sphere catalog.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName,
+ public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource,
Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName, context).block();
+ return beginCreateOrUpdate(resourceGroupName, catalogName, resource, context).getFinalResult();
}
/**
- * Get a Catalog.
+ * 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.
* @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 Catalog.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CatalogInner getByResourceGroup(String resourceGroupName, String catalogName) {
- return getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE).getValue();
+ private Mono> updateWithResponseAsync(String resourceGroupName, String catalogName,
+ CatalogUpdate properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Create a Catalog.
+ * Update 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.
+ * @param properties The resource properties to be updated.
* @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 Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ * @return an Azure Sphere catalog on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- if (resource == null) {
- return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
- } else {
- resource.validate();
- }
- 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))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ private Mono updateAsync(String resourceGroupName, String catalogName, CatalogUpdate properties) {
+ return updateWithResponseAsync(resourceGroupName, catalogName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Create a Catalog.
+ * Update 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.
+ * @param properties The resource properties to be updated.
* @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 Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ * @return an Azure Sphere catalog along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- if (resource == null) {
- return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
- } else {
- resource.validate();
- }
+ public Response updateWithResponse(String resourceGroupName, String catalogName,
+ CatalogUpdate properties, Context context) {
+ final String contentType = "application/json";
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.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, contentType, accept, properties, context);
}
/**
- * Create a Catalog.
+ * Update 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.
+ * @param properties The resource properties to be updated.
* @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 an Azure Sphere catalog.
+ * @return 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());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner update(String resourceGroupName, String catalogName, CatalogUpdate properties) {
+ return updateWithResponse(resourceGroupName, catalogName, properties, Context.NONE).getValue();
}
/**
- * Create a Catalog.
+ * Delete 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.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of an Azure Sphere catalog.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- 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);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Create a Catalog.
+ * Delete 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.
* @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 an Azure Sphere catalog.
+ * @return the response body along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName,
- String catalogName, CatalogInner resource) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String catalogName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, Context.NONE);
}
/**
- * Create a Catalog.
+ * Delete 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.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- 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.
- * @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 Azure Sphere catalog on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String catalogName,
- CatalogInner resource) {
- return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private Response deleteWithResponse(String resourceGroupName, String catalogName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, context);
}
/**
- * Create a Catalog.
+ * Delete 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.
- * @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 Azure Sphere catalog on successful completion of {@link Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String catalogName, CatalogInner resource,
- Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @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());
}
/**
- * Create a Catalog.
+ * Delete 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.
* @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 Azure Sphere catalog.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource) {
- return createOrUpdateAsync(resourceGroupName, catalogName, resource).block();
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName) {
+ Response response = deleteWithResponse(resourceGroupName, catalogName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
- * Create a Catalog.
+ * Delete 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.
* @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 Azure Sphere catalog.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource,
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName,
Context context) {
- return createOrUpdateAsync(resourceGroupName, catalogName, resource, context).block();
+ Response response = deleteWithResponse(resourceGroupName, catalogName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
- * Update a Catalog.
+ * Delete 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.
* @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 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) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- 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))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ * @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) {
+ return beginDeleteAsync(resourceGroupName, catalogName).last().flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Update a Catalog.
+ * Delete 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.
- * @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 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) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- 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);
+ public void delete(String resourceGroupName, String catalogName) {
+ beginDelete(resourceGroupName, catalogName).getFinalResult();
}
/**
- * Update a Catalog.
+ * Delete 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.
+ * @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 Azure Sphere catalog on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String catalogName, CatalogUpdate properties) {
- return updateWithResponseAsync(resourceGroupName, catalogName, properties)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ public void delete(String resourceGroupName, String catalogName, Context context) {
+ beginDelete(resourceGroupName, catalogName, context).getFinalResult();
}
/**
- * Update a Catalog.
+ * List Catalog resources by resource group.
*
* @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.
- * @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 Azure Sphere catalog along with {@link Response}.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(String resourceGroupName, String catalogName,
- CatalogUpdate properties, Context context) {
- return updateWithResponseAsync(resourceGroupName, catalogName, properties, context).block();
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Update a Catalog.
+ * List Catalog resources by resource group.
*
* @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.
* @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 Azure Sphere catalog.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CatalogInner update(String resourceGroupName, String catalogName, CatalogUpdate properties) {
- return updateWithResponse(resourceGroupName, catalogName, properties, Context.NONE).getValue();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by resource group.
*
* @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 {@link Response} on successful completion of {@link Mono}.
+ * @return the response of a Catalog list operation along with {@link PagedResponse}.
*/
@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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
final String accept = "application/json";
- return FluxUtil
- .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()));
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Delete a Catalog.
+ * List Catalog resources by resource group.
*
* @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.
* @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}.
+ * @return the response of a Catalog list operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) {
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);
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Delete a Catalog.
+ * List Catalog resources by resource group.
*
* @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 {@link PollerFlux} for polling of long-running operation.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
*/
- @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());
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by resource group.
*
* @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.
* @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.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- 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);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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 {@link SyncPoller} for polling of long-running operation.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName) {
- return this.beginDeleteAsync(resourceGroupName, catalogName).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ 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))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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.
- * @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.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName,
- Context context) {
- return this.beginDeleteAsync(resourceGroupName, catalogName, context).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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 A {@link Mono} that completes when a successful response is received.
+ * @return the response of a Catalog list operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String catalogName) {
- return beginDeleteAsync(resourceGroupName, catalogName).last().flatMap(this.client::getLroFinalResultOrError);
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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.
* @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.
+ * @return the response of a Catalog list operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String catalogName, Context context) {
- return beginDeleteAsync(resourceGroupName, catalogName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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 Catalog list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String catalogName) {
- deleteAsync(resourceGroupName, catalogName).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
}
/**
- * Delete a Catalog.
+ * List Catalog resources by subscription ID.
*
- * @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.
* @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 as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String catalogName, Context context) {
- deleteAsync(resourceGroupName, catalogName, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
}
/**
@@ -1182,21 +1091,6 @@ public void delete(String resourceGroupName, String catalogName, Context context
@ServiceMethod(returns = ReturnType.SINGLE)
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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(),
@@ -1204,42 +1098,6 @@ private Mono> countDevicesWithResponseAsync(
.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.
- * @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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.countDevices(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context);
- }
-
/**
* Counts devices in catalog.
*
@@ -1270,7 +1128,9 @@ private Mono countDevicesAsync(String resourceGroupNa
@ServiceMethod(returns = ReturnType.SINGLE)
public Response countDevicesWithResponse(String resourceGroupName, String catalogName,
Context context) {
- return countDevicesWithResponseAsync(resourceGroupName, catalogName, context).block();
+ final String accept = "application/json";
+ return service.countDevicesSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, catalogName, accept, context);
}
/**
@@ -1306,21 +1166,6 @@ public CountDevicesResponseInner countDevices(String resourceGroupName, String c
@ServiceMethod(returns = ReturnType.SINGLE)
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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listDeployments(this.client.getEndpoint(), this.client.getApiVersion(),
@@ -1331,49 +1176,6 @@ private Mono> listDeploymentsSinglePageAsync(Stri
.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.
- * @param top The number of result items to return.
- * @param skip The number of result items to skip.
- * @param maxpagesize The maximum number of result items per page.
- * @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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listDeployments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, filter, top, skip, maxpagesize, catalogName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
/**
* Lists deployments for catalog.
*
@@ -1417,6 +1219,31 @@ private PagedFlux listDeploymentsAsync(String resourceGroupName
nextLink -> listDeploymentsNextSinglePageAsync(nextLink));
}
+ /**
+ * 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.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listDeploymentsSinglePage(String resourceGroupName, String catalogName,
+ String filter, Integer top, Integer skip, Integer maxpagesize) {
+ final String accept = "application/json";
+ Response res = service.listDeploymentsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, top, skip,
+ maxpagesize, catalogName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Lists deployments for catalog.
*
@@ -1430,13 +1257,17 @@ private PagedFlux listDeploymentsAsync(String resourceGroupName
* @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 as paginated response with {@link PagedFlux}.
+ * @return the response of a Deployment list operation along with {@link PagedResponse}.
*/
- @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));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listDeploymentsSinglePage(String resourceGroupName, String catalogName,
+ String filter, Integer top, Integer skip, Integer maxpagesize, Context context) {
+ final String accept = "application/json";
+ Response res = service.listDeploymentsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, top, skip,
+ maxpagesize, catalogName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1456,7 +1287,8 @@ public PagedIterable listDeployments(String resourceGroupName,
final Integer skip = null;
final Integer maxpagesize = null;
return new PagedIterable<>(
- listDeploymentsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize));
+ () -> listDeploymentsSinglePage(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDeploymentsNextSinglePage(nextLink));
}
/**
@@ -1478,7 +1310,8 @@ public PagedIterable listDeployments(String resourceGroupName,
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));
+ () -> listDeploymentsSinglePage(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context),
+ nextLink -> listDeploymentsNextSinglePage(nextLink, context));
}
/**
@@ -1501,32 +1334,11 @@ public PagedIterable listDeployments(String resourceGroupName,
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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- 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."));
- } else {
- listDeviceGroupsRequest.validate();
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listDeviceGroups(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, filter, top, skip, maxpagesize, catalogName,
- listDeviceGroupsRequest, accept, context))
+ this.client.getSubscriptionId(), resourceGroupName, filter, top, skip, maxpagesize, catalogName, accept,
+ listDeviceGroupsRequest, 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()));
@@ -1542,46 +1354,18 @@ private Mono> listDeviceGroupsSinglePageAsync(St
* @param top The number of result items to return.
* @param skip The number of result items to skip.
* @param maxpagesize The maximum number of result items per page.
- * @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}.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- 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."));
- } 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, filter, top, skip, maxpagesize, catalogName, listDeviceGroupsRequest, accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ 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),
+ nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink));
}
/**
@@ -1590,10 +1374,6 @@ private Mono> listDeviceGroupsSinglePageAsync(St
* @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.
- * @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.
- * @param maxpagesize The maximum number of result items per page.
* @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.
@@ -1601,8 +1381,11 @@ private Mono> listDeviceGroupsSinglePageAsync(St
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listDeviceGroupsAsync(String resourceGroupName, String catalogName,
- ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip,
- Integer maxpagesize) {
+ 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),
nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink));
@@ -1614,21 +1397,25 @@ private PagedFlux listDeviceGroupsAsync(String resourceGroupNa
* @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.
+ * @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.
+ * @param maxpagesize The maximum number of result items per page.
* @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 as paginated response with {@link PagedFlux}.
+ * @return the response of a DeviceGroup list operation along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- 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),
- nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listDeviceGroupsSinglePage(String resourceGroupName, String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip,
+ Integer maxpagesize) {
+ final String accept = "application/json";
+ Response res = service.listDeviceGroupsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, top, skip,
+ maxpagesize, catalogName, accept, listDeviceGroupsRequest, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1645,15 +1432,18 @@ private PagedFlux listDeviceGroupsAsync(String resourceGroupNa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}.
+ * @return the response of a DeviceGroup list operation along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listDeviceGroupsAsync(String resourceGroupName, String catalogName,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listDeviceGroupsSinglePage(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),
- nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink, context));
+ final String accept = "application/json";
+ Response res = service.listDeviceGroupsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, top, skip,
+ maxpagesize, catalogName, accept, listDeviceGroupsRequest, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1674,8 +1464,9 @@ public PagedIterable listDeviceGroups(String resourceGroupName
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<>(() -> listDeviceGroupsSinglePage(resourceGroupName, catalogName,
+ listDeviceGroupsRequest, filter, top, skip, maxpagesize),
+ nextLink -> listDeviceGroupsNextSinglePage(nextLink));
}
/**
@@ -1698,8 +1489,9 @@ public PagedIterable listDeviceGroups(String resourceGroupName
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<>(() -> listDeviceGroupsSinglePage(resourceGroupName, catalogName,
+ listDeviceGroupsRequest, filter, top, skip, maxpagesize, context),
+ nextLink -> listDeviceGroupsNextSinglePage(nextLink, context));
}
/**
@@ -1720,21 +1512,6 @@ public PagedIterable listDeviceGroups(String resourceGroupName
@ServiceMethod(returns = ReturnType.SINGLE)
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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listDeviceInsights(this.client.getEndpoint(), this.client.getApiVersion(),
@@ -1745,49 +1522,6 @@ private Mono> listDeviceInsightsSinglePageAsyn
.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.
- * @param top The number of result items to return.
- * @param skip The number of result items to skip.
- * @param maxpagesize The maximum number of result items per page.
- * @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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (catalogName == null) {
- return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listDeviceInsights(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, filter, top, skip, maxpagesize, catalogName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
/**
* Lists device insights for catalog.
*
@@ -1831,6 +1565,31 @@ private PagedFlux